TreeFrogFramework: THtmlAttribute Class Reference

#include <thtmlattribute.h>

Public Member Functions

 THtmlAttribute ()
 
 THtmlAttribute (const QString &key, const QString &value)
 
 THtmlAttribute (const THtmlAttribute &other)
 
 THtmlAttribute (const QList< QPair< QString, QString > > &list)
 
bool contains (const QString &key) const
 
void prepend (const QString &key, const QString &value)
 
void append (const QString &key, const QString &value)
 
THtmlAttributeoperator() (const QString &key, const QString &value)
 
THtmlAttributeoperator= (const THtmlAttribute &other)
 
THtmlAttribute operator| (const THtmlAttribute &other) const
 
QString toString (bool escape=true) const
 

The THtmlAttribute class represents HTML attributes for customizing web elements.

THtmlAttribute::THtmlAttribute ( )
inline

Constructor.

◆ THtmlAttribute() [2/4]

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

Constructor.

◆ THtmlAttribute() [3/4]

◆ THtmlAttribute() [4/4]

THtmlAttribute::THtmlAttribute ( const QList< QPair< QString, QString > > &  list)

Copy constructor.

◆ append()

void THtmlAttribute::append ( const QString &  key,
const QString &  value 
)

Inserts a new item at the end of the attributes.

◆ contains()

bool THtmlAttribute::contains ( const QString &  key) const

Returns true if the HTML attributes contains an item with key key; otherwise returns false.

◆ operator()()

THtmlAttribute & THtmlAttribute::operator() ( const QString &  key,
const QString &  value 
)

Inserts a new item at the end of the attributes.

◆ operator=()

◆ operator|()

Returns HTML attributes that contains all the items in this attributes followed by all the items in the other attributes.

◆ prepend()

void THtmlAttribute::prepend ( const QString &  key,
const QString &  value 
)

Inserts a new item at the beginning of the attributes.

◆ toString()

QString THtmlAttribute::toString ( bool  escape = true) const

Returns the attributes as a string.

If escape is true, returns a escaped string.


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