#include <dataformfield.h>
Inherited by DataFormItem [private]
, and DataFormReported [private]
.
Inheritance diagram for DataFormField:
Public Types | |
enum | DataFormFieldType { FIELD_TYPE_BOOLEAN, FIELD_TYPE_FIXED, FIELD_TYPE_HIDDEN, FIELD_TYPE_JID_MULTI, FIELD_TYPE_JID_SINGLE, FIELD_TYPE_LIST_MULTI, FIELD_TYPE_LIST_SINGLE, FIELD_TYPE_TEXT_MULTI, FIELD_TYPE_TEXT_PRIVATE, FIELD_TYPE_TEXT_SINGLE, FIELD_TYPE_ITEM, FIELD_TYPE_REPORTED, FIELD_TYPE_INVALID } |
Public Member Functions | |
DataFormField (DataFormFieldType type=FIELD_TYPE_TEXT_SINGLE) | |
DataFormField (Tag *tag) | |
virtual | ~DataFormField () |
StringMap & | options () |
virtual Tag * | tag () const |
virtual const std::string & | name () const |
void | setName (const std::string &name) |
void | setOptions (const StringMap &options) |
bool | required () const |
void | setRequired (bool required) |
DataFormFieldType | type () const |
const std::string & | label () const |
void | setLabel (const std::string &label) |
const std::string & | value () const |
void | setValue (const std::string &value) |
const StringList & | values () const |
void | setValues (const StringList &values) |
Definition at line 31 of file dataformfield.h.
|
Describes the possible type of a Data Form Field.
Definition at line 38 of file dataformfield.h. |
|
Constructs a new Data Form Field.
Definition at line 19 of file dataformfield.cpp. |
|
Constructs a new Data Form Field from an existing tag that describes a field.
Definition at line 24 of file dataformfield.cpp. References Tag::children(), DataFormField::FIELD_TYPE_BOOLEAN, DataFormField::FIELD_TYPE_FIXED, DataFormField::FIELD_TYPE_HIDDEN, DataFormField::FIELD_TYPE_JID_MULTI, DataFormField::FIELD_TYPE_JID_SINGLE, DataFormField::FIELD_TYPE_LIST_MULTI, DataFormField::FIELD_TYPE_LIST_SINGLE, DataFormField::FIELD_TYPE_TEXT_MULTI, DataFormField::FIELD_TYPE_TEXT_PRIVATE, DataFormField::FIELD_TYPE_TEXT_SINGLE, Tag::hasAttribute(), and DataFormField::tag(). |
|
Virtual destructor. Definition at line 74 of file dataformfield.cpp. |
|
Use this function to retrieve the describing label of this field.
Definition at line 148 of file dataformfield.h. |
|
Use this function to retrieve the name of the field (the content of the 'var' attribute).
Definition at line 110 of file dataformfield.h. |
|
Use this function to retrieve the optional values of a field.
Definition at line 96 of file dataformfield.h. |
|
Use this function to determine whether or not this field is required.
Definition at line 130 of file dataformfield.h. |
|
Use this function to set the describing label of this field.
Definition at line 154 of file dataformfield.h. |
|
Sets the name (the content of the 'var' attribute) of the field. The name identifies the field uniquely in the form.
Definition at line 118 of file dataformfield.h. |
|
Use this function to set the optional values of a field.
Definition at line 124 of file dataformfield.h. |
|
Use this field to set this field to be required.
Definition at line 136 of file dataformfield.h. |
|
Use this function to set the value of this field.
Definition at line 166 of file dataformfield.h. |
|
Use this function to set multiple values of this field, if it is of type 'text-multi'. If its not, use setValue() instead.
Definition at line 179 of file dataformfield.h. |
|
Use this function to create a Tag representation of the form field. This is usually called by DataForm.
Definition at line 78 of file dataformfield.cpp. References Tag::addAttrib(), Tag::addChild(), DataFormField::FIELD_TYPE_BOOLEAN, DataFormField::FIELD_TYPE_FIXED, DataFormField::FIELD_TYPE_HIDDEN, DataFormField::FIELD_TYPE_INVALID, DataFormField::FIELD_TYPE_JID_MULTI, DataFormField::FIELD_TYPE_JID_SINGLE, DataFormField::FIELD_TYPE_LIST_MULTI, DataFormField::FIELD_TYPE_LIST_SINGLE, DataFormField::FIELD_TYPE_TEXT_MULTI, DataFormField::FIELD_TYPE_TEXT_PRIVATE, and DataFormField::FIELD_TYPE_TEXT_SINGLE. Referenced by DataFormField::DataFormField(). |
|
Use this function to retrieve the type of this field.
Definition at line 142 of file dataformfield.h. |
|
Use this function to retrieve the value of this field.
Definition at line 160 of file dataformfield.h. |
|
Use this function to retrieve the values of this field, if its of type 'text-multi'.
Definition at line 172 of file dataformfield.h. |