A wrapper around KisIntParseSpinBox, which is a cleverer SpinBox, able to parse arithmetic expressions. The widget itself is accessed with the widget() function.
Use this spinbox instead of the basic one from Qt if you want it to be able to parse arithmetic expressions.
Methods
Re-implemented methods
Signals
Member documentation
signal emitted when the last parsed expression is not valid.
Parameters
expr | (no description provided) |
Get if the last expression entered is a valid one
Return
true if the last expression entered is valid |
signal emitted when the last parsed expression is valid and the expression before was not valid.
Set the value of the spinbox
This reimplementation also tries to clear the current expression and warning message whenever possible. This will happen when the new value is different from the current one and the line edit has not the focus or it is read-only. One can force the reset also by passing true to the overwriteExpression parameter.
Parameters
value | The new value |
overwriteExpression | Get if the expression in the edit field (and the warning message) should be reset to reflect the new value. The default is false so that if the user is editing the expression it won't be disrupted by any default call to this function |
This is a reimplementation of QSpinBox::stepBy that uses setValue()
Parameters
steps | Number of steps that the value should change |
This virtual function is similar to cleanText(). But child classes may reimplement it to further process ("clean up") the expression.
Return
The processed expression |
Get the internal KisIntParseSpinBox as a QWidget, so it may be added to a UI
Return
the internal KisIntParseSpinBox as a QWidget |