enum State { Invalid = 0, NoVariable, Incompatible, Acceptable };
public:
- explicit ModuleBase_ParamSpinBox(QWidget* theParent = 0, int thePrecision = 6);
+ explicit ModuleBase_ParamSpinBox( QWidget* theParent = 0, int thePrecision = -12 );
virtual ~ModuleBase_ParamSpinBox();
virtual void stepBy(int);
virtual double valueFromText(const QString&) const;
+ virtual QString textFromValue (double value) const;
virtual QValidator::State validate(QString&, int&) const;
bool isAcceptVariables() const;
bool hasVariable() const;
-signals:
- void textChanged(const QString&);
+//signals:
+ //void textChanged(const QString&);
protected:
bool hasVariable(const QString& theText) const;
bool findVariable(const QString&, double&) const;
protected:
- virtual void keyPressEvent(QKeyEvent*);
+ //virtual void keyPressEvent(QKeyEvent*);
virtual void showEvent(QShowEvent*);
protected slots:
void connectSignalsAndSlots();
private:
- QString myCorrectValue;
QString myTextValue;
bool myAcceptVariables;