]> sigrok.org Git - pulseview.git/blobdiff - pv/prop/double.h
Added a String property
[pulseview.git] / pv / prop / double.h
index 19cbe2c185e99ad0b0e35b3f653fd3c912eae67c..5edb392419cf302a940b49d0e643ca3c15bd60ad 100644 (file)
@@ -22,7 +22,6 @@
 #define PULSEVIEW_PV_PROP_DOUBLE_H
 
 #include <utility>
-#include <vector>
 
 #include <boost/optional.hpp>
 
@@ -39,8 +38,10 @@ public:
        Double(QString name, int decimals, QString suffix,
                boost::optional< std::pair<double, double> > range,
                boost::optional<double> step,
-               boost::function<double ()> getter,
-               boost::function<void (double)> setter);
+               Getter getter,
+               Setter setter);
+
+       virtual ~Double();
 
        QWidget* get_widget(QWidget *parent);
 
@@ -51,8 +52,6 @@ private:
        const QString _suffix;
        const boost::optional< std::pair<double, double> > _range;
        const boost::optional<double> _step;
-       boost::function<double ()> _getter;
-       boost::function<void (double)> _setter;
 
        QDoubleSpinBox *_spin_box;
 };