cutelyst 4.3.0
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
12namespace Cutelyst {
13
14class RenderViewPrivate;
15class CUTELYST_PLUGIN_ACTION_RENDERVIEW_EXPORT RenderView final : public Action
16{
17 Q_OBJECT
18 Q_DECLARE_PRIVATE(RenderView)
19public:
23 explicit RenderView(QObject *parent = nullptr);
24
30 bool init(Application *application, const QVariantHash &args) override;
31
32protected:
45 bool doExecute(Cutelyst::Context *c) override;
46};
47
49 : public QObject
50 , public ComponentFactory
51{
53 Q_PLUGIN_METADATA(IID "org.cutelyst.ComponentFactory" FILE "metadata.json")
55public:
56 virtual Component *createComponent(QObject *parent) override { return new RenderView(parent); }
57};
58
59} // namespace Cutelyst
60
61#endif // RENDERVIEW_H
This class represents a Cutelyst Action.
Definition action.h:36
The Cutelyst application.
Definition application.h:66
The Cutelyst Component base class.
Definition component.h:30
The Cutelyst Context.
Definition context.h:42
virtual Component * createComponent(QObject *parent) override
Definition renderview.h:56
Sensible default end action that forwards to a View.
Definition renderview.h:16
The Cutelyst namespace holds all public Cutelyst API.
Q_INTERFACES(...)
Q_OBJECTQ_OBJECT
QObject * parent() const const