Loading...
Searching...
No Matches
SharedInputSettings.hpp
1#pragma once
2#include <Device/Protocol/DeviceInterface.hpp>
3#include <Device/Protocol/DeviceSettings.hpp>
4#include <Device/Protocol/ProtocolFactoryInterface.hpp>
5#include <Device/Protocol/ProtocolSettingsWidget.hpp>
6
7#include <Gfx/SharedInputSettings.hpp>
8
9#include <QString>
10
11#include <score_plugin_gfx_export.h>
12
13#include <verdigris>
14
15class QFormLayout;
16class QSpinBox;
17class QLineEdit;
18namespace Gfx
19{
20struct SCORE_PLUGIN_GFX_EXPORT SharedInputSettings
21{
22 QString path;
23};
24
25class SCORE_PLUGIN_GFX_EXPORT SharedInputProtocolFactory : public Device::ProtocolFactory
26{
27public:
29
30 QString category() const noexcept override;
31
32 Device::AddressDialog* makeAddAddressDialog(
34 QWidget* parent) override;
35 Device::AddressDialog* makeEditAddressDialog(
37 const score::DocumentContext& ctx, QWidget*) override;
38
39 QVariant makeProtocolSpecificSettings(const VisitorVariant& visitor) const override;
40
41 void serializeProtocolSpecificSettings(
42 const QVariant& data, const VisitorVariant& visitor) const override;
43
44 bool checkCompatibility(
46 const Device::DeviceSettings& b) const noexcept override;
47};
48
49class SCORE_PLUGIN_GFX_EXPORT SharedInputSettingsWidget
51{
52public:
53 SharedInputSettingsWidget(QWidget* parent = nullptr);
54
55 Device::DeviceSettings getSettings() const override;
56
57 void setSettings(const Device::DeviceSettings& settings) override;
58
59protected:
60 Device::DeviceSettings m_settings;
61 QFormLayout* m_layout{};
62 QLineEdit* m_deviceNameEdit{};
63 QLineEdit* m_shmPath{};
64};
65
66}
67
68SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_PLUGIN_GFX_EXPORT, Gfx::SharedInputSettings);
69Q_DECLARE_METATYPE(Gfx::SharedInputSettings)
70W_REGISTER_ARGTYPE(Gfx::SharedInputSettings)
Definition ProtocolSettingsWidget.hpp:41
Definition DeviceInterface.hpp:66
Definition ProtocolFactoryInterface.hpp:49
Definition ProtocolSettingsWidget.hpp:22
Definition SharedInputSettings.hpp:26
Definition SharedInputSettings.hpp:51
Binds the rendering pipeline to ossia processes.
Definition CameraDevice.cpp:28
Definition AddressSettings.hpp:49
Definition DeviceSettings.hpp:20
Definition SharedInputSettings.hpp:21
The VisitorVariant struct.
Definition VisitorInterface.hpp:26
Definition DocumentContext.hpp:18