cutelyst  4.5.1
A C++ Web Framework built on top of Qt, using the simple approach of Catalyst (Perl) framework.
viewemailtemplate.h
1 /*
2  * SPDX-FileCopyrightText: (C) 2015-2022 Daniel Nicoletti <dantti12@gmail.com>
3  * SPDX-License-Identifier: BSD-3-Clause
4  */
5 #ifndef VIEWEMAILTEMPLATE_H
6 #define VIEWEMAILTEMPLATE_H
7 
8 #include <Cutelyst/Plugins/View/Email/viewemail.h>
9 
10 #include <QObject>
11 
12 namespace Cutelyst {
13 
14 class ViewEmailTemplatePrivate;
25 class CUTELYST_VIEW_EMAIL_EXPORT ViewEmailTemplate final : public ViewEmail
26 {
27  Q_OBJECT
28  Q_DECLARE_PRIVATE(ViewEmailTemplate)
34  Q_PROPERTY(
35  QString templatePrefix READ templatePrefix WRITE setTemplatePrefix NOTIFY changedProp)
39  Q_PROPERTY(QString defaultView READ defaultView WRITE setDefaultView NOTIFY changedProp)
40 public:
47  explicit ViewEmailTemplate(QObject *parent, const QString &name = QString());
48 
55  [[nodiscard]] QString templatePrefix() const;
56 
63  void setTemplatePrefix(const QString &prefix);
64 
69  [[nodiscard]] QString defaultView() const;
70 
80  void setDefaultView(const QString &view);
81 
82  QByteArray render(Context *c) const override;
83 
84 Q_SIGNALS:
85  void changedProp();
86 };
87 
88 } // namespace Cutelyst
89 
90 #endif // VIEWEMAILTEMPLATE_H
The Cutelyst Context.
Definition: context.h:42
A view that renders stash data using another view and sends it via e-mail.
A view that sends stash data via e-mail.
Definition: viewemail.h:24
The Cutelyst namespace holds all public Cutelyst API.