#include <QDebug>
-#include "deviceoptions.h"
+#include "deviceoptions.hpp"
-#include <pv/prop/bool.h>
-#include <pv/prop/double.h>
-#include <pv/prop/enum.h>
-#include <pv/prop/int.h>
+#include <pv/prop/bool.hpp>
+#include <pv/prop/double.hpp>
+#include <pv/prop/enum.hpp>
+#include <pv/prop/int.hpp>
-#include <libsigrok/libsigrok.hpp>
+#include <libsigrokcxx/libsigrokcxx.hpp>
using boost::optional;
using std::function;
namespace binding {
DeviceOptions::DeviceOptions(shared_ptr<sigrok::Configurable> configurable) :
- _configurable(configurable)
+ configurable_(configurable)
{
assert(configurable);
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) {
- _configurable->config_set(key, value);
+ configurable_->config_set(key, value);
config_changed();
};
{
case SR_CONF_SAMPLERATE:
// Sample rate values are not bound because they are shown
- // in the SamplingBar
+ // in the MainBar
break;
case SR_CONF_CAPTURE_RATIO:
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)));
}
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)));
- _properties.push_back(shared_ptr<Property>(new Enum(name, values,
+ properties_.push_back(shared_ptr<Property>(new Enum(name, values,
getter, 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)));
}
} // binding
} // prop
} // pv
-