X-Git-Url: http://git.code-monkey.de/?p=pulseview.git;a=blobdiff_plain;f=pv%2Fdialogs%2Fconnect.cpp;h=bf92998b9b9e65fd7cd1ecf0d1d1c1564914f347;hp=fcb2103bedf77737d23f1c5e48b09f4af8199ef6;hb=2ad82c2e40b6865481733913a2c32735602f63c4;hpb=34750abe0a89c4b5184daf6dc117adfafa74a84e diff --git a/pv/dialogs/connect.cpp b/pv/dialogs/connect.cpp index fcb2103..bf92998 100644 --- a/pv/dialogs/connect.cpp +++ b/pv/dialogs/connect.cpp @@ -20,11 +20,12 @@ #include -#include +#include #include "connect.hpp" -#include "pv/devicemanager.hpp" +#include +#include using std::list; using std::map; @@ -38,7 +39,8 @@ using Glib::VariantBase; using sigrok::ConfigKey; using sigrok::Driver; using sigrok::Error; -using sigrok::HardwareDevice; + +using pv::devices::HardwareDevice; namespace pv { namespace dialogs { @@ -106,7 +108,7 @@ void Connect::populate_drivers() */ bool supported_device = driver->config_check( ConfigKey::LOGIC_ANALYZER, ConfigKey::DEVICE_OPTIONS) | - driver->config_check( + driver->config_check( ConfigKey::OSCILLOSCOPE, ConfigKey::DEVICE_OPTIONS); if (supported_device) @@ -167,16 +169,16 @@ void Connect::scan_pressed() serial.toUtf8().constData()); } - list< shared_ptr > devices = + const list< shared_ptr > devices = device_manager_.driver_scan(driver, drvopts); - for (shared_ptr device : devices) - { + for (shared_ptr device : devices) { assert(device); QString text = QString::fromStdString( - device_manager_.get_display_name(device)); - text += QString(" with %1 channels").arg(device->channels().size()); + device->display_name(device_manager_)); + text += QString(" with %1 channels").arg( + device->device()->channels().size()); QListWidgetItem *const item = new QListWidgetItem(text, &device_list_);