LocalProtocolFactory.hpp
1 #pragma once
2 #include <Explorer/DefaultProtocolFactory.hpp>
3 
4 #include <QString>
5 #include <QVariant>
6 
7 namespace Device
8 {
9 class DeviceInterface;
10 class ProtocolSettingsWidget;
11 }
12 namespace score
13 {
14 struct DeviceSettings;
15 } // namespace score
16 struct VisitorVariant;
17 
18 namespace Protocols
19 {
21 {
22  SCORE_CONCRETE("3fad3354-e103-4bc4-a34f-2d0cc4b02565")
23 
24 public:
25  static const Device::DeviceSettings& static_defaultSettings();
26 
27 private:
28  // Implement with OSSIA::Device
29  QString prettyName() const noexcept override;
30  QString category() const noexcept override;
31  QUrl manual() const noexcept override;
32 
33  Device::DeviceInterface* makeDevice(
34  const Device::DeviceSettings& settings,
35  const Explorer::DeviceDocumentPlugin& plugin,
36  const score::DocumentContext& ctx) override;
37 
38  const Device::DeviceSettings& defaultSettings() const noexcept override;
39 
40  Device::ProtocolSettingsWidget* makeSettingsWidget() override;
41 
42  QVariant makeProtocolSpecificSettings(const VisitorVariant& visitor) const override;
43 
44  void serializeProtocolSpecificSettings(
45  const QVariant& data, const VisitorVariant& visitor) const override;
46 
47  bool checkCompatibility(
48  const Device::DeviceSettings& a,
49  const Device::DeviceSettings& b) const noexcept override;
50 };
51 }
Definition: DeviceInterface.hpp:66
Definition: ProtocolSettingsWidget.hpp:22
Definition: DefaultProtocolFactory.hpp:10
Definition: LocalProtocolFactory.hpp:21
Manipulation of Devices from Qt.
Definition: AddressSettings.cpp:14
Base toolkit upon which the software is built.
Definition: Application.cpp:90
Definition: DeviceSettings.hpp:20
The VisitorVariant struct.
Definition: VisitorInterface.hpp:26
Definition: DocumentContext.hpp:18