ProtocolSettingsWidget.hpp
1 #pragma once
2 
3 #include <Device/Address/AddressSettings.hpp>
4 #include <Device/Node/DeviceNode.hpp>
5 #include <Device/Protocol/DeviceSettings.hpp>
6 
7 #include <QDialog>
8 #include <QWidget>
9 
10 #include <score_lib_device_export.h>
11 
12 #include <verdigris>
13 
14 class QLineEdit;
15 class QComboBox;
16 class QSpinBox;
17 class QTextEdit;
18 class QCheckBox;
19 namespace Device
20 {
21 class SCORE_LIB_DEVICE_EXPORT ProtocolSettingsWidget : public QWidget
22 {
23  W_OBJECT(ProtocolSettingsWidget)
24 public:
25  using QWidget::QWidget;
26  virtual ~ProtocolSettingsWidget();
27  virtual Device::DeviceSettings getSettings() const = 0;
28  virtual Device::Node getDevice() const;
29  virtual void setSettings(const Device::DeviceSettings& settings) = 0;
30 
31  void changed() E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, changed)
32 
33  void checkForChanges(QLineEdit*);
34  void checkForChanges(QComboBox*);
35  void checkForChanges(QSpinBox*);
36  void checkForChanges(QTextEdit*);
37  void checkForChanges(QCheckBox*);
38 };
39 
40 class SCORE_LIB_DEVICE_EXPORT AddressDialog : public QDialog
41 {
42 public:
43  using QDialog::QDialog;
44  virtual ~AddressDialog();
45  virtual Device::AddressSettings getSettings() const = 0;
46 };
47 }
Definition: ProtocolSettingsWidget.hpp:41
Definition: ProtocolSettingsWidget.hpp:22
Manipulation of Devices from Qt.
Definition: AddressSettings.cpp:14
Definition: AddressSettings.hpp:49
Definition: DeviceSettings.hpp:20