Remoto - VFS
|
A selectField provides a pull-down list of options for a user. More...
#include <selectField.h>
Public Member Functions | |
selectField (QJsonValue v, QString label="", QString tip="") | |
Create a select field. More... | |
void | addOption (QString text, QJsonValue value=QJsonValue::Undefined) |
Add an option to the select field. More... | |
void | clearOptions () |
Remove all options from this selectField. More... | |
Public Member Functions inherited from VFS_form_field | |
VFS_form_field (QJsonValue val, QString type, QString label="", QString tip="") | |
VFS_form_field (QString type) | |
void | clearOption (QString o) |
Clear/remove a widget option. More... | |
int | getIndex () |
Get the field index. More... | |
QString | getLabel () |
Return the label. More... | |
void | setAllowEmpty (bool e) |
Validate this field against empty-ness. More... | |
void | setEnabled (bool e) |
Enable or disable this field. More... | |
void | setHidden (bool e) |
Keep the field, but hide it when rendering. More... | |
void | setHideLabel (bool l) |
Hide the label for this field. More... | |
void | setIndex (int i) |
Set the field index for this widget. More... | |
void | setLabel (QString l, bool replace=true) |
Set the label. More... | |
void | setOption (QString o, QJsonValue v) |
Set a widget option. More... | |
void | setSpellcheck (bool s) |
Enable or disable spellchecking on this text field. More... | |
void | setTip (QString t) |
Set the tooltip. More... | |
void | setValue (QJsonValue val) |
Set the value. More... | |
Public Attributes | |
QJsonArray | _selectOptions |
The array of {"name":"value"} options. More... | |
Additional Inherited Members | |
Protected Attributes inherited from VFS_form_field | |
QJsonObject | options |
Options for any widget type... this is an arbitrary list. More... | |
A selectField provides a pull-down list of options for a user.
The possible values are added to the options.options json property.
Definition at line 8 of file selectField.h.
|
explicit |
Create a select field.
Options will need to be added after creation.
t | The field value |
label | The label |
tip | The tooltip |
Definition at line 19 of file selectField.cpp.
void selectField::addOption | ( | QString | text, |
QJsonValue | value = QJsonValue::Undefined |
||
) |
Add an option to the select field.
text | The visible text of the option |
value | The value of the option |
Definition at line 31 of file selectField.cpp.
void selectField::clearOptions | ( | ) |
Remove all options from this selectField.
Definition at line 46 of file selectField.cpp.
QJsonArray selectField::_selectOptions |
The array of {"name":"value"} options.
Definition at line 16 of file selectField.h.