|
QXmpp Version: 1.15.1
|
Public Types | |
| enum | Type { BooleanField , FixedField , HiddenField , JidMultiField , JidSingleField , ListMultiField , ListSingleField , TextMultiField , TextPrivateField , TextSingleField } |
| This enum is used to describe a field's type. | |
Public Member Functions | |
| Field (Type type=TextSingleField, const QString &key={}, const QVariant &value={}, bool isRequired=false, const QString &label={}, const QString &description={}, const QList< QPair< QString, QString > > &options={}) | |
| Field (const QXmppDataForm::Field &other) | |
| Constructs a copy of other. | |
| Field (QXmppDataForm::Field &&) | |
| Default move constructor. | |
| ~Field () | |
| Destroys the form field. | |
| QXmppDataForm::Field & | operator= (const QXmppDataForm::Field &other) |
| Assigns other to this field. | |
| QXmppDataForm::Field & | operator= (QXmppDataForm::Field &&) |
| Default move-assignment operator. | |
| QString | description () const |
| void | setDescription (const QString &description) |
| QString | key () const |
| void | setKey (const QString &key) |
| QString | label () const |
| void | setLabel (const QString &label) |
| QList< QPair< QString, QString > > | options () const |
| void | setOptions (const QList< QPair< QString, QString > > &options) |
| bool | isRequired () const |
| void | setRequired (bool required) |
| QXmppDataForm::Field::Type | type () const |
| void | setType (QXmppDataForm::Field::Type type) |
| QVariant | value () const |
| void | setValue (const QVariant &value) |
| QVector< QXmppDataForm::MediaSource > | mediaSources () const |
| void | setMediaSources (const QVector< QXmppDataForm::MediaSource > &mediaSources) |
| QSize | mediaSize () const |
| void | setMediaSize (const QSize &size) |
| bool | operator== (const Field &other) const |
The QXmppDataForm::Field class represents a data form field as defined by XEP-0004: Data Forms.
| QXmppDataForm::Field::Field | ( | Type | type = TextSingleField, |
| const QString & | key = {}, | ||
| const QVariant & | value = {}, | ||
| bool | isRequired = false, | ||
| const QString & | label = {}, | ||
| const QString & | description = {}, | ||
| const QList< QPair< QString, QString > > & | options = {} ) |
Constructs a QXmppDataForm::Field with the specified attributes.
| QString QXmppDataForm::Field::description | ( | ) | const |
Returns the field's description.
| bool QXmppDataForm::Field::isRequired | ( | ) | const |
Returns true if the field is required, false otherwise.
| QString QXmppDataForm::Field::key | ( | ) | const |
Returns the field's key.
| QString QXmppDataForm::Field::label | ( | ) | const |
Returns the field's label.
| QSize QXmppDataForm::Field::mediaSize | ( | ) | const |
Returns the size of the attached media according to XEP-0221: Data Forms Media Element.
| QVector< QXmppDataForm::MediaSource > QXmppDataForm::Field::mediaSources | ( | ) | const |
Returns the sources for the attached media according to XEP-0221: Data Forms Media Element.
| bool QXmppDataForm::Field::operator== | ( | const Field & | other | ) | const |
Returns true if the other field is identical to this one.
| QList< QPair< QString, QString > > QXmppDataForm::Field::options | ( | ) | const |
Returns the field's options.
| void QXmppDataForm::Field::setDescription | ( | const QString & | description | ) |
Sets the field's description.
| description |
| void QXmppDataForm::Field::setKey | ( | const QString & | key | ) |
Sets the field's key.
| key |
| void QXmppDataForm::Field::setLabel | ( | const QString & | label | ) |
Sets the field's label.
| label |
| void QXmppDataForm::Field::setMediaSize | ( | const QSize & | size | ) |
Sets the size of the attached media according to XEP-0221: Data Forms Media Element.
| void QXmppDataForm::Field::setMediaSources | ( | const QVector< QXmppDataForm::MediaSource > & | mediaSources | ) |
Sets the sources to the attached media of the field according to XEP-0221: Data Forms Media Element.
| void QXmppDataForm::Field::setOptions | ( | const QList< QPair< QString, QString > > & | options | ) |
Sets the field's options.
| options |
| void QXmppDataForm::Field::setRequired | ( | bool | required | ) |
Set to true if the field is required, false otherwise.
| required |
| void QXmppDataForm::Field::setType | ( | QXmppDataForm::Field::Type | type | ) |
Sets the field's type.
| type |
| void QXmppDataForm::Field::setValue | ( | const QVariant & | value | ) |
Sets the field's value.
| value |
| QXmppDataForm::Field::Type QXmppDataForm::Field::type | ( | ) | const |
Returns the field's type.
| QVariant QXmppDataForm::Field::value | ( | ) | const |
Returns the field's value.