1 // File: ModuleBase_DoubleSpinBox.h
2 // Author: Sergey TELKOV
4 #ifndef MODULEBASE_DOUBLESPINBOX_H_
5 #define MODULEBASE_DOUBLESPINBOX_H_
7 #include "ModuleBase.h"
9 #include <QDoubleSpinBox>
12 class MODULEBASE_EXPORT ModuleBase_DoubleSpinBox : public QDoubleSpinBox
17 ModuleBase_DoubleSpinBox(QWidget* = 0, int thePrecision = 6);
18 virtual ~ModuleBase_DoubleSpinBox();
20 bool isCleared() const;
21 virtual void setCleared(const bool);
23 int getPrecision() const;
24 void setPrecision(const int);
26 virtual void stepBy(int);
28 virtual double valueFromText(const QString&) const;
29 virtual QString textFromValue(double) const;
31 virtual QValidator::State validate(QString&, int&) const;
34 virtual void onTextChanged(const QString&);
37 QString removeTrailingZeroes(const QString&) const;