X-Git-Url: https://sigrok.org/gitweb/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fbinding%2Finputoutput.cpp;h=0dc0fc19dd5a8e6d38ac7bf79ebd89c9705cf92c;hp=42ebf06263539bc582f16a7b1d27e2fbcf128bec;hb=ec6cc07fed12f5070eee6b8cb11343e83d42533c;hpb=0c9136370d062b08e47657e12f77518197d89339 diff --git a/pv/binding/inputoutput.cpp b/pv/binding/inputoutput.cpp index 42ebf062..0dc0fc19 100644 --- a/pv/binding/inputoutput.cpp +++ b/pv/binding/inputoutput.cpp @@ -26,6 +26,7 @@ #include +#include #include #include #include @@ -47,6 +48,7 @@ using Glib::VariantType; using sigrok::Option; +using pv::prop::Bool; using pv::prop::Double; using pv::prop::Enum; using pv::prop::Int; @@ -79,10 +81,14 @@ InputOutput::InputOutput( if (!opt->values().empty()) prop = bind_enum(name, values, get, set); + else if (def_val.is_of_type(VariantType("b"))) + prop = shared_ptr(new Bool(name, get, set)); else if (def_val.is_of_type(VariantType("d"))) prop = shared_ptr(new Double(name, 2, "", - nullptr, nullptr, get, set)); - else if (def_val.is_of_type(VariantType("u"))) + none, none, get, set)); + else if (def_val.is_of_type(VariantType("i")) || + def_val.is_of_type(VariantType("t")) || + def_val.is_of_type(VariantType("u"))) prop = shared_ptr( new Int(name, "", none, get, set)); else if (def_val.is_of_type(VariantType("s")))