Cutelyst  2.5.0
Signals | Public Member Functions | Properties | List of all members
Cutelyst::ClearSilver Class Reference
Inheritance diagram for Cutelyst::ClearSilver:
Inheritance graph


void changed ()

Public Member Functions

 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)
virtual Modifiers modifiers () const override
- 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)


QStringList includePaths
QString templateExtension
QString wrapper

Additional Inherited Members

- Public Types inherited from Cutelyst::Component
enum  Modifier {
  None, OnlyExecute, BeforeExecute, AroundExecute,
- 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 29 of file clearsilver.h.

Member Function Documentation

◆ render()

QByteArray ClearSilver::render ( Context c) const

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.

Definition at line 92 of file clearsilver.cpp.

References Cutelyst::Context::error(), Cutelyst::Component::name(), Cutelyst::Context::res(), Cutelyst::Component::reverse(), Cutelyst::Response::setBody(), and Cutelyst::Context::stash().