projects
/
pulseview.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
1dccc4a
)
pv::binding::InputOutput: Bound up more integer types and Bool
author
Joel Holdsworth
<joel@airwebreathe.org.uk>
Sun, 22 Feb 2015 14:56:56 +0000
(14:56 +0000)
committer
Joel Holdsworth
<joel@airwebreathe.org.uk>
Thu, 28 May 2015 14:59:04 +0000
(15:59 +0100)
pv/binding/inputoutput.cpp
patch
|
blob
|
history
diff --git
a/pv/binding/inputoutput.cpp
b/pv/binding/inputoutput.cpp
index 42ebf06263539bc582f16a7b1d27e2fbcf128bec..956b12b32ff4d04de89c7e26f84352b689520930 100644
(file)
--- a/
pv/binding/inputoutput.cpp
+++ b/
pv/binding/inputoutput.cpp
@@
-26,6
+26,7
@@
#include <libsigrokcxx/libsigrokcxx.hpp>
#include <libsigrokcxx/libsigrokcxx.hpp>
+#include <pv/prop/bool.hpp>
#include <pv/prop/double.hpp>
#include <pv/prop/enum.hpp>
#include <pv/prop/int.hpp>
#include <pv/prop/double.hpp>
#include <pv/prop/enum.hpp>
#include <pv/prop/int.hpp>
@@
-47,6
+48,7
@@
using Glib::VariantType;
using sigrok::Option;
using sigrok::Option;
+using pv::prop::Bool;
using pv::prop::Double;
using pv::prop::Enum;
using pv::prop::Int;
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);
if (!opt->values().empty())
prop = bind_enum(name, values, get, set);
+ else if (def_val.is_of_type(VariantType("b")))
+ prop = shared_ptr<Property>(new Bool(name, get, set));
else if (def_val.is_of_type(VariantType("d")))
prop = shared_ptr<Property>(new Double(name, 2, "",
nullptr, nullptr, get, set));
else if (def_val.is_of_type(VariantType("d")))
prop = shared_ptr<Property>(new Double(name, 2, "",
nullptr, nullptr, get, set));
- else if (def_val.is_of_type(VariantType("u")))
+ 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<Property>(
new Int(name, "", none, get, set));
else if (def_val.is_of_type(VariantType("s")))
prop = shared_ptr<Property>(
new Int(name, "", none, get, set));
else if (def_val.is_of_type(VariantType("s")))