From: Bert Vermeulen Date: Mon, 1 Apr 2013 15:07:10 +0000 (+0100) Subject: Adjust pv:prop::Enum to GVariant-based sr_config_* functions X-Git-Tag: pulseview-0.1.0~52 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2db7704ab7ca681917b0eb091ea49378fe18c4a8;p=pulseview.git Adjust pv:prop::Enum to GVariant-based sr_config_* functions --- diff --git a/pv/prop/enum.cpp b/pv/prop/enum.cpp index 54fe5fed..894ba9f8 100644 --- a/pv/prop/enum.cpp +++ b/pv/prop/enum.cpp @@ -20,6 +20,7 @@ #include +#include #include #include "enum.h" @@ -32,8 +33,8 @@ namespace prop { Enum::Enum(QString name, vector > values, - function getter, - function setter) : + function getter, + function setter) : Property(name), _values(values), _getter(getter), @@ -74,7 +75,7 @@ void Enum::commit() if (index < 0) return; - _setter(_selector->itemData(index).value()); + _setter(_selector->itemData(index).value()); } } // prop diff --git a/pv/prop/enum.h b/pv/prop/enum.h index c2cc6395..02b60df5 100644 --- a/pv/prop/enum.h +++ b/pv/prop/enum.h @@ -24,6 +24,7 @@ #include #include +#include #include "property.h" class QComboBox; @@ -36,8 +37,8 @@ class Enum : public Property public: Enum(QString name, std::vector > values, - boost::function getter, - boost::function setter); + boost::function getter, + boost::function setter); QWidget* get_widget(QWidget *parent); @@ -45,8 +46,8 @@ public: private: const std::vector< std::pair > _values; - boost::function _getter; - boost::function _setter; + boost::function _getter; + boost::function _setter; QComboBox *_selector; };