47 Q_PROPERTY(
Action *action READ action CONSTANT)
51 Q_PROPERTY(
QString actionName READ actionName CONSTANT)
61 Q_PROPERTY(
QString namespace READ ns CONSTANT)
66 Q_PROPERTY(
Request *req READ request CONSTANT)
71 Q_PROPERTY(
Request *request READ request CONSTANT)
75 Q_PROPERTY(
Controller *controller READ controller CONSTANT)
79 Q_PROPERTY(
QString controllerName READ controllerName CONSTANT)
86 Q_PROPERTY(QVariantMap config READ config CONSTANT)
90 Q_PROPERTY(
bool state READ state CONSTANT)
110 [[nodiscard]]
bool error() const noexcept;
116 void appendError(const
QString &error);
127 [[nodiscard]]
bool state() const noexcept;
133 void setState(
bool state) noexcept;
138 [[nodiscard]]
Engine *engine() const noexcept;
148 [[nodiscard]]
Response *response() const noexcept;
153 [[nodiscard]]
Response *res() const noexcept;
158 [[nodiscard]]
Action *action() const noexcept;
163 [[nodiscard]]
QString actionName() const noexcept;
173 [[nodiscard]]
QString ns() const noexcept;
179 [[nodiscard]]
Request *request() const noexcept;
184 [[nodiscard]]
Request *req() const noexcept;
189 [[nodiscard]]
Dispatcher *dispatcher() const noexcept;
194 [[nodiscard]]
QString controllerName() 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,
355 [[nodiscard]]
inline QUrl uriFor(Action *action,
const ParamsMultiMap &queryValues)
const;
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);
489 template <
typename T>
492 const auto pluginsConst = plugins();
493 for (
Plugin *plugin : pluginsConst) {
494 auto p = qobject_cast<T>(plugin);
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 Context(ContextPrivate *priv);
627 friend class Application;
629 friend class ActionChain;
630 friend class DispatchType;
633 friend class Controller;
635 ContextPrivate *d_ptr;
638 Q_DECLARE_PRIVATE(Context)