X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fenum.h;h=6ff785a3ba430562fffbfacb47d97b5990a0ed04;hb=ff30bdbafa900626fdcdf5e282d6eb56e4d4b68a;hp=402798c08aed26a2c5b5a8c088704528b6eb5bb2;hpb=9b25892767cee1d871ac18beb025033e905b28ae;p=pulseview.git diff --git a/pv/prop/enum.h b/pv/prop/enum.h index 402798c..6ff785a 100644 --- a/pv/prop/enum.h +++ b/pv/prop/enum.h @@ -26,6 +26,10 @@ #include "property.h" +#include + +Q_DECLARE_METATYPE(Glib::VariantBase); + class QComboBox; namespace pv { @@ -33,18 +37,23 @@ namespace prop { class Enum : public Property { + Q_OBJECT; + public: - Enum(QString name, std::vector > values, + Enum(QString name, std::vector > values, Getter getter, Setter setter); virtual ~Enum(); - QWidget* get_widget(QWidget *parent); + QWidget* get_widget(QWidget *parent, bool auto_commit); void commit(); +private Q_SLOTS: + void on_current_item_changed(int); + private: - const std::vector< std::pair > _values; + const std::vector< std::pair > _values; QComboBox *_selector; };