|
Cutelyst
2.14.2
|

Public Member Functions | |
| StatusMessage (Application *parent) | |
| QString | errorMgStashKey () const |
| QString | sessionPrefix () const |
| void | setErrorMgStashKey (const QString &errorMgStashKey) |
| void | setSessionPrefix (const QString &sessionPrefix) |
| void | setStatusMsgStashKey (const QString &statusMsgStashKey) |
| void | setTokenParam (const QString &tokenParam) |
| QString | statusMsgStashKey () const |
| QString | tokenParam () const |
Public Member Functions inherited from Cutelyst::Plugin | |
| Plugin (Application *parent) | |
Public Member Functions inherited from QObject | |
| QObject (QObject *parent) | |
| bool | blockSignals (bool block) |
| const QObjectList & | children () const |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const |
| void | deleteLater () |
| void | destroyed (QObject *obj) |
| bool | disconnect (const char *signal, const QObject *receiver, const char *method) const |
| bool | disconnect (const QObject *receiver, const char *method) const |
| void | dumpObjectInfo () |
| void | dumpObjectTree () |
| QList< QByteArray > | dynamicPropertyNames () const |
| virtual bool | event (QEvent *e) |
| virtual bool | eventFilter (QObject *watched, QEvent *event) |
| T | findChild (const QString &name, Qt::FindChildOptions options) const |
| QList< T > | findChildren (const QString &name, Qt::FindChildOptions options) const |
| QList< T > | findChildren (const QRegExp ®Exp, Qt::FindChildOptions options) const |
| QList< T > | findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const |
| bool | inherits (const char *className) const |
| void | installEventFilter (QObject *filterObj) |
| bool | isWidgetType () const |
| bool | isWindowType () const |
| void | killTimer (int id) |
| virtual const QMetaObject * | metaObject () const |
| void | moveToThread (QThread *targetThread) |
| QString | objectName () const |
| void | objectNameChanged (const QString &objectName) |
| QObject * | parent () const |
| QVariant | property (const char *name) const |
| void | removeEventFilter (QObject *obj) |
| void | setObjectName (const QString &name) |
| void | setParent (QObject *parent) |
| bool | setProperty (const char *name, const QVariant &value) |
| bool | signalsBlocked () const |
| int | startTimer (int interval, Qt::TimerType timerType) |
| QThread * | thread () const |
Static Public Member Functions | |
| static QString | error (Context *c, const QString &msg) |
| static ParamsMultiMap | errorQuery (Context *c, const QString &msg, ParamsMultiMap query=ParamsMultiMap()) |
| static void | load (Context *c) |
| static QString | status (Context *c, const QString &msg) |
| static ParamsMultiMap | statusQuery (Context *c, const QString &msg, ParamsMultiMap query=ParamsMultiMap()) |
Static Public Member Functions inherited from QObject | |
| QMetaObject::Connection | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, Functor functor) |
| QMetaObject::Connection | connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type) |
| bool | disconnect (const QMetaObject::Connection &connection) |
| bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
| bool | disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method) |
| bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
| QString | tr (const char *sourceText, const char *disambiguation, int n) |
| QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
| virtual bool | setup (Application *app) override |
Protected Member Functions inherited from QObject | |
| virtual void | childEvent (QChildEvent *event) |
| virtual void | connectNotify (const QMetaMethod &signal) |
| virtual void | customEvent (QEvent *event) |
| virtual void | disconnectNotify (const QMetaMethod &signal) |
| bool | isSignalConnected (const QMetaMethod &signal) const |
| int | receivers (const char *signal) const |
| QObject * | sender () const |
| int | senderSignalIndex () const |
| virtual void | timerEvent (QTimerEvent *event) |
Additional Inherited Members | |
Properties inherited from QObject | |
| objectName | |
Definition at line 28 of file statusmessage.h.
| StatusMessage::StatusMessage | ( | Application * | parent | ) |
Constructs a new status message object with the given Application parent.
Definition at line 52 of file statusmessage.cpp.
References QDateTime::currentMSecsSinceEpoch().
Saves an error message returning the generated message id (mid)
Definition at line 149 of file statusmessage.cpp.
References sessionPrefix(), and Cutelyst::Session::setValue().
| QString StatusMessage::errorMgStashKey | ( | ) | const |
Returns the name of the stash key where error messages are loaded when load() is called.
Definition at line 99 of file statusmessage.cpp.
Referenced by setErrorMgStashKey().
|
static |
Saves an error message returning query parameters with the generated message id (mid) and it's token
Definition at line 162 of file statusmessage.cpp.
References QMap::insert(), and Cutelyst::Session::setValue().
|
static |
Load both messages that match the token param (mid=###) into the stash for display by the view.
Definition at line 111 of file statusmessage.cpp.
References QList::append(), Cutelyst::Session::deleteValues(), QString::isEmpty(), QList::isEmpty(), QVariant::isNull(), Cutelyst::Request::queryParam(), Cutelyst::Context::setStash(), and Cutelyst::Session::value().
| QString StatusMessage::sessionPrefix | ( | ) | const |
Returns the key prefix inside Session where messages will be stored.
Definition at line 63 of file statusmessage.cpp.
Referenced by error(), setSessionPrefix(), and status().
| void StatusMessage::setErrorMgStashKey | ( | const QString & | errorMgStashKey | ) |
Sets the name of the stash key where error messages are loaded when load() is called. Defaults to error_msg.
Definition at line 105 of file statusmessage.cpp.
References errorMgStashKey().
| void StatusMessage::setSessionPrefix | ( | const QString & | sessionPrefix | ) |
Sets the key prefix inside Session where messages will be stored. Defaults to "status_msg".
Definition at line 69 of file statusmessage.cpp.
References sessionPrefix().
| void StatusMessage::setStatusMsgStashKey | ( | const QString & | statusMsgStashKey | ) |
Sets the name of the stash key where "success" status messages are loaded when load() is called. Defaults to status_msg.
Definition at line 93 of file statusmessage.cpp.
References statusMsgStashKey().
| void StatusMessage::setTokenParam | ( | const QString & | tokenParam | ) |
Sets the name of the URL param that holds the token on the page where you want to retrieve/display the status message. Defaults to "mid".
Definition at line 81 of file statusmessage.cpp.
References tokenParam().
|
overrideprotectedvirtual |
Reimplemented from Plugin::setup().
Reimplemented from Cutelyst::Plugin.
Definition at line 205 of file statusmessage.cpp.
References QObject::connect(), and Cutelyst::Application::postForked().
Saves a status message returning the generated message id (mid)
Definition at line 177 of file statusmessage.cpp.
References sessionPrefix(), and Cutelyst::Session::setValue().
| QString StatusMessage::statusMsgStashKey | ( | ) | const |
Returns the name of the stash key where "success" status messages are loaded when load() is called. Defaults to status_msg.
Definition at line 87 of file statusmessage.cpp.
Referenced by setStatusMsgStashKey().
|
static |
Saves an status message returning query parameters with the generated message id (mid) and it's token
Definition at line 190 of file statusmessage.cpp.
References QMap::insert(), and Cutelyst::Session::setValue().
| QString StatusMessage::tokenParam | ( | ) | const |
Returns the name of the URL param that holds the token on the page where you want to retrieve/display the status message.
Definition at line 75 of file statusmessage.cpp.
Referenced by setTokenParam().
1.8.6