5 #include <TActionHelper>
7 #include <THttpRequest>
8 #include <THttpUtility>
20 QString yield()
const;
21 QString renderPartial(
const QString &templateName,
const QVariantMap &vars = QVariantMap())
const;
22 QString authenticityToken()
const;
23 QVariant variant(
const QString &name)
const;
24 bool hasVariant(
const QString &name)
const;
25 const QVariantMap &allVariants()
const;
31 QString echo(
const QString &str);
32 QString echo(
const char *str);
33 QString echo(
const QByteArray &str);
34 QString echo(
int n,
int base = 10);
35 QString echo(
long n,
int base = 10);
36 QString echo(ulong n,
int base = 10);
37 QString echo(qlonglong n,
int base = 10);
38 QString echo(qulonglong n,
int base = 10);
39 QString echo(
double d,
char format =
'g',
int precision = 6);
40 QString echo(
const QJsonObject &
object);
41 QString echo(
const QJsonArray &array);
42 QString echo(
const QJsonDocument &doc);
44 QString echo(
const QVariant &var);
45 QString echo(
const QVariantMap &map);
46 QString eh(
const QString &str);
47 QString eh(
const char *str);
48 QString eh(
const QByteArray &str);
49 QString eh(
int n,
int base = 10);
50 QString eh(
long n,
int base = 10);
51 QString eh(ulong n,
int base = 10);
52 QString eh(qlonglong n,
int base = 10);
53 QString eh(qulonglong n,
int base = 10);
54 QString eh(
double d,
char format =
'g',
int precision = 6);
55 QString eh(
const QJsonObject &
object);
56 QString eh(
const QJsonArray &array);
57 QString eh(
const QJsonDocument &doc);
59 QString eh(
const QVariant &var);
60 QString eh(
const QVariantMap &map);
61 QString renderReact(
const QString &component);
69 void setVariantMap(
const QVariantMap &vars);
76 QVariantMap variantMap;
80 friend class TDirectView;
84 inline void TActionView::setSubActionView(
TActionView *actionView)
91 return actionController;
94 inline void TActionView::setVariantMap(
const QVariantMap &vars)
101 return variantMap.value(name);
106 return variantMap.contains(name);
170 return echo(QJsonDocument(
object));
175 return echo(QJsonDocument(array));
231 return eh(QJsonDocument(
object));
236 return eh(QJsonDocument(array));
The TAbstractController class is the abstract base class of controllers, providing functionality comm...
Definition: tabstractcontroller.h:13
The TActionController class is the base class of all action controllers.
Definition: tactioncontroller.h:21
The TActionHelper class is the base class of all helpers.
Definition: tactionhelper.h:12
virtual const TAbstractController * controller() const =0
The TActionMailer class provides a mail client on action controller.
Definition: tactionmailer.h:6
The TActionView class is the abstract base class of views, providing functionality common to view.
Definition: tactionview.h:14
QString echo(const QString &str)
Outputs the string str to a view template.
Definition: tactionview.h:114
virtual QString toString()=0
This function is reimplemented in subclasses to return a string to render a view.
const TAbstractController * controller() const override
Definition: tactionview.h:89
virtual ~TActionView()
Definition: tactionview.h:17
const QVariantMap & allVariants() const
Definition: tactionview.h:109
QString eh(const QString &str)
Outputs a escaped string of the str to a view template.
Definition: tactionview.h:184
QString responsebody
Definition: tactionview.h:63
bool hasVariant(const QString &name) const
Returns true if the QVariantMap variable for a view contains an item with the name; otherwise returns...
Definition: tactionview.h:104
QVariant variant(const QString &name) const
Returns the value associated with the name in the QVariantMap variable for a view.
Definition: tactionview.h:99
The THtmlAttribute class represents HTML attributes for customizing web elements.
Definition: thtmlattribute.h:7
The THttpRequest class contains request information for HTTP.
Definition: thttprequest.h:34
static QString htmlEscape(const QString &input, Tf::EscapeFlag flag=Tf::Quotes)
Returns a converted copy of input.
Definition: thttputility.cpp:140
The TViewHelper class provides some functionality for views.
Definition: tviewhelper.h:15
virtual const TActionView * actionView() const =0
Must be overridden by subclasses to return the current action view.
#define T_CORE_EXPORT
Definition: tdeclexport.h:28
#define T_DISABLE_COPY(Class)
Definition: tdeclexport.h:37
#define T_DISABLE_MOVE(Class)
Definition: tdeclexport.h:41