#include <dataformfield.h>
Inherited by DataFormItem, and DataFormReported.
Inheritance diagram for DataFormField:

Public Types | |
| enum | DataFormFieldType { FieldTypeBoolean, FieldTypeFixed, FieldTypeHidden, FieldTypeJidMulti, FieldTypeJidSingle, FieldTypeListMulti, FieldTypeListSingle, FieldTypeTextMulti, FieldTypeTextPrivate, FieldTypeTextSingle, FieldTypeItem, FieldTypeReported, FieldTypeInvalid, FieldTypeNone } |
Public Member Functions | |
| DataFormField (DataFormFieldType type=FieldTypeTextSingle) | |
| DataFormField (const std::string &name, const std::string &value="", const std::string &label="", DataFormFieldType type=FieldTypeTextSingle) | |
| DataFormField (Tag *tag) | |
| virtual | ~DataFormField () |
| virtual StringMap & | options () |
| virtual Tag * | tag () const |
| virtual const std::string & | name () const |
| virtual void | setName (const std::string &name) |
| virtual void | setOptions (const StringMap &options) |
| virtual void | addOption (const std::string &label, const std::string &value) |
| virtual bool | required () const |
| virtual void | setRequired (bool required) |
| virtual DataFormFieldType | type () const |
| virtual const std::string & | label () const |
| virtual void | setLabel (const std::string &label) |
| virtual const std::string & | description () const |
| virtual void | setDescription (const std::string &desc) |
| virtual const std::string & | value () const |
| virtual void | setValue (const std::string &value) |
| virtual const StringList & | values () const |
| virtual void | setValues (const StringList &values) |
| virtual void | addValue (const std::string &value) |
Definition at line 32 of file dataformfield.h.
|
|
Describes the possible type of a Data Form Field.
Definition at line 39 of file dataformfield.h. |
|
|
Constructs a new DataForm field.
Definition at line 20 of file dataformfield.cpp. |
|
||||||||||||||||||||
|
Constructs a new DataForm field and fills it with the given values.
Definition at line 25 of file dataformfield.cpp. |
|
|
Constructs a new Data Form Field from an existing tag that describes a field.
Definition at line 32 of file dataformfield.cpp. |
|
|
Virtual destructor. Definition at line 92 of file dataformfield.cpp. |
|
||||||||||||
|
Adds a single option to the list of options.
Definition at line 148 of file dataformfield.h. |
|
|
Adds a single value to the list of values.
Definition at line 222 of file dataformfield.h. |
|
|
Use this function to retrieve the description of this field.
Definition at line 185 of file dataformfield.h. |
|
|
Use this function to retrieve the describing label of this field.
Definition at line 173 of file dataformfield.h. |
|
|
Use this function to retrieve the name of the field (the content of the 'var' attribute).
Definition at line 124 of file dataformfield.h. |
|
|
Use this function to retrieve the optional values of a field.
Definition at line 110 of file dataformfield.h. |
|
|
Use this function to determine whether or not this field is required.
Definition at line 155 of file dataformfield.h. |
|
|
Use this function to set the description of this field.
Definition at line 191 of file dataformfield.h. |
|
|
Use this function to set the describing label of this field.
Definition at line 179 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 132 of file dataformfield.h. |
|
|
Use this function to set the optional values of the field. The key of the map will be used as the label of the option, while the value will be used as ... the value. ;)
Definition at line 140 of file dataformfield.h. |
|
|
Use this field to set this field to be required.
Definition at line 161 of file dataformfield.h. |
|
|
Use this function to set the value of this field.
Definition at line 203 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 216 of file dataformfield.h. |
|
|
Use this function to create a Tag representation of the form field. This is usually called by DataForm.
Reimplemented in DataFormItem, and DataFormReported. Definition at line 96 of file dataformfield.cpp. |
|
|
Use this function to retrieve the type of this field.
Definition at line 167 of file dataformfield.h. |
|
|
Use this function to retrieve the value of this field.
Definition at line 197 of file dataformfield.h. |
|
|
Use this function to retrieve the values of this field, if its of type 'text-multi'.
Definition at line 209 of file dataformfield.h. |
1.4.1