]> sigrok.org Git - pulseview.git/blobdiff - pv/dialogs/connect.cpp
Rename 'probe' to 'channel' (libsigrokdecode change).
[pulseview.git] / pv / dialogs / connect.cpp
index 11cf0e7b5de3e211643d62d6697ec9b6b80f1c10..d5ab9c4789f6dd9d79b4e601518bc9c4cd27bc44 100644 (file)
@@ -25,7 +25,7 @@
 #include "connect.h"
 
 #include "pv/devicemanager.h"
-#include "pv/devinst.h"
+#include "pv/device/device.h"
 
 extern "C" {
 /* __STDC_FORMAT_MACROS is required for PRIu64 and friends (in C++). */
@@ -82,17 +82,17 @@ Connect::Connect(QWidget *parent, pv::DeviceManager &device_manager) :
        _layout.addWidget(&_button_box);
 }
 
-shared_ptr<DevInst> Connect::get_selected_device() const
+shared_ptr<device::Device> Connect::get_selected_device() const
 {
        const QListWidgetItem *const item = _device_list.currentItem();
        if (!item)
-               return shared_ptr<DevInst>();
+               return shared_ptr<device::Device>();
 
        const sr_dev_inst *const sdi = (sr_dev_inst*)item->data(
                Qt::UserRole).value<void*>();
        assert(sdi);
 
-       std::map<const sr_dev_inst*, boost::shared_ptr<pv::DevInst> >::
+       std::map<const sr_dev_inst*, boost::shared_ptr<pv::device::Device> >::
                const_iterator iter = _device_map.find(sdi);
        assert(iter != _device_map.end());
 
@@ -170,12 +170,12 @@ void Connect::scan_pressed()
                drvopts = g_slist_append(drvopts, src);
        }
 
-       const list< shared_ptr<DevInst> > devices = _device_manager.driver_scan(
-               driver, drvopts);
+       const list< shared_ptr<device::Device> > devices =
+               _device_manager.driver_scan(driver, drvopts);
 
        g_slist_free_full(drvopts, (GDestroyNotify)free_drvopts);
 
-       BOOST_FOREACH(shared_ptr<DevInst> dev_inst, devices)
+       BOOST_FOREACH(shared_ptr<device::Device> dev_inst, devices)
        {
                assert(dev_inst);
                const sr_dev_inst *const sdi = dev_inst->dev_inst();
@@ -184,9 +184,9 @@ void Connect::scan_pressed()
                const string title = dev_inst->format_device_title();
                QString text = QString::fromUtf8(title.c_str());
 
-               if (sdi->probes) {
-                       text += QString(" with %1 probes").arg(
-                               g_slist_length(sdi->probes));
+               if (sdi->channels) {
+                       text += QString(" with %1 channels").arg(
+                               g_slist_length(sdi->channels));
                }
 
                QListWidgetItem *const item = new QListWidgetItem(text,