From 3820592a018c777727a6e65bd754d113742f4462 Mon Sep 17 00:00:00 2001 From: Joel Holdsworth Date: Sun, 27 Jan 2013 09:40:29 +0000 Subject: [PATCH] Renamed pv::prop::binding::HwCap to DeviceOptions --- CMakeLists.txt | 2 +- pv/dialogs/hwcap.cpp | 6 +++--- pv/dialogs/hwcap.h | 4 ++-- pv/prop/binding/{hwcap.cpp => deviceoptions.cpp} | 15 ++++++++------- pv/prop/binding/{hwcap.h => deviceoptions.h} | 10 +++++----- 5 files changed, 19 insertions(+), 18 deletions(-) rename pv/prop/binding/{hwcap.cpp => deviceoptions.cpp} (89%) rename pv/prop/binding/{hwcap.h => deviceoptions.h} (86%) diff --git a/CMakeLists.txt b/CMakeLists.txt index ebe156d..8dd7c25 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -104,7 +104,7 @@ set(pulseview_SOURCES pv/prop/enum.cpp pv/prop/property.cpp pv/prop/binding/binding.cpp - pv/prop/binding/hwcap.cpp + pv/prop/binding/deviceoptions.cpp pv/view/analogsignal.cpp pv/view/cursor.cpp pv/view/header.cpp diff --git a/pv/dialogs/hwcap.cpp b/pv/dialogs/hwcap.cpp index 03255f9..f3b9400 100644 --- a/pv/dialogs/hwcap.cpp +++ b/pv/dialogs/hwcap.cpp @@ -28,7 +28,7 @@ HwCap::HwCap(QWidget *parent, struct sr_dev_inst *sdi) : _layout(this), _button_box(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal, this), - _hw_cap_binding(sdi) + _device_options_binding(sdi) { setWindowTitle(tr("Configure Device")); @@ -37,7 +37,7 @@ HwCap::HwCap(QWidget *parent, struct sr_dev_inst *sdi) : setLayout(&_layout); - QWidget *const form = _hw_cap_binding.get_form(this); + QWidget *const form = _device_options_binding.get_form(this); _layout.addWidget(form); _layout.addWidget(&_button_box); @@ -46,7 +46,7 @@ HwCap::HwCap(QWidget *parent, struct sr_dev_inst *sdi) : void HwCap::accept() { QDialog::accept(); - _hw_cap_binding.commit(); + _device_options_binding.commit(); } } // namespace dialogs diff --git a/pv/dialogs/hwcap.h b/pv/dialogs/hwcap.h index 771c897..692b743 100644 --- a/pv/dialogs/hwcap.h +++ b/pv/dialogs/hwcap.h @@ -25,7 +25,7 @@ #include #include -#include +#include namespace pv { namespace dialogs { @@ -42,7 +42,7 @@ private: QVBoxLayout _layout; QDialogButtonBox _button_box; - pv::prop::binding::HwCap _hw_cap_binding; + pv::prop::binding::DeviceOptions _device_options_binding; }; } // namespace dialogs diff --git a/pv/prop/binding/hwcap.cpp b/pv/prop/binding/deviceoptions.cpp similarity index 89% rename from pv/prop/binding/hwcap.cpp rename to pv/prop/binding/deviceoptions.cpp index cb68987..b6f2f13 100644 --- a/pv/prop/binding/hwcap.cpp +++ b/pv/prop/binding/deviceoptions.cpp @@ -20,7 +20,7 @@ #include -#include "hwcap.h" +#include "deviceoptions.h" #include @@ -31,7 +31,7 @@ namespace pv { namespace prop { namespace binding { -HwCap::HwCap(struct sr_dev_inst *sdi) : +DeviceOptions::DeviceOptions(struct sr_dev_inst *sdi) : _sdi(sdi) { const int *options; @@ -81,7 +81,7 @@ HwCap::HwCap(struct sr_dev_inst *sdi) : } } -void HwCap::expose_enum(const struct sr_config_info *info, +void DeviceOptions::expose_enum(const struct sr_config_info *info, const vector< pair > &values, int key) { _properties.push_back(shared_ptr( @@ -90,7 +90,8 @@ void HwCap::expose_enum(const struct sr_config_info *info, bind(sr_config_set, _sdi, key, _1)))); } -void HwCap::bind_stropt(const struct sr_config_info *info, int key) +void DeviceOptions::bind_stropt( + const struct sr_config_info *info, int key) { const char **stropts; if (sr_config_list(_sdi->driver, key, @@ -104,7 +105,7 @@ void HwCap::bind_stropt(const struct sr_config_info *info, int key) expose_enum(info, values, key); } -void HwCap::bind_buffer_size(const struct sr_config_info *info) +void DeviceOptions::bind_buffer_size(const struct sr_config_info *info) { const uint64_t *sizes; if (sr_config_list(_sdi->driver, SR_CONF_BUFFERSIZE, @@ -119,7 +120,7 @@ void HwCap::bind_buffer_size(const struct sr_config_info *info) expose_enum(info, values, SR_CONF_BUFFERSIZE); } -void HwCap::bind_time_base(const struct sr_config_info *info) +void DeviceOptions::bind_time_base(const struct sr_config_info *info) { struct sr_rational *timebases; if (sr_config_list(_sdi->driver, SR_CONF_TIMEBASE, @@ -135,7 +136,7 @@ void HwCap::bind_time_base(const struct sr_config_info *info) expose_enum(info, values, SR_CONF_TIMEBASE); } -void HwCap::bind_vdiv(const struct sr_config_info *info) +void DeviceOptions::bind_vdiv(const struct sr_config_info *info) { struct sr_rational *vdivs; if (sr_config_list(_sdi->driver, SR_CONF_VDIV, diff --git a/pv/prop/binding/hwcap.h b/pv/prop/binding/deviceoptions.h similarity index 86% rename from pv/prop/binding/hwcap.h rename to pv/prop/binding/deviceoptions.h index 1c6a747..ce0799b 100644 --- a/pv/prop/binding/hwcap.h +++ b/pv/prop/binding/deviceoptions.h @@ -18,8 +18,8 @@ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef PULSEVIEW_PV_PROP_BINDING_HWCAP_H -#define PULSEVIEW_PV_PROP_BINDING_HWCAP_H +#ifndef PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H +#define PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H #include @@ -33,10 +33,10 @@ namespace pv { namespace prop { namespace binding { -class HwCap : public Binding +class DeviceOptions : public Binding { public: - HwCap(struct sr_dev_inst *sdi); + DeviceOptions(struct sr_dev_inst *sdi); private: void expose_enum(const struct sr_config_info *info, @@ -57,4 +57,4 @@ protected: } // prop } // pv -#endif // PULSEVIEW_PV_PROP_BINDING_HWCAP_H +#endif // PULSEVIEW_PV_PROP_BINDING_DEVICEOPTIONS_H -- 2.30.2