]> sigrok.org Git - pulseview.git/blobdiff - pv/prop/binding/decoderoptions.h
Rename 'probe' to 'channel' (libsigrokdecode change).
[pulseview.git] / pv / prop / binding / decoderoptions.h
index e507e87c3accebafe17d356eace0a52dadc6defe..6dec9c2ec5bd9d4a2ba5938c7191d3b767dbe30d 100644 (file)
 #ifndef PULSEVIEW_PV_PROP_BINDING_DECODEROPTIONS_H
 #define PULSEVIEW_PV_PROP_BINDING_DECODEROPTIONS_H
 
-#include <glib.h>
-
 #include "binding.h"
 
+#include <pv/prop/property.h>
+
+struct srd_decoder_option;
+
 namespace pv {
 
 namespace data {
 class DecoderStack;
+namespace decode {
+class Decoder;
+}
 }
 
 namespace prop {
@@ -37,15 +42,21 @@ namespace binding {
 class DecoderOptions : public Binding
 {
 public:
-       DecoderOptions(boost::shared_ptr<pv::data::DecoderStack> decoder);
+       DecoderOptions(boost::shared_ptr<pv::data::DecoderStack> decoder_stack,
+               boost::shared_ptr<pv::data::decode::Decoder> decoder);
 
 private:
+       static boost::shared_ptr<Property> bind_enum(const QString &name,
+               const srd_decoder_option *option,
+               Property::Getter getter, Property::Setter setter);
+
        GVariant* getter(const char *id);
 
        void setter(const char *id, GVariant *value);
 
 private:
-       boost::shared_ptr<pv::data::DecoderStack> _decoder;
+       boost::shared_ptr<pv::data::DecoderStack> _decoder_stack;
+       boost::shared_ptr<pv::data::decode::Decoder> _decoder;
 };
 
 } // binding