Loading...
Searching...
No Matches
MIDIProtocolFactory.hpp
1#pragma once
2#include <Explorer/DefaultProtocolFactory.hpp>
3
4#include <QString>
5#include <QVariant>
6
7namespace Device
8{
9class DeviceInterface;
10class ProtocolSettingsWidget;
11}
12namespace score
13{
14struct DeviceSettings;
15} // namespace score
16struct VisitorVariant;
17
18namespace Protocols
19{
21{
22 SCORE_CONCRETE("f5e04ef0-16dd-4997-8f81-f5a04b8702bc")
23public:
24 // Implement with OSSIA::Device
25 Device::ProtocolFactory::Flags flags() const noexcept override;
26 QString prettyName() const noexcept override;
27 QString category() const noexcept override;
28 QUrl manual() const noexcept override;
29
30 Device::DeviceEnumerators
31 getEnumerators(const score::DocumentContext& ctx) const 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 Device::AddressDialog* makeAddAddressDialog(
43 QWidget* parent) override;
44
45 Device::AddressDialog* makeEditAddressDialog(
47 const score::DocumentContext& ctx, QWidget*) override;
48 QVariant makeProtocolSpecificSettings(const VisitorVariant& visitor) const override;
49
50 void serializeProtocolSpecificSettings(
51 const QVariant& data, const VisitorVariant& visitor) const override;
52
53 bool checkCompatibility(
55 const Device::DeviceSettings& b) const noexcept override;
56};
57
59{
60 SCORE_CONCRETE("d5a4a701-d152-4b3b-be05-4d847b623451")
61public:
62 // Implement with OSSIA::Device
63 QString prettyName() const noexcept override;
64 QString category() const noexcept override;
65 QUrl manual() const noexcept override;
66
67 Device::DeviceEnumerators
68 getEnumerators(const score::DocumentContext& ctx) const override;
69
70 Device::DeviceInterface* makeDevice(
71 const Device::DeviceSettings& settings,
72 const Explorer::DeviceDocumentPlugin& plugin,
73 const score::DocumentContext& ctx) override;
74
75 const Device::DeviceSettings& defaultSettings() const noexcept override;
76
77 Device::ProtocolSettingsWidget* makeSettingsWidget() override;
78 Device::AddressDialog* makeAddAddressDialog(
80 QWidget* parent) override;
81
82 Device::AddressDialog* makeEditAddressDialog(
84 const score::DocumentContext& ctx, QWidget*) override;
85 QVariant makeProtocolSpecificSettings(const VisitorVariant& visitor) const override;
86
87 void serializeProtocolSpecificSettings(
88 const QVariant& data, const VisitorVariant& visitor) const override;
89
90 bool checkCompatibility(
92 const Device::DeviceSettings& b) const noexcept override;
93};
94}
Definition ProtocolSettingsWidget.hpp:41
Definition DeviceInterface.hpp:66
Definition ProtocolFactoryInterface.hpp:49
Definition ProtocolSettingsWidget.hpp:22
Definition MIDIProtocolFactory.hpp:21
Definition MIDIProtocolFactory.hpp:59
Manipulation of Devices from Qt.
Definition AddressSettings.cpp:14
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition AddressSettings.hpp:49
Definition DeviceSettings.hpp:20
The VisitorVariant struct.
Definition VisitorInterface.hpp:26
Definition DocumentContext.hpp:18