Cutelyst  1.7.0
clearsilver.h
1 /*
2  * Copyright (C) 2013-2017 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 Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 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  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public License
15  * along with this library; see the file COPYING.LIB. If not, write to
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301, USA.
18  */
19 #ifndef CLEARSILVER_H
20 #define CLEARSILVER_H
21 
22 #include <QObject>
23 #include <QStringList>
24 
25 #include <Cutelyst/View>
26 
27 namespace Cutelyst {
28 
29 class ClearSilverPrivate;
30 class CUTELYST_VIEW_CLEARSILVER_EXPORT ClearSilver : public View
31 {
32  Q_OBJECT
33  Q_DECLARE_PRIVATE(ClearSilver)
34 public:
38  // TODO Cutelyst2 remove
39  explicit ClearSilver(QObject *parent = nullptr);
40 
44  explicit ClearSilver(QObject *parent = nullptr, const QString &name = QString());
45  ~ClearSilver();
46 
47  Q_PROPERTY(QStringList includePaths READ includePaths WRITE setIncludePaths)
51  QStringList includePaths() const;
52 
56  void setIncludePaths(const QStringList &paths);
57 
58  Q_PROPERTY(QString templateExtension READ templateExtension WRITE setTemplateExtension)
62  QString templateExtension() const;
63 
67  void setTemplateExtension(const QString &extension);
68 
69  Q_PROPERTY(QString wrapper READ wrapper WRITE setWrapper)
73  QString wrapper() const;
74 
79  void setWrapper(const QString &name);
80 
81  QByteArray render(Context *c) const final;
82 
83 protected:
84  ClearSilverPrivate *d_ptr;
85 };
86 
87 }
88 
89 #endif // CLEARSILVER_H
The Cutelyst Context.
Definition: context.h:52
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:7
Cutelyst View abstract view component
Definition: view.h:35