Fix #1146 by replacing the check box by a combo box
[pulseview.git] / pv / dialogs / connect.hpp
index e14972abd47150824dec6d811596df855bcec014..914c58783ee3693b87ed6b7c2a3232c0eb119a62 100644 (file)
 #include <QFormLayout>
 #include <QHBoxLayout>
 #include <QLineEdit>
-#include <QSpinBox>
 #include <QListWidget>
 #include <QPushButton>
+#include <QSpinBox>
 #include <QVBoxLayout>
 
+using std::shared_ptr;
+
 namespace sigrok {
 class Driver;
 }
@@ -44,8 +46,8 @@ class HardwareDevice;
 }
 }
 
-Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Driver>);
-Q_DECLARE_METATYPE(std::shared_ptr<pv::devices::HardwareDevice>);
+Q_DECLARE_METATYPE(shared_ptr<sigrok::Driver>);
+Q_DECLARE_METATYPE(shared_ptr<pv::devices::HardwareDevice>);
 
 namespace pv {
 
@@ -60,12 +62,12 @@ class Connect : public QDialog
 public:
        Connect(QWidget *parent, pv::DeviceManager &device_manager);
 
-       std::shared_ptr<devices::HardwareDevice> get_selected_device() const;
+       shared_ptr<devices::HardwareDevice> get_selected_device() const;
 
 private:
        void populate_drivers();
 
-       void populate_serials(std::shared_ptr<sigrok::Driver> driver);
+       void populate_serials(shared_ptr<sigrok::Driver> driver);
 
        void unset_connection();
 
@@ -92,7 +94,7 @@ private:
        QWidget *tcp_config_;
        QLineEdit *tcp_host_;
        QSpinBox *tcp_port_;
-       QCheckBox *tcp_use_vxi_;
+       QComboBox *tcp_protocol_;
 
        QPushButton scan_button_;
        QListWidget device_list_;