projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make member variable underscores a suffix instead of a prefix
[pulseview.git]
/
pv
/
dialogs
/
connect.h
diff --git
a/pv/dialogs/connect.h
b/pv/dialogs/connect.h
index 443f6e07fde6c3a94dca2e28f8ac563aece77898..b46da06fdfc28ce55645323750b94e5a95dc7a69 100644
(file)
--- a/
pv/dialogs/connect.h
+++ b/
pv/dialogs/connect.h
@@
-21,14
+21,29
@@
#ifndef PULSEVIEW_PV_CONNECT_H
#define PULSEVIEW_PV_CONNECT_H
#ifndef PULSEVIEW_PV_CONNECT_H
#define PULSEVIEW_PV_CONNECT_H
+#include <memory>
+
#include <QComboBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QLineEdit>
#include <QComboBox>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QLineEdit>
+#include <QListWidget>
+#include <QPushButton>
#include <QVBoxLayout>
#include <QVBoxLayout>
+namespace sigrok {
+ class Driver;
+ class HardwareDevice;
+}
+
+Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Driver>);
+Q_DECLARE_METATYPE(std::shared_ptr<sigrok::HardwareDevice>);
+
namespace pv {
namespace pv {
+
+class DeviceManager;
+
namespace dialogs {
class Connect : public QDialog
namespace dialogs {
class Connect : public QDialog
@@
-36,29
+51,38
@@
class Connect : public QDialog
Q_OBJECT
public:
Q_OBJECT
public:
- Connect(QWidget *parent);
+ Connect(QWidget *parent, pv::DeviceManager &device_manager);
+
+ std::shared_ptr<sigrok::HardwareDevice> get_selected_device() const;
private:
void populate_drivers();
private:
void populate_drivers();
-private slots:
- void device_selected(int index);
-
void unset_connection();
void set_serial_connection();
void unset_connection();
void set_serial_connection();
+private Q_SLOTS:
+ void device_selected(int index);
+
+ void scan_pressed();
+
private:
private:
- QVBoxLayout _layout;
+ pv::DeviceManager &device_manager_;
+
+ QVBoxLayout layout_;
+
+ QWidget form_;
+ QFormLayout form_layout_;
- QWidget _form;
- QFormLayout _form_layout;
+ QComboBox drivers_;
- Q
ComboBox _drivers
;
+ Q
LineEdit serial_device_
;
- QLineEdit _serial_device;
+ QPushButton scan_button_;
+ QListWidget device_list_;
- QDialogButtonBox
_button_box
;
+ QDialogButtonBox
button_box_
;
};
} // namespace dialogs
};
} // namespace dialogs