5 #ifndef CUTELYST_APPLICATION_H 6 #define CUTELYST_APPLICATION_H 8 #include <QtCore/QObject> 9 #include <QtCore/QVariant> 10 #include <QtCore/QLocale> 11 #include <QtCore/QVector> 13 #include <Cutelyst/cutelyst_global.h> 19 #define CUTELYST_APPLICATION(x) \ 20 Q_PLUGIN_METADATA(x) \ 21 Q_INTERFACES(Cutelyst::Application) 35 class ApplicationPrivate;
101 template <
typename T>
104 const auto pluginsConst = plugins();
105 for (
Plugin *plugin : pluginsConst) {
106 auto p = qobject_cast<T>(plugin);
118 QVariantMap config() const noexcept;
133 bool inited() const noexcept;
138 Engine *engine() const noexcept;
149 static const
char *cutelystVersion() noexcept;
212 QString translate(const
QLocale &locale, const
char *context, const
char *sourceText, const
char *disambiguation =
nullptr,
int n = -1) const;
324 virtual
bool postFork();
331 Headers &defaultHeaders() noexcept;
336 void addXCutelystVersionHeader();
345 bool registerPlugin(
Plugin *plugin);
357 bool registerController(
Controller *controller);
366 bool registerView(
View *view);
431 bool setup(
Engine *engine);
441 bool enginePostFork();
443 ApplicationPrivate *d_ptr;
448 #define CutelystApplicationInterface_iid "org.cutelyst.CutelystApplicationInterface" 452 #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.