projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix #489 by implementing device tool button tooltip
[pulseview.git]
/
pv
/
prop
/
binding
/
deviceoptions.cpp
diff --git
a/pv/prop/binding/deviceoptions.cpp
b/pv/prop/binding/deviceoptions.cpp
index 0023eb2ea748bb608441e1835548d58deff0947a..c995ea697c01e6980adaefd9c0efa0676b36d35d 100644
(file)
--- a/
pv/prop/binding/deviceoptions.cpp
+++ b/
pv/prop/binding/deviceoptions.cpp
@@
-22,12
+22,12
@@
#include <QDebug>
#include <QDebug>
-#include "deviceoptions.h"
+#include "deviceoptions.h
pp
"
-#include <pv/prop/bool.h>
-#include <pv/prop/double.h>
-#include <pv/prop/enum.h>
-#include <pv/prop/int.h>
+#include <pv/prop/bool.h
pp
>
+#include <pv/prop/double.h
pp
>
+#include <pv/prop/enum.h
pp
>
+#include <pv/prop/int.h
pp
>
#include <libsigrok/libsigrok.hpp>
#include <libsigrok/libsigrok.hpp>
@@
-49,7
+49,7
@@
namespace prop {
namespace binding {
DeviceOptions::DeviceOptions(shared_ptr<sigrok::Configurable> configurable) :
namespace binding {
DeviceOptions::DeviceOptions(shared_ptr<sigrok::Configurable> configurable) :
-
_configurable
(configurable)
+
configurable_
(configurable)
{
assert(configurable);
{
assert(configurable);
@@
-76,9
+76,9
@@
DeviceOptions::DeviceOptions(shared_ptr<sigrok::Configurable> configurable) :
const QString name = QString::fromStdString(name_str);
const Property::Getter get = [&, key]() {
const QString name = QString::fromStdString(name_str);
const Property::Getter get = [&, key]() {
- return
_configurable
->config_get(key); };
+ return
configurable_
->config_get(key); };
const Property::Setter set = [&, key](Glib::VariantBase value) {
const Property::Setter set = [&, key](Glib::VariantBase value) {
-
_configurable
->config_set(key, value);
+
configurable_
->config_set(key, value);
config_changed();
};
config_changed();
};
@@
-86,7
+86,7
@@
DeviceOptions::DeviceOptions(shared_ptr<sigrok::Configurable> configurable) :
{
case SR_CONF_SAMPLERATE:
// Sample rate values are not bound because they are shown
{
case SR_CONF_SAMPLERATE:
// Sample rate values are not bound because they are shown
- // in the
Sampling
Bar
+ // in the
Main
Bar
break;
case SR_CONF_CAPTURE_RATIO:
break;
case SR_CONF_CAPTURE_RATIO:
@@
-130,8
+130,8
@@
DeviceOptions::DeviceOptions(shared_ptr<sigrok::Configurable> configurable) :
void DeviceOptions::bind_bool(const QString &name,
Property::Getter getter, Property::Setter setter)
{
void DeviceOptions::bind_bool(const QString &name,
Property::Getter getter, Property::Setter setter)
{
- assert(
_configurable
);
-
_properties
.push_back(shared_ptr<Property>(new Bool(
+ assert(
configurable_
);
+
properties_
.push_back(shared_ptr<Property>(new Bool(
name, getter, setter)));
}
name, getter, setter)));
}
@@
-142,13
+142,13
@@
void DeviceOptions::bind_enum(const QString &name,
Glib::VariantBase gvar;
vector< pair<Glib::VariantBase, QString> > values;
Glib::VariantBase gvar;
vector< pair<Glib::VariantBase, QString> > values;
- assert(
_configurable
);
+ assert(
configurable_
);
Glib::VariantIter iter(gvar_list);
while ((iter.next_value(gvar)))
values.push_back(make_pair(gvar, printer(gvar)));
Glib::VariantIter iter(gvar_list);
while ((iter.next_value(gvar)))
values.push_back(make_pair(gvar, printer(gvar)));
-
_properties
.push_back(shared_ptr<Property>(new Enum(name, values,
+
properties_
.push_back(shared_ptr<Property>(new Enum(name, values,
getter, setter)));
}
getter, setter)));
}
@@
-156,9
+156,9
@@
void DeviceOptions::bind_int(const QString &name, QString suffix,
optional< std::pair<int64_t, int64_t> > range,
Property::Getter getter, Property::Setter setter)
{
optional< std::pair<int64_t, int64_t> > range,
Property::Getter getter, Property::Setter setter)
{
- assert(
_configurable
);
+ assert(
configurable_
);
-
_properties
.push_back(shared_ptr<Property>(new Int(name, suffix, range,
+
properties_
.push_back(shared_ptr<Property>(new Int(name, suffix, range,
getter, setter)));
}
getter, setter)));
}
@@
-186,4
+186,3
@@
QString DeviceOptions::print_voltage_threshold(Glib::VariantBase gvar)
} // binding
} // prop
} // pv
} // binding
} // prop
} // pv
-