dialogs::Connect: Adds shortcut keys for "Driver", "Serial Port" and "Scan for device...
[pulseview.git] / pv / dialogs / connect.cpp
index 5535f46d7d87a28797d50b670ab54606b05df11a..3ced06dc9ee1aa6b70e49a15725c4b03e5dbf8ed 100644 (file)
@@ -22,9 +22,9 @@
 
 #include <libsigrok/libsigrok.hpp>
 
-#include "connect.h"
+#include "connect.hpp"
 
-#include "pv/devicemanager.h"
+#include "pv/devicemanager.hpp"
 
 using std::list;
 using std::map;
@@ -51,7 +51,7 @@ Connect::Connect(QWidget *parent, pv::DeviceManager &device_manager) :
        form_layout_(&form_),
        drivers_(&form_),
        serial_device_(&form_),
-       scan_button_(tr("Scan for Devices"), this),
+       scan_button_(tr("&Scan for Devices"), this),
        device_list_(this),
        button_box_(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
                Qt::Horizontal, this)
@@ -66,9 +66,9 @@ Connect::Connect(QWidget *parent, pv::DeviceManager &device_manager) :
                this, SLOT(device_selected(int)));
 
        form_.setLayout(&form_layout_);
-       form_layout_.addRow(tr("Driver"), &drivers_);
+       form_layout_.addRow(tr("&Driver"), &drivers_);
 
-       form_layout_.addRow(tr("Serial Port"), &serial_device_);
+       form_layout_.addRow(tr("Serial &Port"), &serial_device_);
 
        unset_connection();
 
@@ -104,7 +104,9 @@ void Connect::populate_drivers()
                 * and sensors.
                 */
                bool supported_device = driver->config_check(
-                       ConfigKey::SAMPLERATE, ConfigKey::DEVICE_OPTIONS);
+                       ConfigKey::LOGIC_ANALYZER, ConfigKey::DEVICE_OPTIONS) |
+                                       driver->config_check(
+                       ConfigKey::OSCILLOSCOPE, ConfigKey::DEVICE_OPTIONS);
 
                if (supported_device)
                        drivers_.addItem(QString("%1 (%2)").arg(