Loading...
Searching...
No Matches
SharedOutputSettings.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 <QString>
8
9#include <score_plugin_gfx_export.h>
10
11#include <verdigris>
12
13class QFormLayout;
14class QSpinBox;
15class QLineEdit;
16namespace Gfx
17{
18struct SCORE_PLUGIN_GFX_EXPORT SharedOutputSettings
19{
20 QString path;
21 int width{};
22 int height{};
23 double rate{};
24};
25
26class SCORE_PLUGIN_GFX_EXPORT SharedOutputProtocolFactory
28{
29public:
31 Device::AddressDialog* makeAddAddressDialog(
33 QWidget* parent) override;
34 Device::AddressDialog* makeEditAddressDialog(
36 const score::DocumentContext& ctx, QWidget*) override;
37
38 QVariant makeProtocolSpecificSettings(const VisitorVariant& visitor) const override;
39
40 void serializeProtocolSpecificSettings(
41 const QVariant& data, const VisitorVariant& visitor) const override;
42
43 bool checkCompatibility(
45 const Device::DeviceSettings& b) const noexcept override;
46
47 QString category() const noexcept override;
48};
49
50class SCORE_PLUGIN_GFX_EXPORT SharedOutputSettingsWidget
52{
53public:
54 SharedOutputSettingsWidget(QWidget* parent = nullptr);
55
56 Device::DeviceSettings getSettings() const override;
57
58 void setSettings(const Device::DeviceSettings& settings) override;
59
60protected:
61 QFormLayout* m_layout{};
62 QLineEdit* m_deviceNameEdit{};
63 QLineEdit* m_shmPath{};
64 QSpinBox* m_width{};
65 QSpinBox* m_height{};
66 QSpinBox* m_rate{};
67};
68
69}
70
71SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_PLUGIN_GFX_EXPORT, Gfx::SharedOutputSettings);
72Q_DECLARE_METATYPE(Gfx::SharedOutputSettings)
73W_REGISTER_ARGTYPE(Gfx::SharedOutputSettings)
Definition ProtocolSettingsWidget.hpp:41
Definition DeviceInterface.hpp:66
Definition ProtocolFactoryInterface.hpp:49
Definition ProtocolSettingsWidget.hpp:22
Definition SharedOutputSettings.hpp:28
Definition SharedOutputSettings.hpp:52
Binds the rendering pipeline to ossia processes.
Definition CameraDevice.cpp:28
Definition AddressSettings.hpp:49
Definition DeviceSettings.hpp:20
Definition SharedOutputSettings.hpp:19
The VisitorVariant struct.
Definition VisitorInterface.hpp:26
Definition DocumentContext.hpp:18