X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fdouble.h;h=ba4c5958945c76a8653a119ab16f4faa5eac791f;hp=19cbe2c185e99ad0b0e35b3f653fd3c912eae67c;hb=2f779c1bd6a9a74c97be09ee6842a7527e083fa6;hpb=b912c99cb1802b93baec288d4f44819437ee08fa diff --git a/pv/prop/double.h b/pv/prop/double.h index 19cbe2c1..ba4c5958 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,24 +34,29 @@ namespace prop { class Double : public Property { + Q_OBJECT + public: Double(QString name, int decimals, QString suffix, boost::optional< std::pair > range, boost::optional step, - boost::function getter, - boost::function setter); + Getter getter, + Setter setter); + + virtual ~Double(); - QWidget* get_widget(QWidget *parent); + QWidget* get_widget(QWidget *parent, bool auto_commit); void commit(); +private slots: + void on_value_changed(double); + private: const int _decimals; const QString _suffix; const boost::optional< std::pair > _range; const boost::optional _step; - boost::function _getter; - boost::function _setter; QDoubleSpinBox *_spin_box; };