Loading...
Searching...
No Matches
score-lib-process/Process/ProcessFactory.hpp
1#pragma once
2#include <Process/ProcessMetadata.hpp>
3#include <Process/TimeValue.hpp>
4
5#include <score/model/Identifier.hpp>
6#include <score/plugins/Interface.hpp>
7
8#include <score_lib_process_export.h>
9
10class QGraphicsItem;
11class QObject;
12struct VisitorVariant;
13namespace score
14{
15struct DocumentContext;
16class ResizeableItem;
17}
18namespace Process
19{
20class LayerPresenter;
21class HeaderDelegate;
22class FooterDelegate;
23class LayerView;
24class MiniLayer;
25class ProcessModel;
26struct Preset;
27struct Context;
28
34class SCORE_LIB_PROCESS_EXPORT ProcessModelFactory : public score::InterfaceBase
35{
36 SCORE_INTERFACE(ProcessModel, "507ae654-f3b8-4aae-afc3-7ab8e1a3a86f")
37public:
38 ~ProcessModelFactory() override;
39
40 virtual QString prettyName() const noexcept = 0;
41 virtual QString category() const noexcept = 0;
42 virtual ProcessFlags flags() const noexcept = 0;
43 virtual Descriptor descriptor(QString) const noexcept = 0;
44 virtual Descriptor descriptor(const Process::ProcessModel&) const noexcept;
45
46 virtual QString customConstructionData() const noexcept;
47
48 virtual Process::ProcessModel* make(
49 const TimeVal& duration, const QString& data, const Id<ProcessModel>& id,
50 const score::DocumentContext& ctx, QObject* parent)
51 = 0;
52
54 load(const VisitorVariant&, const score::DocumentContext& ctx, QObject* parent)
55 = 0;
56};
57
58class SCORE_LIB_PROCESS_EXPORT LayerFactory : public score::InterfaceBase
59{
60 SCORE_INTERFACE(ProcessModel, "aeee61e4-89aa-42ec-aa33-bf4522ed710b")
61public:
62 static const constexpr bool ui_interface = true;
63 ~LayerFactory() override;
64
65 virtual std::optional<double> recommendedHeight() const noexcept;
66
67 virtual Process::LayerPresenter* makeLayerPresenter(
69 QObject* parent) const;
70
71 virtual Process::LayerView* makeLayerView(
72 const Process::ProcessModel&, const Process::Context& context,
73 QGraphicsItem* parent) const;
74
75 virtual Process::MiniLayer*
76 makeMiniLayer(const Process::ProcessModel&, QGraphicsItem* parent) const;
77
78 virtual score::ResizeableItem* makeItem(
79 const Process::ProcessModel&, const Process::Context& ctx,
80 QGraphicsItem* parent) const;
81
82 virtual bool hasExternalUI(
83 const Process::ProcessModel& proc,
84 const score::DocumentContext& ctx) const noexcept;
85 virtual QWidget* makeExternalUI(
87 QWidget* parent) const;
88
89 virtual HeaderDelegate* makeHeaderDelegate(
90 const ProcessModel& model, const Process::Context& ctx,
91 QGraphicsItem* parent) const;
92 virtual FooterDelegate*
93 makeFooterDelegate(const ProcessModel& model, const Process::Context& ctx) const;
94
95 bool matches(const Process::ProcessModel& p) const;
96 virtual bool matches(const UuidKey<Process::ProcessModel>&) const = 0;
97};
98}
Definition HeaderDelegate.hpp:16
Definition score-lib-process/Process/ProcessFactory.hpp:59
Definition LayerPresenter.hpp:34
Definition LayerView.hpp:21
Definition LayerView.hpp:95
The ProcessFactory class.
Definition score-lib-process/Process/ProcessFactory.hpp:35
The Process class.
Definition score-lib-process/Process/Process.hpp:61
Definition UuidKey.hpp:343
The id_base_t class.
Definition Identifier.hpp:57
Base class for plug-in interfaces.
Definition Interface.hpp:52
Definition RectItem.hpp:12
Base classes and tools to implement processes and layers.
Definition JSONVisitor.hpp:1324
ProcessFlags
Various settings for processes.
Definition ProcessFlags.hpp:17
Base toolkit upon which the software is built.
Definition Application.cpp:90
Definition ProcessContext.hpp:12
Definition score-lib-process/Process/ProcessMetadata.hpp:37
Definition TimeValue.hpp:21
The VisitorVariant struct.
Definition VisitorInterface.hpp:26
Definition ObjectMatches.hpp:6
Definition DocumentContext.hpp:18