2 #include <Device/Protocol/DeviceSettings.hpp>
4 #include <score/document/DocumentContext.hpp>
5 #include <score/plugins/Interface.hpp>
6 #include <score/plugins/UuidKeySerialization.hpp>
12 #include <score_lib_device_export.h>
19 class DeviceDocumentPlugin;
23 struct DeviceSettings;
24 struct AddressSettings;
25 class DeviceInterface;
26 class ProtocolSettingsWidget;
39 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, deviceAdded, n, s)
40 void deviceRemoved(
const QString& s)
41 E_SIGNAL(SCORE_LIB_DEVICE_EXPORT, deviceRemoved, s)
44 using DeviceEnumerators = std::vector<std::pair<QString, Device::DeviceEnumerator*>>;
48 SCORE_INTERFACE(
ProtocolFactory,
"3f69d72e-318d-42dc-b48c-a806036592f1")
54 static const constexpr
auto osc =
"Network";
55 static const constexpr
auto audio =
"Audio";
56 static const constexpr
auto video =
"Video";
57 static const constexpr
auto web =
"Web";
58 static const constexpr
auto hardware =
"Hardware";
59 static const constexpr
auto software =
"Software";
60 static const constexpr
auto lights =
"Lights";
61 static const constexpr
auto util =
"Utilities";
66 EditingReloadsEverything = (1 << 0)
69 virtual Flags flags() const noexcept;
71 virtual QString prettyName() const noexcept = 0;
72 virtual QString category() const noexcept = 0;
73 virtual QUrl manual() const noexcept;
77 virtual
int visualPriority() const noexcept;
79 virtual DeviceEnumerators getEnumerators(const
score::DocumentContext& ctx) const;
83 const Explorer::DeviceDocumentPlugin& plugin, const
score::DocumentContext& ctx)
93 const
score::DocumentContext& ctx, QWidget*)
99 virtual
void serializeProtocolSpecificSettings(
103 template <typename T>
104 void serializeProtocolSpecificSettings_T(
107 score::serialize_dyn(visitor, data.value<T>());
111 virtual QVariant makeProtocolSpecificSettings(
const VisitorVariant& visitor)
const = 0;
113 template <
typename T>
114 QVariant makeProtocolSpecificSettings_T(
const VisitorVariant& vis)
const
116 return QVariant::fromValue(score::deserialize_dyn<T>(vis));
122 virtual bool checkResourcesAvailable(
126 virtual bool checkCompatibility(
Definition: ProtocolSettingsWidget.hpp:41
Definition: ProtocolFactoryInterface.hpp:29
Definition: DeviceInterface.hpp:66
Definition: ProtocolFactoryInterface.hpp:47
Base class for plug-in interfaces.
Definition: Interface.hpp:52
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
Definition: ProtocolFactoryInterface.hpp:53
The VisitorVariant struct.
Definition: VisitorInterface.hpp:26