X-Git-Url: http://git.code-monkey.de/?a=blobdiff_plain;f=pv%2Fprop%2Fbinding%2Fdeviceoptions.h;h=1e422f67161d48d8349970cc4f04a52499073cae;hb=d23445348bf04a698e062a3b917360313ecbcaad;hp=0b441599e70df89b9c57f5665282cbadecf3a723;hpb=117ef0090a0c285369ce48bcc7e01d92faa9f329;p=pulseview.git diff --git a/pv/prop/binding/deviceoptions.h b/pv/prop/binding/deviceoptions.h index 0b44159..1e422f6 100644 --- a/pv/prop/binding/deviceoptions.h +++ b/pv/prop/binding/deviceoptions.h @@ -21,46 +21,47 @@ #ifndef PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H #define PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H -#include #include #include -#include - #include "binding.h" +#include + +struct sr_dev_inst; +struct sr_channel_group; + namespace pv { + +namespace device { +class DevInst; +} + namespace prop { namespace binding { class DeviceOptions : public Binding { public: - DeviceOptions(struct sr_dev_inst *sdi); + DeviceOptions(std::shared_ptr dev_inst, + const sr_channel_group *group = NULL); private: - - static GVariant* config_getter( - const struct sr_dev_inst *sdi, int key); - static void config_setter( - const struct sr_dev_inst *sdi, int key, GVariant* value); - void bind_bool(const QString &name, int key); void bind_enum(const QString &name, int key, GVariant *const gvar_list, - boost::function printer = print_gvariant); + std::function printer = print_gvariant); void bind_int(const QString &name, int key, QString suffix, boost::optional< std::pair > range); - static QString print_gvariant(GVariant *const gvar); - static QString print_timebase(GVariant *const gvar); static QString print_vdiv(GVariant *const gvar); static QString print_voltage_threshold(GVariant *const gvar); protected: - struct sr_dev_inst *const _sdi; + std::shared_ptr _dev_inst; + const sr_channel_group *const _group; }; } // binding