Cutelyst  1.5.0
clearsilver.h
1 /*
2  * Copyright (C) 2013-2016 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 
20 #ifndef CLEARSILVER_H
21 #define CLEARSILVER_H
22 
23 #include <QObject>
24 #include <QStringList>
25 
26 #include <Cutelyst/View>
27 
28 namespace Cutelyst {
29 
30 class ClearSilverPrivate;
31 class CUTELYST_VIEW_CLEARSILVER_EXPORT ClearSilver : public View
32 {
33  Q_OBJECT
34  Q_DECLARE_PRIVATE(ClearSilver)
35 public:
36  Q_INVOKABLE explicit ClearSilver(QObject *parent = nullptr);
37  ~ClearSilver();
38 
39  Q_PROPERTY(QStringList includePaths READ includePaths WRITE setIncludePaths)
40  QStringList includePaths() const;
41  void setIncludePaths(const QStringList &paths);
42 
43  Q_PROPERTY(QString templateExtension READ templateExtension WRITE setTemplateExtension)
44  QString templateExtension() const;
45  void setTemplateExtension(const QString &extension);
46 
47  Q_PROPERTY(QString wrapper READ wrapper WRITE setWrapper)
48  QString wrapper() const;
49  void setWrapper(const QString &name);
50 
51  QByteArray render(Context *c) const final;
52 
53 protected:
54  ClearSilverPrivate *d_ptr;
55 };
56 
57 }
58 
59 #endif // CLEARSILVER_H
The Cutelyst Context.
Definition: context.h:52
The Cutelyst namespace holds all public Cutelyst API.
Definition: Mainpage.dox:7