MagicSmoke  $VERSION$
stick.h
Go to the documentation of this file.
1 //
2 // C++ Interface: Stick Renderer
3 //
4 // Description: Stick Renderer for Qt, implements a twig-like syntax
5 //
6 //
7 // Author: Konrad Rosenbaum <konrad@silmor.de>, (C) 2016
8 //
9 // Copyright: See README/COPYING.GPL files that come with this distribution
10 //
11 //
12 
13 #ifndef MAGICSMOKE_STICK_H
14 #define MAGICSMOKE_STICK_H
15 
16 #include <QObject>
17 #include <QVariant>
18 #include <QMap>
19 #include <QStringList>
20 
21 #include "commonexport.h"
22 
23 class MStickToken;
24 namespace ELAM {class Engine;}
25 
28 {
29 public:
33  virtual ~MStickRenderer();
34 
36  virtual void setTemplateFile(QString filename);
38  virtual void setTemplate(QString text);
39 
41  virtual void setProperty(QString name,QVariant value);
43  virtual void setProperties(QMap<QString,QVariant>properties);
45  virtual void removeProperty(QString name);
46 
48  virtual QVariant property(QString name)const;
50  virtual QStringList propertyNames()const;
51 
53  virtual QString render();
54 
55 private:
56  QMap<QString,QVariant>mproperties;
57  MStickToken*mtemplate=nullptr;
58 
60  void initEngine(ELAM::Engine&);
61 };
62 
63 #endif
#define MAGICSMOKE_COMMON_EXPORT
Definition: commonexport.h:7
A Twig-like renderer for HTML pages or other text based documents.
Definition: stick.h:27
Definition: stick_p.h:24
Definition: stick.h:24