+ const list< shared_ptr<HardwareDevice> > devices =
+ device_manager_.driver_scan(driver, drvopts);
+
+ for (shared_ptr<HardwareDevice> device : devices)
+ {
+ assert(device);
+
+ QString text = QString::fromStdString(
+ device->display_name(device_manager_));
+ text += QString(" with %1 channels").arg(
+ device->device()->channels().size());
+
+ QListWidgetItem *const item = new QListWidgetItem(text,
+ &device_list_);
+ item->setData(Qt::UserRole, qVariantFromValue(device));
+ device_list_.addItem(item);
+ }
+
+ device_list_.setCurrentRow(0);
+ button_box_.button(QDialogButtonBox::Ok)->setDisabled(device_list_.count() == 0);