5 #ifndef CUTELYST_APPLICATION_H 6 #define CUTELYST_APPLICATION_H 8 #include <Cutelyst/cutelyst_global.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;
106 template <
typename T>
109 const auto pluginsConst = plugins();
110 for (
Plugin *plugin : pluginsConst) {
111 auto p = qobject_cast<T>(plugin);
123 QVariantMap config() const noexcept;
138 bool inited() const noexcept;
143 Engine *engine() const noexcept;
154 static const
char *cutelystVersion() noexcept;
219 const
char *sourceText,
220 const
char *disambiguation =
nullptr,
251 void loadTranslations(const
QString &filename,
287 const
QString &prefix = QStringLiteral("."),
288 const
QString &suffix = QStringLiteral(".qm"));
350 virtual
bool postFork();
357 Headers &defaultHeaders() noexcept;
362 void addXCutelystVersionHeader();
371 bool registerPlugin(
Plugin *plugin);
383 bool registerController(
Controller *controller);
392 bool registerView(
View *view);
457 bool setup(
Engine *engine);
467 bool enginePostFork();
469 ApplicationPrivate *d_ptr;
474 #define CutelystApplicationInterface_iid "org.cutelyst.CutelystApplicationInterface" 478 #endif // CUTELYST_APPLICATION_H
T plugin()
Returns the registered plugin that casts to the template type T.
The Cutelyst Component base class.
Cutelyst Controller base class
The Cutelyst namespace holds all public Cutelyst API.
Cutelyst View abstract view component
The Cutelyst Application.