LibmapperClientDevice.hpp
1 #pragma once
2 #include <Device/Protocol/DeviceInterface.hpp>
3 
4 #include <Explorer/DefaultProtocolFactory.hpp>
5 
6 namespace Protocols
7 {
8 
10 {
11  QString id;
12 };
13 }
14 
17 
18 namespace Protocols
19 {
20 
22 {
23  W_OBJECT(LibmapperClientDevice)
24 public:
26  const Device::DeviceSettings& settings,
27  const ossia::net::network_context_ptr& ctx);
29 
30  bool reconnect() override;
31  void disconnect() override;
32 
33 private:
34  const ossia::net::network_context_ptr& m_ctx;
35 };
36 
38 {
39  SCORE_CONCRETE("708191fc-a901-414f-90c6-fef4a284330d")
40 
41  QString prettyName() const noexcept override;
42  QString category() const noexcept override;
43  Device::DeviceEnumerators getEnumerators(const score::DocumentContext& ctx) const override;
44 
45  Device::DeviceInterface* makeDevice(
46  const Device::DeviceSettings& settings,
47  const Explorer::DeviceDocumentPlugin& plugin,
48  const score::DocumentContext& ctx) override;
49 
50  const Device::DeviceSettings& defaultSettings() const noexcept override;
51 
52  Device::ProtocolSettingsWidget* makeSettingsWidget() override;
53 
54  QVariant makeProtocolSpecificSettings(const VisitorVariant& visitor) const override;
55 
56  void serializeProtocolSpecificSettings(
57  const QVariant& data, const VisitorVariant& visitor) const override;
58 
59  bool checkCompatibility(
60  const Device::DeviceSettings& a,
61  const Device::DeviceSettings& b) const noexcept override;
62 };
63 
65 {
67 
68 public:
69  LibmapperClientProtocolSettingsWidget(QWidget* parent = nullptr);
71 
72  Device::DeviceSettings getSettings() const override;
73  void setSettings(const Device::DeviceSettings& settings) override;
74 
75 protected:
76  QLineEdit* m_deviceNameEdit{};
77  Device::DeviceSettings m_settings;
78 };
79 
80 }
Definition: DeviceInterface.hpp:66
Definition: DeviceInterface.hpp:185
Definition: ProtocolSettingsWidget.hpp:22
Definition: DefaultProtocolFactory.hpp:10
Definition: LibmapperClientDevice.hpp:22
Definition: LibmapperClientDevice.hpp:38
Definition: LibmapperClientDevice.hpp:65
Definition: DeviceSettings.hpp:20
Definition: LibmapperClientDevice.hpp:10
The VisitorVariant struct.
Definition: VisitorInterface.hpp:26
Definition: DocumentContext.hpp:18