diff options
author | Tim E. Real <termtech@rogers.com> | 2010-11-26 21:26:34 +0000 |
---|---|---|
committer | Tim E. Real <termtech@rogers.com> | 2010-11-26 21:26:34 +0000 |
commit | d0072018d13594b5aa1ad0a04dd036676dae8b5a (patch) | |
tree | abe9606d6201385ca2177d918ab38515736a75a5 /muse2/muse/widgets/spinboxFP.h | |
parent | ac85f48cbb90cd4ccd72a3e70d0edb2a63f0e8dd (diff) |
Trackinfo, SpinBoxFP, and transformer fixes. Please see ChangeLog.
Diffstat (limited to 'muse2/muse/widgets/spinboxFP.h')
-rw-r--r-- | muse2/muse/widgets/spinboxFP.h | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/muse2/muse/widgets/spinboxFP.h b/muse2/muse/widgets/spinboxFP.h index 760a7d06..4c0b75db 100644 --- a/muse2/muse/widgets/spinboxFP.h +++ b/muse2/muse/widgets/spinboxFP.h @@ -8,27 +8,45 @@ #ifndef __SPINBOXFP_H__ #define __SPINBOXFP_H__ -#include <qspinbox.h> +//#include <QSpinBox> +#include <QDoubleSpinBox> + +//class QValidator; +//class QDoubleValidator; //--------------------------------------------------------- // SpinBoxFP //--------------------------------------------------------- -class SpinBoxFP : public QSpinBox { +//class SpinBoxFP : public QSpinBox { +class SpinBoxFP : public QDoubleSpinBox { Q_OBJECT - Q_PROPERTY( int precision READ precision WRITE setPrecision ) - - int _precision; - - protected: - virtual QString mapValueToText(int value); - //virtual int mapTextToValue(bool* ok); + //Q_PROPERTY( int decimals READ decimals WRITE setDecimals ) + + //int _decimals; + //QDoubleValidator* validator; + + signals: + void valueChanged(int); + + private slots: + void valueChange(double); + + protected: + //virtual QString textFromValue(int) const; + //virtual int valueFromText(const QString&) const; + //virtual QValidator::State validate(QString&, int&) const; public: - SpinBoxFP(QWidget* parent=0, const char* name = 0); - SpinBoxFP(int minValue, int maxValue, int step = 1, QWidget* parent=0, const char* name = 0); - void setPrecision(int val); - int precision() const { return _precision; } + SpinBoxFP(QWidget* parent=0); + SpinBoxFP(int minValue, int maxValue, int step = 1, QWidget* parent=0); + //SpinBoxFP(double minValue, double maxValue, double step = 1.0, QWidget* parent=0); + + void setValue(int val); + int intValue(); + + void setDecimals(int); + //int decimals() const { return _decimals; } }; #endif |