110 [[nodiscard]]
bool error() const noexcept;
127 [[nodiscard]]
bool state() const noexcept;
138 [[nodiscard]] Engine *
engine() const noexcept;
143 [[nodiscard]] Application *
app() const noexcept;
158 [[nodiscard]] Action *
action() const noexcept;
173 [[nodiscard]]
QString ns() const noexcept;
199 [[nodiscard]] Controller *
controller() const noexcept;
217 [[nodiscard]]
View *customView() const noexcept;
253 void stash(const QVariantHash &unite);
266 [[nodiscard]] QVariantHash &stash();
290 bool stashRemove(const
QString &key);
319 [[nodiscard]]
QUrl uriFor(const
QString &path = {},
334 [[nodiscard]]
inline QUrl uriFor(
const QString &path,
const ParamsMultiMap &queryValues)
const;
345 [[nodiscard]] QUrl uriFor(Action *action,
346 const QStringList &captures = {},
347 const QStringList &args = {},
355 [[nodiscard]]
inline QUrl uriFor(Action *action,
const ParamsMultiMap &queryValues)
const;
380 [[nodiscard]] QUrl uriForAction(QStringView path,
381 const QStringList &captures = {},
382 const QStringList &args = {},
388 [[nodiscard]]
inline QUrl uriForAction(QStringView path,
389 const ParamsMultiMap &queryValues)
const;
395 bool detached() const noexcept;
404 void detach(Action *action =
nullptr);
421 void detachAsync() noexcept;
449 bool forward(Component *component);
469 bool forward(QStringView action);
474 [[nodiscard]] Action *getAction(QStringView action, QStringView ns = {})
const;
479 [[nodiscard]] QVector<Action *> getActions(QStringView action, QStringView ns = {})
const;
484 [[nodiscard]] QVector<Plugin *> plugins()
const;
489 template <
typename T>
492 const auto pluginsConst =
plugins();
493 for (Plugin *pluginPtr : pluginsConst) {
516 [[nodiscard]]
QLocale locale() const noexcept;
535 void setLocale(const
QLocale &locale);
554 [[nodiscard]] QVariantMap config() const noexcept;
571 [[nodiscard]]
QString translate(const
char *context,
572 const
char *sourceText,
573 const
char *disambiguation =
nullptr,
612 [[nodiscard]] inline
QString qtTrId(const
char *
id,
int n = -1) const;
625 explicit Context(ContextPrivate *priv);
627 friend class Application;
629 friend class ActionREST;
630 friend class ActionChain;
631 friend class DispatchType;
634 friend class Controller;
636 ContextPrivate *d_ptr;
639 Q_DECLARE_PRIVATE(Context)
QStringList errors() const noexcept
QVector< Plugin * > plugins() const
Context(Application *app)
void setState(bool state) noexcept
QUrl uriFor(const QString &path={}, const QStringList &args={}, const ParamsMultiMap &queryValues={}) const
Response * res() const noexcept
QString translate(const char *context, const char *sourceText, const char *disambiguation=nullptr, int n=-1) const
QString qtTrId(const char *id, int n=-1) const
Dispatcher * dispatcher() const noexcept
Application * app() const noexcept
View * view(QStringView name={}) const
QUrl uriForAction(QStringView path, const QStringList &captures={}, const QStringList &args={}, const ParamsMultiMap &queryValues={}) const
void appendError(const QString &error)
Engine * engine() const noexcept
bool error() const noexcept
Response * response() const noexcept