AddressAccessorEditWidget.hpp
1 #pragma once
2 #include <Device/Address/AddressSettings.hpp>
3 
4 #include <QWidget>
5 
6 #include <score_lib_device_export.h>
7 
8 #include <verdigris>
9 
10 class QLineEdit;
11 namespace score
12 {
13 struct DocumentContext;
14 }
15 namespace State
16 {
17 class DestinationQualifierWidget;
18 }
19 namespace Device
20 {
21 class NodeBasedItemModel;
22 }
23 namespace Device
24 {
25 class SCORE_LIB_DEVICE_EXPORT AddressAccessorEditWidget final : public QWidget
26 {
28 public:
29  AddressAccessorEditWidget(const score::DocumentContext& ctx, QWidget* parent);
30 
31  void setAddress(const State::AddressAccessor& addr);
32  void setFullAddress(Device::FullAddressAccessorSettings&& addr);
33 
34  const Device::FullAddressAccessorSettings& address() const;
35 
36  QString addressString() const;
37 
38  void dragEnterEvent(QDragEnterEvent* event) override;
39  void dropEvent(QDropEvent*) override;
40 
41 public:
42  void addressChanged(const Device::FullAddressAccessorSettings& arg_1)
43  E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, addressChanged, arg_1)
44 
45 private:
46  void customContextMenuEvent(const QPoint& p);
47  void startLearn();
48 
49  QLineEdit* m_lineEdit{};
51  Device::NodeBasedItemModel* m_model{};
52  State::DestinationQualifierWidget* m_qualifiers{};
53 };
54 }
Definition: AddressAccessorEditWidget.hpp:26
Definition: NodeBasedItemModel.hpp:18
Definition: UnitWidget.hpp:44
Manipulation of Devices from Qt.
Definition: AddressSettings.cpp:14
Utilities for OSSIA data structures.
Definition: DeviceInterface.hpp:33
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: AddressSettings.hpp:131
Definition: Address.hpp:108
Definition: DocumentContext.hpp:18