projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use libsigrok C++ bindings (patch version 7).
[pulseview.git]
/
pv
/
dialogs
/
connect.h
diff --git
a/pv/dialogs/connect.h
b/pv/dialogs/connect.h
index 443f6e07fde6c3a94dca2e28f8ac563aece77898..fbac9e3ecf23f51f8c71267b269a2011a43f9e91 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,19
+51,25
@@
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:
+ pv::DeviceManager &_device_manager;
+
QVBoxLayout _layout;
QWidget _form;
QVBoxLayout _layout;
QWidget _form;
@@
-58,6
+79,9
@@
private:
QLineEdit _serial_device;
QLineEdit _serial_device;
+ QPushButton _scan_button;
+ QListWidget _device_list;
+
QDialogButtonBox _button_box;
};
QDialogButtonBox _button_box;
};