]> sigrok.org Git - pulseview.git/blobdiff - pv/prop/property.hpp
Fix random clazy warnings
[pulseview.git] / pv / prop / property.hpp
index 6a4dd9ab2723156171cd04a23283b5f3ffd3434f..4ce352e11e5dacb2aaacfe4e726e3e94875daaef 100644 (file)
@@ -27,9 +27,12 @@ G_GNUC_BEGIN_IGNORE_DEPRECATIONS
 G_GNUC_END_IGNORE_DEPRECATIONS
 
 #include <functional>
+
 #include <QString>
 #include <QWidget>
 
+using std::function;
+
 class QWidget;
 
 namespace pv {
@@ -40,18 +43,19 @@ class Property : public QObject
        Q_OBJECT;
 
 public:
-       typedef std::function<Glib::VariantBase ()> Getter;
-       typedef std::function<void (Glib::VariantBase)> Setter;
+       typedef function<Glib::VariantBase ()> Getter;
+       typedef function<void (Glib::VariantBase)> Setter;
 
 protected:
-       Property(QString name, Getter getter, Setter setter);
+       Property(QString name, QString desc, Getter getter, Setter setter);
 
 public:
        const QString& name() const;
+       const QString& desc() const;
 
-       virtual QWidget* get_widget(QWidget *parent,
-               bool auto_commit = false) = 0;
+       virtual QWidget* get_widget(QWidget *parent, bool auto_commit = false) = 0;
        virtual bool labeled_widget() const;
+       virtual void update_widget() = 0;
 
        virtual void commit() = 0;
 
@@ -59,11 +63,12 @@ protected:
        const Getter getter_;
        const Setter setter_;
 
-private:
+protected:
        QString name_;
+       QString desc_;
 };
 
-} // prop
-} // pv
+}  // namespace prop
+}  // namespace pv
 
 #endif // PULSEVIEW_PV_PROP_PROPERTY_HPP