TreeFrogFramework 2.10
|
#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) |
THtmlAttribute & | operator() (const QString &key, const QString &value) |
THtmlAttribute & | operator= (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.
|
inline |
Constructor.
THtmlAttribute::THtmlAttribute | ( | const QString & | key, |
const QString & | value | ||
) |
Constructor.
THtmlAttribute::THtmlAttribute | ( | const THtmlAttribute & | other | ) |
Copy constructor.
THtmlAttribute::THtmlAttribute | ( | const QList< QPair< QString, QString > > & | list | ) |
Copy constructor.
void THtmlAttribute::append | ( | const QString & | key, |
const QString & | value | ||
) |
Inserts a new item at the end of the attributes.
bool THtmlAttribute::contains | ( | const QString & | key | ) | const |
Returns true if the HTML attributes contains an item with key key; otherwise returns false.
THtmlAttribute & THtmlAttribute::operator() | ( | const QString & | key, |
const QString & | value | ||
) |
Inserts a new item at the end of the attributes.
THtmlAttribute & THtmlAttribute::operator= | ( | const THtmlAttribute & | other | ) |
Assignment operator.
THtmlAttribute THtmlAttribute::operator| | ( | const THtmlAttribute & | other | ) | const |
Returns HTML attributes that contains all the items in this attributes followed by all the items in the other attributes.
void THtmlAttribute::prepend | ( | const QString & | key, |
const QString & | value | ||
) |
Inserts a new item at the beginning of the attributes.
QString THtmlAttribute::toString | ( | bool | escape = true | ) | const |
Returns the attributes as a string.
If escape is true, returns a escaped string.