Inviwo
0.9.10.1
Inviwo documentation
|
widget for entering numbers with spinbox functionality. It uses less horizontal space than a QSpinBox and allows entering numbers in scientific notation. More...
#include <numberlineedit.h>
Public Member Functions | |
NumberLineEdit (QWidget *parent=nullptr) | |
NumberLineEdit (bool intMode, QWidget *parent=nullptr) | |
virtual QSize | sizeHint () const override |
virtual QSize | minimumSizeHint () const override |
virtual QString | textFromValue (double value) const override |
virtual double | valueFromText (const QString &str) const override |
void | setDecimals (int decimals) |
void | setMinimum (double min) |
void | setMaximum (double max) |
void | setRange (double min, double max) |
virtual void | timerEvent (QTimerEvent *event) override |
Overrides the timerEvent to prevent spinbox to be updated twice in case of calculations being slow. | |
widget for entering numbers with spinbox functionality. It uses less horizontal space than a QSpinBox and allows entering numbers in scientific notation.
The widget supports the functionality of a regular QSpinBox, i.e. the value can also be adjusted using arrow keys and mouse wheel. If the widget cannot accomodate the current number representation of the value, the representation will be changed to scientific notation once the widget looses focus. While the widget is in focues the number is shown in regular notation, except for values less than 1e-6 which are depicted in scientific representation.