X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fenum.hpp;h=617ff071b3784621aa3ecac67aad215f9f9c775a;hp=7216508ca75fcf1f3590fa8febea78b681eb498c;hb=dbed5609ae31cdfc3e9db10f3ab91b7607c08372;hpb=efdec55aec1a137460fa362a381ed1904182bfed diff --git a/pv/prop/enum.hpp b/pv/prop/enum.hpp index 7216508c..617ff071 100644 --- a/pv/prop/enum.hpp +++ b/pv/prop/enum.hpp @@ -27,6 +27,9 @@ #include +using std::pair; +using std::vector; + Q_DECLARE_METATYPE(Glib::VariantBase); class QComboBox; @@ -39,12 +42,14 @@ class Enum : public Property Q_OBJECT; public: - Enum(QString name, std::vector > values, + Enum(QString name, QString desc, + vector > values, Getter getter, Setter setter); virtual ~Enum() = default; QWidget* get_widget(QWidget *parent, bool auto_commit); + void update_widget(); void commit(); @@ -52,12 +57,12 @@ private Q_SLOTS: void on_current_item_changed(int); private: - const std::vector< std::pair > values_; + const vector< pair > values_; QComboBox *selector_; }; -} // prop -} // pv +} // namespace prop +} // namespace pv #endif // PULSEVIEW_PV_PROP_ENUM_HPP