Make member variable underscores a suffix instead of a prefix
[pulseview.git] / pv / prop / double.h
index b00adb1439125118720def25a194bfb021cad153..dc4c6ec9c0de86e8d4f28b3cdf715fb9d2a23c12 100644 (file)
@@ -34,6 +34,8 @@ namespace prop {
 
 class Double : public Property
 {
+       Q_OBJECT
+
 public:
        Double(QString name, int decimals, QString suffix,
                boost::optional< std::pair<double, double> > range,
@@ -41,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<double, double> > _range;
-       const boost::optional<double> _step;
+       const int decimals_;
+       const QString suffix_;
+       const boost::optional< std::pair<double, double> > range_;
+       const boost::optional<double> step_;
 
-       QDoubleSpinBox *_spin_box;
+       QDoubleSpinBox *spin_box_;
 };
 
 } // prop