Cutelyst  2.3.0
clearsilver.h
1 /*
2  * Copyright (C) 2013-2018 Daniel Nicoletti <dantti12@gmail.com>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2.1 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
17  */
18 #ifndef CLEARSILVER_H
19 #define CLEARSILVER_H
20 
21 #include <QObject>
22 #include <QStringList>
23 
24 #include <Cutelyst/View>
25 
26 namespace Cutelyst {
27 
28 class ClearSilverPrivate;
29 class CUTELYST_VIEW_CLEARSILVER_EXPORT ClearSilver : public View
30 {
31  Q_OBJECT
32  Q_DECLARE_PRIVATE(ClearSilver)
33 public:
37  explicit ClearSilver(QObject *parent = nullptr, const QString &name = QString());
38  ~ClearSilver();
39 
40  Q_PROPERTY(QStringList includePaths READ includePaths WRITE setIncludePaths NOTIFY changed)
44  QStringList includePaths() const;
45 
49  void setIncludePaths(const QStringList &paths);
50 
51  Q_PROPERTY(QString templateExtension READ templateExtension WRITE setTemplateExtension NOTIFY changed)
55  QString templateExtension() const;
56 
60  void setTemplateExtension(const QString &extension);
61 
62  Q_PROPERTY(QString wrapper READ wrapper WRITE setWrapper NOTIFY changed)
66  QString wrapper() const;
67 
72  void setWrapper(const QString &name);
73 
74  QByteArray render(Context *c) const final;
75 
76 Q_SIGNALS:
77  void changed();
78 
79 protected:
80  ClearSilverPrivate *d_ptr;
81 };
82 
83 }
84 
85 #endif // CLEARSILVER_H
The Cutelyst Context.
Definition: context.h:50
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:7
Cutelyst View abstract view component
Definition: view.h:33