TreeFrogFramework  2.8
Public Member Functions | Protected Member Functions | List of all members
TViewHelper Class Referenceabstract

#include <tviewhelper.h>

Inheritance diagram for TViewHelper:
Inheritance graph
[legend]

Public Member Functions

virtual ~TViewHelper ()
 
QString linkTo (const QString &text, const QUrl &url, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString linkTo (const QString &text, const QUrl &url, Tf::HttpMethod method, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString linkTo (const QString &text, const QUrl &url, Tf::HttpMethod method, const QString &jsCondition, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString linkToPopup (const QString &text, const QUrl &url, const QString &windowTitle=QString(), const QSize &size=QSize(), const QPoint &topLeft=QPoint(), const QString &windowStyle=QString(), const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString linkToIf (bool condition, const QString &text, const QUrl &url, Tf::HttpMethod method=Tf::Get, const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString linkToUnless (bool condition, const QString &text, const QUrl &url, Tf::HttpMethod method=Tf::Get, const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString linkToFunction (const QString &text, const QString &function, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString buttonToFunction (const QString &text, const QString &function, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchor (const QString &text, const QUrl &url, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchor (const QString &text, const QUrl &url, Tf::HttpMethod method, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchor (const QString &text, const QUrl &url, Tf::HttpMethod method=Tf::Get, const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchorPopup (const QString &text, const QUrl &url, const QString &windowTitle=QString(), const QSize &size=QSize(), const QPoint &topLeft=QPoint(), const QString &windowStyle=QString(), const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchorIf (bool condition, const QString &text, const QUrl &url, Tf::HttpMethod method=Tf::Get, const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchorUnless (bool condition, const QString &text, const QUrl &url, Tf::HttpMethod method=Tf::Get, const QString &jsCondition=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString anchorFunction (const QString &text, const QString &function, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString formTag (const QUrl &url, Tf::HttpMethod method=Tf::Post, bool multipart=false, const THtmlAttribute &attributes=THtmlAttribute())
 
QString inputTag (const QString &type, const QString &name, const QVariant &value, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inputTextTag (const QString &name, const QVariant &value, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inputFileTag (const QString &name, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inputPasswordTag (const QString &name, const QVariant &value, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inputHiddenTag (const QString &name, const QVariant &value, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString checkBoxTag (const QString &name, const QVariant &value, bool checked=false, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString checkBoxTag (const QString &name, const QString &value, const QStringList &checkedValues, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString checkBoxTag (const QString &name, const QVariant &value, const QVariantList &checkedValues, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString checkBoxTag (const QString &name, const QVariant &value, const QVariant &checkedValue, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString radioButtonTag (const QString &name, const QVariant &value, bool checked=false, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString radioButtonTag (const QString &name, const QVariant &value, const QVariant &checkedValue, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString selectTag (const QString &name, int size=1, bool multiple=false, const THtmlAttribute &attributes=THtmlAttribute())
 
QString optionTag (const QString &text, const QVariant &value, bool selected=false, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString optionTags (const QStringList &valueList, const QVariant &selectedValue=QVariant(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString optionTags (const QVariantList &valueList, const QVariant &selectedValue=QVariant(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString optionTags (const QList< QPair< QString, QVariant >> &valueList, const QVariant &selectedValue=QVariant(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inputAuthenticityTag () const
 
QString textAreaTag (const QString &name, int rows, int cols, const QString &content=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString submitTag (const QString &value, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString submitImageTag (const QString &src, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString resetTag (const QString &value, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString imageTag (const QString &src, const QSize &size=QSize(), const QString &alt=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString imageTag (const QString &src, bool withTimestamp, const QSize &size=QSize(), const QString &alt=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString imageTag (const QString &src, const THtmlAttribute &attributes) const
 
QString inlineImageTag (const QFileInfo &file, const QString &mediaType, const QSize &size=QSize(), const QString &alt=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inlineImageTag (const QFileInfo &file, const QString &mediaType, const THtmlAttribute &attributes) const
 
QString inlineImageTag (const QByteArray &data, const QString &mediaType, const QSize &size=QSize(), const QString &alt=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString inlineImageTag (const QByteArray &data, const QString &mediaType, const THtmlAttribute &attributes) const
 
QString imageLinkTo (const QUrl &url, const QString &src, bool withTimestamp, const QString &alt=QString(), const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString imageLinkTo (const QUrl &url, const QString &src, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString styleSheetTag (const QString &src, const THtmlAttribute &attributes) const
 
QString styleSheetTag (const QString &src, bool withTimestamp=true, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString scriptTag (const QString &src, const THtmlAttribute &attributes) const
 
QString scriptTag (const QString &src, bool withTimestamp=true, const THtmlAttribute &attributes=THtmlAttribute()) const
 
QString tag (const QString &name, const THtmlAttribute &attributes)
 
QString tag (const QString &name, const THtmlAttribute &attributes, bool selfClose)
 
QString tag (const QString &name, const THtmlAttribute &attributes, const QString &content) const
 
QString selfClosingTag (const QString &name, const THtmlAttribute &attributes) const
 
QString endTag (const QString &name) const
 
QString endTag ()
 
QString allEndTags ()
 
QString imagePath (const QString &src, bool withTimestamp=true) const
 
QString cssPath (const QString &src, bool withTimestamp=true) const
 
QString jsPath (const QString &src, bool withTimestamp=true) const
 
QString srcPath (const QString &src, const QString &dir, bool withTimestamp=true) const
 
THtmlAttribute a (const QString &key, const QString &value) const
 
THtmlAttribute a () const
 
void clear ()
 

Protected Member Functions

virtual const TActionViewactionView () const =0
 

Detailed Description

The TViewHelper class provides some functionality for views.

Constructor & Destructor Documentation

◆ ~TViewHelper()

virtual TViewHelper::~TViewHelper ( )
inlinevirtual

Member Function Documentation

◆ a() [1/2]

THtmlAttribute TViewHelper::a ( ) const
inline

Returns a null THtmlAttribute object.

◆ a() [2/2]

THtmlAttribute TViewHelper::a ( const QString &  key,
const QString &  value 
) const

Creates and returns a THtmlAttribute object with key ="value".

◆ actionView()

const TActionView * TViewHelper::actionView ( ) const
protectedpure virtual

Must be overridden by subclasses to return the current action view.

◆ allEndTags()

QString TViewHelper::allEndTags ( )

Returns all end tags if there are buffered tags.

◆ anchor() [1/3]

QString TViewHelper::anchor ( const QString &  text,
const QUrl &  url,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkTo().

◆ anchor() [2/3]

QString TViewHelper::anchor ( const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkTo().

◆ anchor() [3/3]

QString TViewHelper::anchor ( const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method = Tf::Get,
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkTo().

◆ anchorFunction()

QString TViewHelper::anchorFunction ( const QString &  text,
const QString &  function,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkToFunction().

◆ anchorIf()

QString TViewHelper::anchorIf ( bool  condition,
const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method = Tf::Get,
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkToIf().

◆ anchorPopup()

QString TViewHelper::anchorPopup ( const QString &  text,
const QUrl &  url,
const QString &  windowTitle = QString(),
const QSize &  size = QSize(),
const QPoint &  topLeft = QPoint(),
const QString &  windowStyle = QString(),
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkToPopup().

◆ anchorUnless()

QString TViewHelper::anchorUnless ( bool  condition,
const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method = Tf::Get,
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag with the given arguments.

Equivalent to linkToUnless().

◆ buttonToFunction()

QString TViewHelper::buttonToFunction ( const QString &  text,
const QString &  function,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag (type="button") whose onclick handler triggers the passed JavaScript.

◆ checkBoxTag() [1/4]

QString TViewHelper::checkBoxTag ( const QString &  name,
const QString &  value,
const QStringList &  checkedValues,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="checkbox", name="name" and value="value".

If the checkedValues parameter contains the value parameter, this checkbox is checked.

◆ checkBoxTag() [2/4]

QString TViewHelper::checkBoxTag ( const QString &  name,
const QVariant &  value,
bool  checked = false,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="checkbox", name="name" and value="value".

◆ checkBoxTag() [3/4]

QString TViewHelper::checkBoxTag ( const QString &  name,
const QVariant &  value,
const QVariant &  checkedValue,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="checkbox", name="name" and value="value".

If the checkedValue parameter is equal to the value parameter, this checkbox is checked.

◆ checkBoxTag() [4/4]

QString TViewHelper::checkBoxTag ( const QString &  name,
const QVariant &  value,
const QVariantList &  checkedValues,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="checkbox", name="name" and value="value".

If the checkedValues parameter contains the value parameter, this checkbox is checked.

◆ clear()

void TViewHelper::clear ( )

◆ cssPath()

QString TViewHelper::cssPath ( const QString &  src,
bool  withTimestamp = true 
) const

Returns a css path to src.

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/css directory.

◆ endTag() [1/2]

QString TViewHelper::endTag ( )

Returns an end tag if there is a buffered tags.

◆ endTag() [2/2]

QString TViewHelper::endTag ( const QString &  name) const

Creates a end-tag of name.

◆ formTag()

QString TViewHelper::formTag ( const QUrl &  url,
Tf::HttpMethod  method = Tf::Post,
bool  multipart = false,
const THtmlAttribute attributes = THtmlAttribute() 
)

Creates a form tag that points to an url.

If multipart is true, this function creates a form tag of multipart/form-data.

◆ imageLinkTo() [1/2]

QString TViewHelper::imageLinkTo ( const QUrl &  url,
const QString &  src,
bool  withTimestamp,
const QString &  alt = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag of a given url with a <img> tag of src="src".

◆ imageLinkTo() [2/2]

QString TViewHelper::imageLinkTo ( const QUrl &  url,
const QString &  src,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag of a given url with a <img> tag of src="src".

◆ imagePath()

QString TViewHelper::imagePath ( const QString &  src,
bool  withTimestamp = true 
) const

Returns a image path to src.

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/images directory.

◆ imageTag() [1/3]

QString TViewHelper::imageTag ( const QString &  src,
bool  withTimestamp,
const QSize &  size = QSize(),
const QString &  alt = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <img> image tag with src="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/images directory. If withTimestamp is true, the timestamp of the image file is append to src as a query parameter.

◆ imageTag() [2/3]

QString TViewHelper::imageTag ( const QString &  src,
const QSize &  size = QSize(),
const QString &  alt = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <img> image tag with src="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/images directory.

◆ imageTag() [3/3]

QString TViewHelper::imageTag ( const QString &  src,
const THtmlAttribute attributes 
) const
inline

Creates a <img> image tag with src="src".

◆ inlineImageTag() [1/4]

QString TViewHelper::inlineImageTag ( const QByteArray &  data,
const QString &  mediaType,
const QSize &  size = QSize(),
const QString &  alt = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

◆ inlineImageTag() [2/4]

QString TViewHelper::inlineImageTag ( const QByteArray &  data,
const QString &  mediaType,
const THtmlAttribute attributes 
) const
inline

Creates a inline image tag with data and mediaType.

◆ inlineImageTag() [3/4]

QString TViewHelper::inlineImageTag ( const QFileInfo &  file,
const QString &  mediaType,
const QSize &  size = QSize(),
const QString &  alt = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

◆ inlineImageTag() [4/4]

QString TViewHelper::inlineImageTag ( const QFileInfo &  file,
const QString &  mediaType,
const THtmlAttribute attributes 
) const
inline

◆ inputAuthenticityTag()

QString TViewHelper::inputAuthenticityTag ( ) const

Creates a input tag with a authenticity token for CSRF protection.

◆ inputFileTag()

QString TViewHelper::inputFileTag ( const QString &  name,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a input tag with type="file", name="name".

This function overloads inputTag().

◆ inputHiddenTag()

QString TViewHelper::inputHiddenTag ( const QString &  name,
const QVariant &  value,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a input tag with type="hidden", name="name" and value="value".

This function overloads inputTag().

◆ inputPasswordTag()

QString TViewHelper::inputPasswordTag ( const QString &  name,
const QVariant &  value,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a input tag with type="password", name="name" and value="value".

This function overloads inputTag().

◆ inputTag()

QString TViewHelper::inputTag ( const QString &  type,
const QString &  name,
const QVariant &  value,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <input> input tag with type="type", name="name" and value="value".

◆ inputTextTag()

QString TViewHelper::inputTextTag ( const QString &  name,
const QVariant &  value,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a input tag with type="text", name="name" and value="value".

This function overloads inputTag().

◆ jsPath()

QString TViewHelper::jsPath ( const QString &  src,
bool  withTimestamp = true 
) const

Returns a javascript path to src.

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/js directory.

◆ linkTo() [1/3]

QString TViewHelper::linkTo ( const QString &  text,
const QUrl &  url,
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag of the given text using the given URL url and HTML attributes attributes.

◆ linkTo() [2/3]

QString TViewHelper::linkTo ( const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method,
const QString &  jsCondition,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <a> link tag of the given text using the given url.

This is an overloaded function. The jsCondition argument serves for for creating Javascript confirm alerts where if you pass 'confirm' => 'Are you sure?', the link will be guarded with a Javascript popup asking that question. If the user accepts, the link is processed, otherwise not.

◆ linkTo() [3/3]

QString TViewHelper::linkTo ( const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <a> link tag of the given text using the given URL url and HTML attributes attributes.

If method is Tf::Post, the link submits a POST request instead of GET.

◆ linkToFunction()

QString TViewHelper::linkToFunction ( const QString &  text,
const QString &  function,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <a> link tag whose onclick handler triggers the passed JavaScript.

◆ linkToIf()

QString TViewHelper::linkToIf ( bool  condition,
const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method = Tf::Get,
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag of the given text using the given url.

This is an overloaded function. Returns a link tag if condition is true; otherwise returns a null string.

◆ linkToPopup()

QString TViewHelper::linkToPopup ( const QString &  text,
const QUrl &  url,
const QString &  windowTitle = QString(),
const QSize &  size = QSize(),
const QPoint &  topLeft = QPoint(),
const QString &  windowStyle = QString(),
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <a> link tag of the given text using a given URL url in a popup window with the name windowName.

◆ linkToUnless()

QString TViewHelper::linkToUnless ( bool  condition,
const QString &  text,
const QUrl &  url,
Tf::HttpMethod  method = Tf::Get,
const QString &  jsCondition = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const
inline

Creates a <a> link tag of the given text using the given url.

This is an overloaded function. Returns a link tag if condition is false; otherwise returns a null string.

◆ optionTag()

QString TViewHelper::optionTag ( const QString &  text,
const QVariant &  value,
bool  selected = false,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a option tag for a select tag;.

◆ optionTags() [1/3]

QString TViewHelper::optionTags ( const QList< QPair< QString, QVariant >> &  valueList,
const QVariant &  selectedValue = QVariant(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates option tags for a select tag;.

◆ optionTags() [2/3]

QString TViewHelper::optionTags ( const QStringList &  valueList,
const QVariant &  selectedValue = QVariant(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates option tags for a select tag; The option tag which value is equal to selectedValue parameter is selected.

◆ optionTags() [3/3]

QString TViewHelper::optionTags ( const QVariantList &  valueList,
const QVariant &  selectedValue = QVariant(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates option tags for a select tag; The option tag which value is equal to selectedValue parameter is selected.

◆ radioButtonTag() [1/2]

QString TViewHelper::radioButtonTag ( const QString &  name,
const QVariant &  value,
bool  checked = false,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="radio", name="name" and value="value".

◆ radioButtonTag() [2/2]

QString TViewHelper::radioButtonTag ( const QString &  name,
const QVariant &  value,
const QVariant &  checkedValue,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="radio", name="name" and value="value".

If the checkedValue parameter is equal to the value parameter, this radio button is checked.

◆ resetTag()

QString TViewHelper::resetTag ( const QString &  value,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="reset" and value="value".

◆ scriptTag() [1/2]

QString TViewHelper::scriptTag ( const QString &  src,
bool  withTimestamp = true,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <script> script tag with src="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/js directory.

◆ scriptTag() [2/2]

QString TViewHelper::scriptTag ( const QString &  src,
const THtmlAttribute attributes 
) const

Creates a <script> script tag with src="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/js directory.

◆ selectTag()

QString TViewHelper::selectTag ( const QString &  name,
int  size = 1,
bool  multiple = false,
const THtmlAttribute attributes = THtmlAttribute() 
)

Creates a select tag with name="name".

◆ selfClosingTag()

QString TViewHelper::selfClosingTag ( const QString &  name,
const THtmlAttribute attributes 
) const

Creates a self closing tag of name with the given HTML attributes attributes.

◆ srcPath()

QString TViewHelper::srcPath ( const QString &  src,
const QString &  dir,
bool  withTimestamp = true 
) const

Returns a path to src.

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public directory.

◆ styleSheetTag() [1/2]

QString TViewHelper::styleSheetTag ( const QString &  src,
bool  withTimestamp = true,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <link> link tag for a style sheet with href="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/css directory.

◆ styleSheetTag() [2/2]

QString TViewHelper::styleSheetTag ( const QString &  src,
const THtmlAttribute attributes 
) const

Creates a <link> link tag for a style sheet with href="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/css directory.

◆ submitImageTag()

QString TViewHelper::submitImageTag ( const QString &  src,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="image" and src="src".

The src must be one of URL, a absolute path or a relative path. If src is a relative path, it must exist in the public/images directory.

◆ submitTag()

QString TViewHelper::submitTag ( const QString &  value,
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a input tag with type="submit" and value="value".

◆ tag() [1/3]

QString TViewHelper::tag ( const QString &  name,
const THtmlAttribute attributes 
)

Creates a start-tag of name with the given HTML attributes attributes.

◆ tag() [2/3]

QString TViewHelper::tag ( const QString &  name,
const THtmlAttribute attributes,
bool  selfClose 
)

Creates a start-tag of name with the given HTML attributes attributes.

◆ tag() [3/3]

QString TViewHelper::tag ( const QString &  name,
const THtmlAttribute attributes,
const QString &  content 
) const

Creates an HTML element composed of a start-tag of name with HTML attributes attributes, a content content and an end-tag.

◆ textAreaTag()

QString TViewHelper::textAreaTag ( const QString &  name,
int  rows,
int  cols,
const QString &  content = QString(),
const THtmlAttribute attributes = THtmlAttribute() 
) const

Creates a <textarea> text area tag with name="name", rows="rows" and cols="cols".


The documentation for this class was generated from the following files: