cutelyst  3.9.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
renderview.h
1 /*
2  * SPDX-FileCopyrightText: (C) 2014-2022 Daniel Nicoletti <dantti12@gmail.com>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef RENDERVIEW_H
6 #define RENDERVIEW_H
7 
8 #include <Cutelyst/action.h>
9 #include <Cutelyst/componentfactory.h>
10 #include <Cutelyst/cutelyst_global.h>
11 
12 namespace Cutelyst {
13 
14 class RenderViewPrivate;
15 class CUTELYST_PLUGIN_ACTION_RENDERVIEW_EXPORT RenderView final : public Action
16 {
17  Q_OBJECT
18  Q_DECLARE_PRIVATE(RenderView)
19 public:
23  explicit RenderView(QObject *parent = nullptr);
24 
28  virtual bool init(Application *application, const QVariantHash &args) override;
29 
30 protected:
31  virtual bool doExecute(Cutelyst::Context *c) override;
32 };
33 
34 class RenderViewFactory final
35  : public QObject
36  , public ComponentFactory
37 {
38  Q_OBJECT
39  Q_PLUGIN_METADATA(IID "org.cutelyst.ComponentFactory" FILE "metadata.json")
41 public:
42  virtual Component *createComponent(QObject *parent) override { return new RenderView(parent); }
43 };
44 
45 } // namespace Cutelyst
46 
47 #endif // RENDERVIEW_H
virtual Component * createComponent(QObject *parent) override
Definition: renderview.h:42
Sensible default end action.
Definition: renderview.h:15
The Cutelyst Component base class.
Definition: component.h:25
This class represents a Cutelyst Action.
Definition: action.h:34
The Cutelyst Context.
Definition: context.h:38
Q_OBJECTQ_OBJECT
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:7
Q_INTERFACES(...)
The Cutelyst Application.
Definition: application.h:42
QObject * parent() const const