X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fdecoderoptions.h;h=7f14d0fd4448b3a328c93964fc668564aec100e5;hp=ac32d42cabf29c9260da357d5e22b6a7d4a620f2;hb=8dbbc7f0b9ea59d0f0d62225772f8a56eee125f5;hpb=21ad818feabcb0a1cb51c61c534adce553c7e325 diff --git a/pv/prop/binding/decoderoptions.h b/pv/prop/binding/decoderoptions.h index ac32d42c..7f14d0fd 100644 --- a/pv/prop/binding/decoderoptions.h +++ b/pv/prop/binding/decoderoptions.h @@ -21,21 +21,42 @@ #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 { +class DecoderStack; +namespace decode { +class Decoder; +} +} + namespace prop { namespace binding { class DecoderOptions : public Binding { public: - DecoderOptions(struct srd_decoder *decoder); + DecoderOptions(std::shared_ptr decoder_stack, + std::shared_ptr decoder); + +private: + 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, Glib::VariantBase value); -protected: - struct srd_decoder *const _decoder; +private: + std::shared_ptr decoder_stack_; + std::shared_ptr decoder_; }; } // binding