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

Signals

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
 
void setMinimalSizeToDeflate (qint32 minSize=-1)
 
- 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::View
 View (ViewPrivate *d, QObject *parent, const QString &name)
 A derived class using pimpl should call this constructor, to reduce the number of memory allocations.
 
- Protected Member Functions inherited from Cutelyst::Component
 Component (ComponentPrivate *d, QObject *parent=nullptr)
 A derived class using pimpl should call this constructor, to reduce the number of memory allocations.
 
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
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.

Definition at line 86 of file clearsilver.cpp.

References Cutelyst::Context::error(), Cutelyst::Component::reverse(), and Cutelyst::Context::stash().