Cutelyst  1.6.0
Public Member Functions | Properties | List of all members
Cutelyst::ClearSilver Class Reference
Inheritance diagram for Cutelyst::ClearSilver:
Inheritance graph
[legend]

Public Member Functions

 ClearSilver (QObject *parent=nullptr)
 Constructs a ClearSilver object with the given parent.
 
 ClearSilver (QObject *parent=nullptr, const QString &name=QString())
 Constructs a ClearSilver object with the given parent and name.
 
QStringList includePaths () const
 Returns the list of include paths.
 
QByteArray render (Context *c) const final
 
void setIncludePaths (const QStringList &paths)
 Sets the list of include paths which will be looked for when resolving templates files.
 
void setTemplateExtension (const QString &extension)
 Sets the template extension, defaults to ".html".
 
void setWrapper (const QString &name)
 Sets the template wrapper name, the template will be rendered into content variable in which the wrapper template should render.
 
QString templateExtension () const
 Returns the template extension.
 
QString wrapper () const
 Returns the template wrapper.
 
- Public Member Functions inherited from Cutelyst::View
 View (QObject *parent, const QString &name=QString())
 
virtual Modifiers modifiers () const override
 
QString name () const
 
- Public Member Functions inherited from Cutelyst::Component
 Component (QObject *parent=nullptr)
 
bool execute (Context *c)
 
virtual bool init (Application *application, const QVariantHash &args)
 
QString name () const
 
QString reverse () const
 
void setName (const QString &name)
 
void setReverse (const QString &reverse)
 

Properties

QStringList includePaths
 
QString templateExtension
 
QString wrapper
 

Additional Inherited Members

- Public Types inherited from Cutelyst::Component
enum  Modifier {
  None, OnlyExecute, BeforeExecute, AroundExecute,
  AfterExecute
}
 
- Protected Member Functions inherited from Cutelyst::Component
virtual bool afterExecute (Context *c)
 
void applyRoles (const QStack< Component * > &roles)
 
virtual bool aroundExecute (Context *c, QStack< Component * > stack)
 
virtual bool beforeExecute (Context *c)
 
virtual bool dispatcherReady (const Dispatcher *dispatch, Controller *controller)
 

Detailed Description

Definition at line 30 of file clearsilver.h.

Member Function Documentation

QByteArray Cutelyst::ClearSilver::render ( Context c) const
finalvirtual

All subclasses must reimplement this when doing it's rendering. If an error (c->error()) is not set c->response()->body() is defined with the returned value, this is useful if the view is not meant to be used as a body.

Implements Cutelyst::View.