X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fdecoderoptions.h;h=a95bc33f3748b854220febdfd1ccdf10bbc60c59;hb=e8d009288de28cb194bc7964f96677c2baf900c9;hp=62f4fe184cb766e51b7affdfeab35ede0ad851fa;hpb=7491a29f33471b38e161b3254f4d8e708b05f929;p=pulseview.git diff --git a/pv/prop/binding/decoderoptions.h b/pv/prop/binding/decoderoptions.h index 62f4fe1..a95bc33 100644 --- a/pv/prop/binding/decoderoptions.h +++ b/pv/prop/binding/decoderoptions.h @@ -21,10 +21,12 @@ #ifndef PULSEVIEW_PV_PROP_BINDING_DECODEROPTIONS_H #define PULSEVIEW_PV_PROP_BINDING_DECODEROPTIONS_H -#include - #include "binding.h" +#include + +struct srd_decoder_option; + namespace pv { namespace data { @@ -40,17 +42,21 @@ namespace binding { class DecoderOptions : public Binding { public: - DecoderOptions(boost::shared_ptr decoder_stack, - boost::shared_ptr decoder); + DecoderOptions(std::shared_ptr decoder_stack, + std::shared_ptr decoder); private: - GVariant* getter(const char *id); + static std::shared_ptr bind_enum(const QString &name, + const srd_decoder_option *option, + Property::Getter getter, Property::Setter setter); + + Glib::VariantBase getter(const char *id); - void setter(const char *id, GVariant *value); + void setter(const char *id, Glib::VariantBase value); private: - boost::shared_ptr _decoder_stack; - boost::shared_ptr _decoder; + std::shared_ptr _decoder_stack; + std::shared_ptr _decoder; }; } // binding