Remoto - VFS
|
The numberField class can provide a field with up/down arrows and an optional stepped range slider. More...
#include <numberField.h>
Public Member Functions | |
numberField (double v, QString label="", QString tip="", double min=-1, double max=-1, double step=-1) | |
The double numberField constructor. More... | |
numberField (int v, QString label="", QString tip="", int min=-1, int max=-1, int step=-1) | |
The int numberField constructor. More... | |
void | setRange (double min, double max, double step=1.0) |
Set a number field's range. More... | |
void | setRound (QJsonValue r) |
Set the rounding decimal places for the field. More... | |
void | showSlider (bool r) |
Show or hide number field's slider. 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... | |
Additional Inherited Members | |
Protected Attributes inherited from VFS_form_field | |
QJsonObject | options |
Options for any widget type... this is an arbitrary list. More... | |
The numberField class can provide a field with up/down arrows and an optional stepped range slider.
If a slider with a min or max of -1 is needed, create the object and use setRange() after.
Definition at line 6 of file numberField.h.
|
explicit |
The int numberField constructor.
v | The initial value |
label | The label |
tip | The tooltip |
min | Minimum value for slider, or no slider if omitted |
max | Maximum value for slider, or no slider if omitted |
step | The step for a slider, or no slider if omitted |
Definition at line 22 of file numberField.cpp.
|
explicit |
The double numberField constructor.
v | The value |
label | The label |
tip | The tooltip |
min | Minimum value for slider, or no slider if omitted |
max | Maximum value for slider, or no slider if omitted |
step | The step for a slider, or no slider if omitted |
Definition at line 41 of file numberField.cpp.
void numberField::setRange | ( | double | min, |
double | max, | ||
double | step = 1.0 |
||
) |
Set a number field's range.
min | Minimum value |
max | Maximum value |
step | Step for range |
Definition at line 55 of file numberField.cpp.
void numberField::setRound | ( | QJsonValue | r | ) |
Set the rounding decimal places for the field.
r | The number of places, or null to unset |
Definition at line 81 of file numberField.cpp.
void numberField::showSlider | ( | bool | r | ) |
Show or hide number field's slider.
r | Show if true (default), or hide |
Definition at line 67 of file numberField.cpp.