From: Uwe Hermann Date: Thu, 20 Mar 2014 22:19:35 +0000 (+0100) Subject: Update for 'probe_group' -> 'channel_group' rename in libsigrok. X-Git-Tag: pulseview-0.2.0~10 X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=2445160a5d1eb98196d2a1d57246d4c37dd13811;p=pulseview.git Update for 'probe_group' -> 'channel_group' rename in libsigrok. This is an update related to bug #259. --- diff --git a/pv/device/devinst.cpp b/pv/device/devinst.cpp index 86595ae7..f85c6f5e 100644 --- a/pv/device/devinst.cpp +++ b/pv/device/devinst.cpp @@ -56,7 +56,7 @@ SigSession* DevInst::owner() const return _owner; } -GVariant* DevInst::get_config(const sr_probe_group *group, int key) +GVariant* DevInst::get_config(const sr_channel_group *group, int key) { GVariant *data = NULL; assert(_owner); @@ -67,7 +67,7 @@ GVariant* DevInst::get_config(const sr_probe_group *group, int key) return data; } -bool DevInst::set_config(const sr_probe_group *group, int key, GVariant *data) +bool DevInst::set_config(const sr_channel_group *group, int key, GVariant *data) { assert(_owner); sr_dev_inst *const sdi = dev_inst(); @@ -79,7 +79,7 @@ bool DevInst::set_config(const sr_probe_group *group, int key, GVariant *data) return false; } -GVariant* DevInst::list_config(const sr_probe_group *group, int key) +GVariant* DevInst::list_config(const sr_channel_group *group, int key) { GVariant *data = NULL; assert(_owner); diff --git a/pv/device/devinst.h b/pv/device/devinst.h index 8932f180..bdadc2c3 100644 --- a/pv/device/devinst.h +++ b/pv/device/devinst.h @@ -33,7 +33,7 @@ struct sr_dev_inst; struct sr_probe; -struct sr_probe_group; +struct sr_channel_group; namespace pv { @@ -59,11 +59,11 @@ public: virtual std::string format_device_title() const = 0; - GVariant* get_config(const sr_probe_group *group, int key); + GVariant* get_config(const sr_channel_group *group, int key); - bool set_config(const sr_probe_group *group, int key, GVariant *data); + bool set_config(const sr_channel_group *group, int key, GVariant *data); - GVariant* list_config(const sr_probe_group *group, int key); + GVariant* list_config(const sr_channel_group *group, int key); void enable_probe(const sr_probe *probe, bool enable = true); diff --git a/pv/popups/probes.cpp b/pv/popups/probes.cpp index 13380c2d..2e1e5924 100644 --- a/pv/popups/probes.cpp +++ b/pv/popups/probes.cpp @@ -68,11 +68,11 @@ Probes::Probes(SigSession &session, QWidget *parent) : BOOST_FOREACH(const shared_ptr &sig, sigs) signal_map[sig->probe()] = sig; - // Populate probe groups - for (const GSList *g = sdi->probe_groups; g; g = g->next) + // Populate channel groups + for (const GSList *g = sdi->channel_groups; g; g = g->next) { - const sr_probe_group *const group = - (const sr_probe_group*)g->data; + const sr_channel_group *const group = + (const sr_channel_group*)g->data; assert(group); // Make a set of signals, and removed this signals from the @@ -148,7 +148,7 @@ void Probes::set_all_probes(bool set) _updating_probes = false; } -void Probes::populate_group(const sr_probe_group *group, +void Probes::populate_group(const sr_channel_group *group, const vector< shared_ptr > sigs) { using pv::prop::binding::DeviceOptions; @@ -167,12 +167,12 @@ void Probes::populate_group(const sr_probe_group *group, _layout.addRow(new QLabel( QString("

%1

").arg(group->name))); - // Create the probe group grid + // Create the channel group grid QGridLayout *const probe_grid = - create_probe_group_grid(sigs); + create_channel_group_grid(sigs); _layout.addRow(probe_grid); - // Create the probe group options + // Create the channel group options if (binding) { binding->add_properties_to_form(&_layout, true); @@ -180,7 +180,7 @@ void Probes::populate_group(const sr_probe_group *group, } } -QGridLayout* Probes::create_probe_group_grid( +QGridLayout* Probes::create_channel_group_grid( const vector< shared_ptr > sigs) { int row = 0, col = 0; diff --git a/pv/popups/probes.h b/pv/popups/probes.h index 3760f420..dbf90cd0 100644 --- a/pv/popups/probes.h +++ b/pv/popups/probes.h @@ -33,7 +33,7 @@ #include -struct sr_probe_group; +struct sr_channel_group; class QCheckBox; class QGridLayout; @@ -64,10 +64,10 @@ public: private: void set_all_probes(bool set); - void populate_group(const sr_probe_group *group, + void populate_group(const sr_channel_group *group, const std::vector< boost::shared_ptr > sigs); - QGridLayout* create_probe_group_grid( + QGridLayout* create_channel_group_grid( const std::vector< boost::shared_ptr > sigs); private: diff --git a/pv/prop/binding/deviceoptions.cpp b/pv/prop/binding/deviceoptions.cpp index 26d4ef2a..863c19c0 100644 --- a/pv/prop/binding/deviceoptions.cpp +++ b/pv/prop/binding/deviceoptions.cpp @@ -46,7 +46,7 @@ namespace prop { namespace binding { DeviceOptions::DeviceOptions(shared_ptr dev_inst, - const sr_probe_group *group) : + const sr_channel_group *group) : _dev_inst(dev_inst), _group(group) { diff --git a/pv/prop/binding/deviceoptions.h b/pv/prop/binding/deviceoptions.h index 341d3d93..445361fd 100644 --- a/pv/prop/binding/deviceoptions.h +++ b/pv/prop/binding/deviceoptions.h @@ -31,7 +31,7 @@ #include struct sr_dev_inst; -struct sr_probe_group; +struct sr_channel_group; namespace pv { @@ -46,7 +46,7 @@ class DeviceOptions : public Binding { public: DeviceOptions(boost::shared_ptr dev_inst, - const sr_probe_group *group = NULL); + const sr_channel_group *group = NULL); private: void bind_bool(const QString &name, int key); @@ -62,7 +62,7 @@ private: protected: boost::shared_ptr _dev_inst; - const sr_probe_group *const _group; + const sr_channel_group *const _group; }; } // binding