|
SHAPER
9.15.0
|
An extension of a double spin box which let to use parameters and expressions for value definition. More...

Signals | |
| void | textChanged (const QString &) |
Public Member Functions | |
| ModuleBase_ParamSpinBox (QWidget *theParent=0, int thePrecision=12) | |
| Constructor. More... | |
| void | setCompletionList (QStringList &) |
| Set list of completion strings. More... | |
| virtual | ~ModuleBase_ParamSpinBox () |
| Destructor. More... | |
| virtual void | stepBy (int) |
| Perform steps increment/decrement steps. More... | |
| virtual QValidator::State | validate (QString &, int &) const |
| This function is used to determine whether input is valid. More... | |
| virtual void | setValue (double) |
| This function is used to set a current value for this spinbox. More... | |
| double | value () const |
| virtual void | setText (const QString &) |
| This function is used to set a text for this spinbox. More... | |
| QString | text () const |
| void | setAcceptVariables (const bool) |
| Set a flag about accepted variable. More... | |
| bool | isAcceptVariables () const |
| Returns accepted variables flag. More... | |
| bool | hasVariable () const |
| Returns True if the input value contains variable. More... | |
| double | minimum () const |
| double | maximum () const |
| void | setMinimum (double theMin) |
| void | setMaximum (double theMax) |
| int | decimals () const |
| void | setDecimals (int thePrecision) |
| double | singleStep () const |
| void | setSingleStep (double theStep) |
| void | setValueEnabled (bool theEnable) |
Protected Member Functions | |
| virtual void | keyReleaseEvent (QKeyEvent *event) |
| This function is called when the spinbox receives key release event. More... | |
| virtual bool | eventFilter (QObject *theObj, QEvent *theEvent) |
| virtual void | timerEvent (QTimerEvent *) |
| The virtual function is reimplemented in order to avoid extra increasing of value by StepBy method. More... | |
| virtual StepEnabled | stepEnabled () const |
| bool | hasVariable (const QString &theText) const |
| Returns True if the given text contains variable. More... | |
An extension of a double spin box which let to use parameters and expressions for value definition.
| ModuleBase_ParamSpinBox::ModuleBase_ParamSpinBox | ( | QWidget * | theParent = 0, |
| int | thePrecision = 12 |
||
| ) |
Constructor.
Constructs a spin box with 0.0 as minimum value and 99.99 as maximum value, a step value of 1.0 and a precision of 2 decimal places. The value is initially set to 0.00.
| theParent | a parent object |
| thePrecision | a precision of values display |
|
virtual |
Destructor.
| void ModuleBase_ParamSpinBox::setCompletionList | ( | QStringList & | theList | ) |
Set list of completion strings.
|
virtual |
Perform steps increment/decrement steps.
Re-implemented to handle cases when Notebook variable name is specified by the user as the widget text. Otherwise, simply calls the base implementation.
| steps | number of increment/decrement steps |
|
virtual |
This function is used to determine whether input is valid.
| str | currently entered value |
| pos | cursor position in the string |
If decimals = 0 do not accept '.' (interpret as int)
|
virtual |
This function is used to set a current value for this spinbox.
| value | current value |
The new value is ignored if the spinbox has a variable.
|
virtual |
This function is used to set a text for this spinbox.
| value | current value |
| void ModuleBase_ParamSpinBox::setAcceptVariables | ( | const bool | flag | ) |
Set a flag about accepted variable.
Enables or disables variable names in the spin box. By default, variable names are enabled.
| flag | If true, variable names are enabled. |
| bool ModuleBase_ParamSpinBox::isAcceptVariables | ( | ) | const |
Returns accepted variables flag.
Returns true if the spin box accepts variable names.
| bool ModuleBase_ParamSpinBox::hasVariable | ( | ) | const |
Returns True if the input value contains variable.
|
protectedvirtual |
This function is called when the spinbox receives key release event.
|
inlineprotectedvirtual |
The virtual function is reimplemented in order to avoid extra increasing of value by StepBy method.
|
protected |
Returns True if the given text contains variable.
| theText | a text string |