SimpleIOProtocolSettingsWidget.hpp
1 #pragma once
2 #include <ossia/detail/config.hpp>
3 #if defined(OSSIA_PROTOCOL_SIMPLEIO)
4 
5 #include <Device/Protocol/DeviceSettings.hpp>
6 #include <Device/Protocol/ProtocolSettingsWidget.hpp>
7 
8 #include <Protocols/SimpleIO/SimpleIOSpecificSettings.hpp>
9 
10 #include <verdigris>
11 
12 class QLineEdit;
13 class QSpinBox;
14 class QTableWidget;
15 class QPushButton;
16 
17 namespace Protocols
18 {
19 
20 class SimpleIOProtocolSettingsWidget final : public Device::ProtocolSettingsWidget
21 {
22  W_OBJECT(SimpleIOProtocolSettingsWidget)
23 
24 public:
25  SimpleIOProtocolSettingsWidget(QWidget* parent = nullptr);
26  virtual ~SimpleIOProtocolSettingsWidget();
27  Device::DeviceSettings getSettings() const override;
28  void setSettings(const Device::DeviceSettings& settings) override;
29 
30 private:
31  void updateTable();
32  QLineEdit* m_deviceNameEdit{};
33  QTableWidget* m_portsWidget{};
34  QPushButton* m_addPort{};
35  QPushButton* m_rmPort{};
36  std::vector<SimpleIO::Port> m_ports;
37 };
38 }
39 #endif
Definition: ProtocolSettingsWidget.hpp:22
Definition: DeviceSettings.hpp:20