1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: ModuleBase_DoubleSpinBox.h
4 // Author: Sergey TELKOV
6 #ifndef MODULEBASE_DOUBLESPINBOX_H_
7 #define MODULEBASE_DOUBLESPINBOX_H_
9 #include "ModuleBase.h"
11 #include <QDoubleSpinBox>
14 class MODULEBASE_EXPORT ModuleBase_DoubleSpinBox : public QDoubleSpinBox
19 ModuleBase_DoubleSpinBox(QWidget* = 0, int thePrecision = 6);
20 virtual ~ModuleBase_DoubleSpinBox();
22 bool isCleared() const;
23 virtual void setCleared(const bool);
25 int getPrecision() const;
26 void setPrecision(const int);
28 virtual void stepBy(int);
30 virtual double valueFromText(const QString&) const;
31 virtual QString textFromValue(double) const;
33 virtual QValidator::State validate(QString&, int&) const;
36 virtual void onTextChanged(const QString&);
39 QString removeTrailingZeroes(const QString&) const;