projects
/
pulseview.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Connect dialog: Add support for connecting to raw-tcp devices
[pulseview.git]
/
pv
/
dialogs
/
connect.hpp
diff --git
a/pv/dialogs/connect.hpp
b/pv/dialogs/connect.hpp
index ba8339c7cc56d11cd250baa13d12384631ed3cfd..0cb50fbff060edd6bcb6c4c5e554a19ca18fb0fd 100644
(file)
--- a/
pv/dialogs/connect.hpp
+++ b/
pv/dialogs/connect.hpp
@@
-18,8
+18,8
@@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef PULSEVIEW_PV_CONNECT_H
-#define PULSEVIEW_PV_CONNECT_H
+#ifndef PULSEVIEW_PV_CONNECT_H
PP
+#define PULSEVIEW_PV_CONNECT_H
PP
#include <memory>
#include <memory>
@@
-27,18
+27,25
@@
#include <QDialog>
#include <QDialogButtonBox>
#include <QFormLayout>
#include <QDialog>
#include <QDialogButtonBox>
#include <QFormLayout>
+#include <QHBoxLayout>
#include <QLineEdit>
#include <QLineEdit>
+#include <QSpinBox>
#include <QListWidget>
#include <QPushButton>
#include <QVBoxLayout>
namespace sigrok {
#include <QListWidget>
#include <QPushButton>
#include <QVBoxLayout>
namespace sigrok {
- class Driver;
- class HardwareDevice;
+class Driver;
+}
+
+namespace pv {
+namespace devices {
+class HardwareDevice;
+}
}
Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Driver>);
}
Q_DECLARE_METATYPE(std::shared_ptr<sigrok::Driver>);
-Q_DECLARE_METATYPE(std::shared_ptr<
sigrok
::HardwareDevice>);
+Q_DECLARE_METATYPE(std::shared_ptr<
pv::devices
::HardwareDevice>);
namespace pv {
namespace pv {
@@
-53,7
+60,7
@@
class Connect : public QDialog
public:
Connect(QWidget *parent, pv::DeviceManager &device_manager);
public:
Connect(QWidget *parent, pv::DeviceManager &device_manager);
- std::shared_ptr<
sigrok
::HardwareDevice> get_selected_device() const;
+ std::shared_ptr<
devices
::HardwareDevice> get_selected_device() const;
private:
void populate_drivers();
private:
void populate_drivers();
@@
-63,6
+70,7
@@
private:
void unset_connection();
void set_serial_connection(std::shared_ptr<sigrok::Driver> driver);
void unset_connection();
void set_serial_connection(std::shared_ptr<sigrok::Driver> driver);
+ void set_tcp_connection(std::shared_ptr<sigrok::Driver> driver);
private Q_SLOTS:
void device_selected(int index);
private Q_SLOTS:
void device_selected(int index);
@@
-81,6
+89,11
@@
private:
QComboBox serial_devices_;
QComboBox serial_devices_;
+ QWidget tcp_endpoint_;
+ QHBoxLayout tcp_endpoint_layout_;
+ QLineEdit tcp_host_;
+ QSpinBox tcp_port_;
+
QPushButton scan_button_;
QListWidget device_list_;
QPushButton scan_button_;
QListWidget device_list_;
@@
-90,4
+103,4
@@
private:
} // namespace dialogs
} // namespace pv
} // namespace dialogs
} // namespace pv
-#endif // PULSEVIEW_PV_CONNECT_H
+#endif // PULSEVIEW_PV_CONNECT_H
PP