5 #ifndef CUTELYST_APPLICATION_H
6 #define CUTELYST_APPLICATION_H
8 #include <Cutelyst/cutelyst_export.h>
10 #include <QtCore/QLocale>
11 #include <QtCore/QObject>
12 #include <QtCore/QVariant>
13 #include <QtCore/QVector>
19 #define CUTELYST_APPLICATION(x) \
20 Q_PLUGIN_METADATA(x) \
21 Q_INTERFACES(Cutelyst::Application)
35 class ApplicationPrivate;
136 template <
typename T>
139 const auto pluginsConst = plugins();
140 for (
Plugin *plugin : pluginsConst) {
141 auto p = qobject_cast<T>(plugin);
159 QVariantMap config() const noexcept;
181 bool inited() const noexcept;
186 Engine *engine() const noexcept;
197 static const
char *cutelystVersion() noexcept;
279 const
char *sourceText,
280 const
char *disambiguation =
nullptr,
315 void loadTranslations(const
QString &filename,
355 const QString &prefix = QStringLiteral(
"."),
356 const QString &suffix = QStringLiteral(
".qm"));
394 [[nodiscard]]
QLocale defaultLocale() const noexcept;
404 void setDefaultLocale(const
QLocale &locale);
441 virtual
bool postFork();
448 Headers &defaultHeaders() noexcept;
453 void addXCutelystVersionHeader();
462 bool registerPlugin(Plugin *plugin);
474 bool registerController(Controller *controller);
483 bool registerView(View *view);
489 bool registerDispatcher(DispatchType *dispatcher);
552 bool setup(
Engine *engine);
562 bool enginePostFork();
564 ApplicationPrivate *d_ptr;
569 #define CutelystApplicationInterface_iid "org.cutelyst.CutelystApplicationInterface"
The Cutelyst application.
The Cutelyst Component base class.
Base class for Cutelyst Plugins.
Abstract View component for Cutelyst.
The Cutelyst namespace holds all public Cutelyst API.