X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fdouble.h;h=dc4c6ec9c0de86e8d4f28b3cdf715fb9d2a23c12;hb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;hp=6b6275c10effd429085e2c619d3624dbbffbf9c2;hpb=9b25892767cee1d871ac18beb025033e905b28ae;p=pulseview.git diff --git a/pv/prop/double.h b/pv/prop/double.h index 6b6275c..dc4c6ec 100644 --- a/pv/prop/double.h +++ b/pv/prop/double.h @@ -22,7 +22,6 @@ #define PULSEVIEW_PV_PROP_DOUBLE_H #include -#include #include @@ -35,6 +34,8 @@ namespace prop { class Double : public Property { + Q_OBJECT + public: Double(QString name, int decimals, QString suffix, boost::optional< std::pair > range, @@ -42,17 +43,22 @@ public: Getter getter, Setter setter); - QWidget* get_widget(QWidget *parent); + virtual ~Double(); + + QWidget* get_widget(QWidget *parent, bool auto_commit); void commit(); +private Q_SLOTS: + void on_value_changed(double); + private: - const int _decimals; - const QString _suffix; - const boost::optional< std::pair > _range; - const boost::optional _step; + const int decimals_; + const QString suffix_; + const boost::optional< std::pair > range_; + const boost::optional step_; - QDoubleSpinBox *_spin_box; + QDoubleSpinBox *spin_box_; }; } // prop