5 #include <QDoubleSpinBox> 8 #include "utils/printutils.h" 19 SiSpinBox(Unit unit, QWidget *parent = 0);
22 QValidator::State
validate(QString &input,
int &pos)
const;
25 void fixup(QString &input)
const;
29 void setSteps(
const QList<double> &steps);
47 void resetSteppedTo();
SiSpinBox(QWidget *parent=0)
Initializes the SiSpinBox internals.
Definition: sispinbox.cpp:35
void fixup(QString &input) const
Fixes the text after the user finished changing it.
Definition: sispinbox.cpp:79
void setMode(const int mode)
Set the mode.
Definition: sispinbox.cpp:161
void setUnitPostfix(const QString &postfix)
Set the unit postfix for this spin box.
Definition: sispinbox.cpp:151
double valueFromText(const QString &text) const
Parse value from input text.
Definition: sispinbox.cpp:70
void stepBy(int steps)
Increase/decrease the values in fixed steps.
Definition: sispinbox.cpp:90
A spin box with SI prefix support. This spin box supports the SI prefixes (k/M/G/T) after its value a...
Definition: sispinbox.h:14
void setSteps(const QList< double > &steps)
Set the steps the spin box will take.
Definition: sispinbox.cpp:156
QString textFromValue(double val) const
Get string representation of value.
Definition: sispinbox.cpp:75
QValidator::State validate(QString &input, int &pos) const
Validates the text after user input.
Definition: sispinbox.cpp:55
bool setUnit(Unit unit)
Set the unit for this spin box.
Definition: sispinbox.cpp:142
~SiSpinBox()
Cleans up the main window.
Definition: sispinbox.cpp:49