Remoto - VFS
|
The colorField class adds a color selector to a form. More...
#include <colorField.h>
Classes | |
struct | hsv |
HSV value struct, using double precision. More... | |
struct | rgb |
RGB value struct, using double precision. More... | |
Public Member Functions | |
colorField (QString c, QString label="", QString tip="") | |
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... | |
Static Public Member Functions | |
static QString | fromHSV (qreal h, qreal s, qreal v) |
Convert HSV values to a hex RGB value. More... | |
static colorField::rgb | hsv2rgb (colorField::hsv in) |
Convert an incoming HSV value to RGB. More... | |
static QString | random (qreal hc=0.0, qreal hrange=1.0, qreal s=1.0, qreal v=0.75) |
Generate a random color based on HSV ranges. More... | |
static colorField::hsv | rgb2hsv (colorField::rgb in) |
Convert an incoming RGB value to HSV. 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 colorField class adds a color selector to a form.
The initial value can be randomized based on HSV ranges.
Definition at line 6 of file colorField.h.
|
explicit |
c | The initial color value, as a hex string |
label | The label |
tip | The tooltip |
Definition at line 24 of file colorField.cpp.
|
static |
Convert HSV values to a hex RGB value.
h | hue |
s | saturation |
v | value |
Definition at line 57 of file colorField.cpp.
|
static |
Convert an incoming HSV value to RGB.
in | HSV value |
Definition at line 127 of file colorField.cpp.
|
static |
Generate a random color based on HSV ranges.
hc | The center of the hue value |
hrange | The distance from the center to randomly choose |
s | The saturation |
v | The value |
Definition at line 38 of file colorField.cpp.
|
static |
Convert an incoming RGB value to HSV.
in | RGB value |
Definition at line 77 of file colorField.cpp.