#include <tabstractcontroller.h>
|
| virtual TSession & | session () |
| |
| virtual bool | addCookie (const TCookie &cookie) |
| |
| virtual bool | addCookie (const QByteArray &name, const QByteArray &value, const QDateTime &expire=QDateTime(), const QString &path=QString(), const QString &domain=QString(), bool secure=false, bool httpOnly=false, const QByteArray &sameSite="Lax") |
| |
| virtual bool | addCookie (const QByteArray &name, const QByteArray &value, int64_t maxAge, const QString &path=QString(), const QString &domain=QString(), bool secure=false, bool httpOnly=false, const QByteArray &sameSite="Lax") |
| |
| virtual void | reset () |
| |
| QVariant | variant (const QString &name) const |
| |
| void | exportVariants (const QVariantMap &map) |
| |
| void | exportValidationErrors (const TFormValidator &validator, const QString &prefix=QString("err_")) |
| |
| bool | hasVariant (const QString &name) const |
| |
| const QVariantMap & | allVariants () const |
| |
| QString | viewClassName (const QString &action=QString()) const |
| |
| QString | viewClassName (const QString &contoller, const QString &action) const |
| |
The TAbstractController class is the abstract base class of controllers, providing functionality common to controllers.
◆ TAbstractController()
| TAbstractController::TAbstractController |
( |
| ) |
|
◆ ~TAbstractController()
| virtual TAbstractController::~TAbstractController |
( |
| ) |
|
|
inlinevirtual |
◆ activeAction()
| QString TAbstractController::activeAction |
( |
| ) |
const |
|
pure virtual |
◆ addCookie() [1/3]
| bool TAbstractController::addCookie |
( |
const QByteArray & |
name, |
|
|
const QByteArray & |
value, |
|
|
const QDateTime & |
expire = QDateTime(), |
|
|
const QString & |
path = QString(), |
|
|
const QString & |
domain = QString(), |
|
|
bool |
secure = false, |
|
|
bool |
httpOnly = false, |
|
|
const QByteArray & |
sameSite = "Lax" |
|
) |
| |
|
protectedvirtual |
◆ addCookie() [2/3]
| bool TAbstractController::addCookie |
( |
const QByteArray & |
name, |
|
|
const QByteArray & |
value, |
|
|
int64_t |
maxAge, |
|
|
const QString & |
path = QString(), |
|
|
const QString & |
domain = QString(), |
|
|
bool |
secure = false, |
|
|
bool |
httpOnly = false, |
|
|
const QByteArray & |
sameSite = "Lax" |
|
) |
| |
|
protectedvirtual |
◆ addCookie() [3/3]
| bool TAbstractController::addCookie |
( |
const TCookie & |
cookie | ) |
|
|
protectedvirtual |
◆ allVariants()
| const QVariantMap & TAbstractController::allVariants |
( |
| ) |
const |
|
inlineprotected |
Returns all the exported variables.
Internal use only.
◆ arguments()
| virtual QStringList TAbstractController::arguments |
( |
| ) |
const |
|
inlinevirtual |
◆ authenticityToken()
| virtual QByteArray TAbstractController::authenticityToken |
( |
| ) |
const |
|
inlinevirtual |
◆ className()
| QString TAbstractController::className |
( |
| ) |
const |
|
inlinevirtual |
◆ context() [1/2]
| TActionContext * TAbstractController::context |
( |
| ) |
|
|
inline |
◆ context() [2/2]
| const TActionContext * TAbstractController::context |
( |
| ) |
const |
|
inline |
◆ currentThread()
| static QThread * TAbstractController::currentThread |
( |
| ) |
|
|
inlinestatic |
◆ exportValidationErrors()
| void TAbstractController::exportValidationErrors |
( |
const TFormValidator & |
validator, |
|
|
const QString & |
prefix = QString("err_") |
|
) |
| |
|
protected |
Exports validation error messages with the prefix prefix each.
◆ exportVariant()
| void TAbstractController::exportVariant |
( |
const QString & |
name, |
|
|
const QVariant & |
value, |
|
|
bool |
overwrite = true |
|
) |
| |
Exports a new variable with the name name and a value of value for views.
Internal use only.
◆ exportVariants()
| void TAbstractController::exportVariants |
( |
const QVariantMap & |
map | ) |
|
|
protected |
Exports the map.
Internal use only.
◆ getRenderingData()
| QString TAbstractController::getRenderingData |
( |
const QString & |
templateName, |
|
|
const QVariantMap & |
vars = QVariantMap() |
|
) |
| |
|
virtual |
◆ hasVariant()
| bool TAbstractController::hasVariant |
( |
const QString & |
name | ) |
const |
|
inlineprotected |
Returns true if a variable with the name is exported for views; otherwise returns false.
Internal use only.
◆ httpRequest()
| const THttpRequest & TAbstractController::httpRequest |
( |
| ) |
const |
|
virtual |
◆ isUserLoggedIn()
| bool TAbstractController::isUserLoggedIn |
( |
| ) |
const |
|
virtual |
Returns true if a user is logged in to the system; otherwise returns false.
This is a virtual function.
- See also
- userLogin()
Reimplemented in TActionController.
◆ name()
| QString TAbstractController::name |
( |
| ) |
const |
|
pure virtual |
◆ request()
◆ reset()
| virtual void TAbstractController::reset |
( |
| ) |
|
|
inlineprotectedvirtual |
◆ session() [1/2]
| TSession & TAbstractController::session |
( |
| ) |
|
|
protectedvirtual |
◆ session() [2/2]
| const TSession & TAbstractController::session |
( |
| ) |
const |
|
virtual |
◆ setContext()
| void TAbstractController::setContext |
( |
TActionContext * |
context | ) |
|
|
inline |
◆ setFlash()
| void TAbstractController::setFlash |
( |
const QString & |
name, |
|
|
const QVariant & |
value |
|
) |
| |
|
virtual |
◆ variant()
| QVariant TAbstractController::variant |
( |
const QString & |
name | ) |
const |
|
inlineprotected |
Returns the exported variable with the value associated with the name.
◆ viewClassName() [1/2]
| QString TAbstractController::viewClassName |
( |
const QString & |
action = QString() | ) |
const |
|
protected |
Returns a class name of a view for the action action of the active controller.
Internal use only.
◆ viewClassName() [2/2]
| QString TAbstractController::viewClassName |
( |
const QString & |
contoller, |
|
|
const QString & |
action |
|
) |
| const |
|
protected |
Returns a class name of a view for the action action of the controller controller.
Internal use only.
◆ TDirectView
The documentation for this class was generated from the following files: