#include <dataformfield.h>
Public Types | |
| enum | FieldType { TypeBoolean, TypeFixed, TypeHidden, TypeJidMulti, TypeJidSingle, TypeListMulti, TypeListSingle, TypeTextMulti, TypeTextPrivate, TypeTextSingle, TypeNone, TypeInvalid } |
Public Member Functions | |
| DataFormField (FieldType type=TypeTextSingle) | |
| DataFormField (const std::string &name, const std::string &value=EmptyString, const std::string &label=EmptyString, FieldType type=TypeTextSingle) | |
| DataFormField (const Tag *tag) | |
| virtual | ~DataFormField () |
| StringMap & | options () |
| virtual Tag * | tag () const |
| const std::string & | name () const |
| void | setName (const std::string &name) |
| void | setOptions (const StringMap &options) |
| void | addOption (const std::string &label, const std::string &value) |
| bool | required () const |
| void | setRequired (bool required) |
| const std::string & | label () const |
| void | setLabel (const std::string &label) |
| const std::string & | description () const |
| void | setDescription (const std::string &desc) |
| const std::string & | value () const |
| void | setValue (const std::string &value) |
| const StringList & | values () const |
| void | setValues (const StringList &values) |
| void | addValue (const std::string &value) |
| FieldType | type () const |
| operator bool () const | |
Definition at line 33 of file dataformfield.h.
|
|
Describes the possible types of a Data Form Field.
Definition at line 40 of file dataformfield.h. |
|
|
Constructs a new DataForm field.
Definition at line 26 of file dataformfield.cpp. |
|
||||||||||||||||||||
|
Constructs a new DataForm field and fills it with the given values.
Definition at line 31 of file dataformfield.cpp. |
|
|
Constructs a new Data Form Field from an existing tag that describes a field.
Definition at line 38 of file dataformfield.cpp. |
|
|
Virtual destructor. Definition at line 84 of file dataformfield.cpp. |
|
||||||||||||
|
Adds a single option to the list of options.
Definition at line 146 of file dataformfield.h. |
|
|
Adds a single value to the list of values.
Definition at line 214 of file dataformfield.h. |
|
|
Use this function to retrieve the description of this field.
Definition at line 177 of file dataformfield.h. |
|
|
Use this function to retrieve the describing label of this field.
Definition at line 165 of file dataformfield.h. |
|
|
Use this function to retrieve the name of the field (the content of the 'var' attribute).
Definition at line 122 of file dataformfield.h. |
|
|
Converts to true if the FormBase is valid, false otherwise. Definition at line 225 of file dataformfield.h. |
|
|
Use this function to retrieve the optional values of a field.
Definition at line 108 of file dataformfield.h. |
|
|
Use this function to determine whether or not this field is required.
Definition at line 153 of file dataformfield.h. |
|
|
Use this function to set the description of this field.
Definition at line 183 of file dataformfield.h. |
|
|
Use this function to set the describing label of this field.
Definition at line 171 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 130 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 138 of file dataformfield.h. |
|
|
Use this field to set this field to be required.
Definition at line 159 of file dataformfield.h. |
|
|
Use this function to set the value of this field.
Definition at line 195 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 208 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 88 of file dataformfield.cpp. |
|
|
Use this function to retrieve the type of this field.
Definition at line 220 of file dataformfield.h. |
|
|
Use this function to retrieve the value of this field.
Definition at line 189 of file dataformfield.h. |
|
|
Use this function to retrieve the values of this field, if its of type 'text-multi'.
Definition at line 201 of file dataformfield.h. |
1.4.1