2 #include <Process/Dataflow/PortForward.hpp>
3 #include <Process/ExpandMode.hpp>
4 #include <Process/Preset.hpp>
5 #include <Process/ProcessFlags.hpp>
6 #include <Process/TimeValue.hpp>
8 #include <Magnetism/MagneticInfo.hpp>
10 #include <score/model/Component.hpp>
11 #include <score/model/EntityImpl.hpp>
12 #include <score/model/Identifier.hpp>
13 #include <score/model/ModelMetadata.hpp>
14 #include <score/plugins/SerializableInterface.hpp>
15 #include <score/selection/Selectable.hpp>
16 #include <score/selection/Selection.hpp>
17 #include <score/serialization/VisitorInterface.hpp>
18 #include <score/tools/Metadata.hpp>
20 #include <ossia/detail/small_vector.hpp>
24 #include <score_lib_process_export.h>
25 #include <smallfun.hpp>
46 class ProcessModelFactory;
63 SCORE_SERIALIZE_FRIENDS
78 virtual QString effect()
const noexcept;
81 virtual QString prettyName()
const noexcept;
82 virtual QString prettyShortName()
const noexcept = 0;
83 virtual QString category()
const noexcept = 0;
84 virtual QStringList tags()
const noexcept = 0;
89 void setParentDuration(ExpandMode mode,
const TimeVal& t) noexcept;
91 virtual TimeVal contentDuration()
const noexcept;
93 void setDuration(
const TimeVal& other) noexcept;
94 const TimeVal& duration()
const noexcept;
97 QPointF position()
const noexcept;
98 QSizeF size()
const noexcept;
100 void setPosition(
const QPointF& v);
101 void setSize(
const QSizeF& v);
103 void positionChanged(QPointF p) E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, positionChanged, p)
104 void sizeChanged(QSizeF p) E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, sizeChanged, p)
107 QPointF, position W_READ position W_WRITE setPosition W_NOTIFY positionChanged)
108 PROPERTY(QSizeF, size W_READ size W_WRITE setSize W_NOTIFY sizeChanged)
115 virtual Selection selectableChildren()
const noexcept;
116 virtual Selection selectedChildren()
const noexcept;
117 virtual void setSelection(
const Selection& s)
const noexcept;
119 double getSlotHeight()
const noexcept;
120 void setSlotHeight(
double) noexcept;
128 virtual void loadPreset(
const Preset& preset);
129 virtual Preset savePreset()
const noexcept;
130 virtual std::vector<Process::Preset> builtinPresets()
const noexcept;
133 virtual void ancestorStartDateChanged();
134 virtual void ancestorTempoChanged();
136 virtual void forEachControl(
140 virtual std::optional<Process::MagneticInfo>
141 magneticPosition(
const QObject* o,
const TimeVal t)
const noexcept;
144 bool loops()
const noexcept {
return m_loops; }
145 void setLoops(
bool b);
146 void loopsChanged(
bool b) E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, loopsChanged, b)
147 PROPERTY(
bool, loops W_READ loops W_WRITE setLoops W_NOTIFY loopsChanged)
149 TimeVal startOffset()
const noexcept {
return m_startOffset; }
150 void setStartOffset(
TimeVal b);
151 void startOffsetChanged(
TimeVal b)
152 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, startOffsetChanged, b)
155 startOffset W_READ startOffset W_WRITE setStartOffset W_NOTIFY startOffsetChanged)
157 TimeVal loopDuration()
const noexcept {
return m_loopDuration; }
158 void setLoopDuration(
TimeVal b);
159 void loopDurationChanged(
TimeVal b)
160 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, loopDurationChanged, b)
162 TimeVal, loopDuration W_READ loopDuration W_WRITE setLoopDuration W_NOTIFY
165 virtual void setCreatingControls(
bool ok);
166 bool creatingControls()
const noexcept;
167 void creatingControlsChanged(
bool b)
168 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, creatingControlsChanged, b)
170 bool, creatingControls W_READ creatingControls W_WRITE setCreatingControls W_NOTIFY
171 creatingControlsChanged)
174 QWidget* externalUI{};
178 void stopExecution() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, stopExecution)
179 void resetExecution() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, resetExecution)
181 void durationChanged(const
TimeVal& arg_1)
182 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, durationChanged, arg_1)
183 void useParentDurationChanged(
bool arg_1)
184 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, useParentDurationChanged, arg_1)
186 void slotHeightChanged(
double arg_1)
187 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, slotHeightChanged, arg_1)
188 void prettyNameChanged() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, prettyNameChanged)
190 void inletsChanged() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, inletsChanged)
191 void outletsChanged() E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, outletsChanged)
194 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, controlAdded, arg_1)
196 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, controlRemoved, arg_1)
198 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, controlOutletAdded, arg_1)
199 void controlOutletRemoved(const
Process::
Port& arg_1)
200 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, controlOutletRemoved, arg_1)
202 void benchmark(
double arg_1) E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, benchmark, arg_1)
203 void externalUIVisible(
bool v) const
204 E_SIGNAL(SCORE_LIB_PROCESS_EXPORT, externalUIVisible, v)
212 virtual
void setDurationAndScale(const
TimeVal& newDuration) noexcept;
215 virtual
void setDurationAndGrow(const
TimeVal& newDuration) noexcept;
218 virtual
void setDurationAndShrink(const
TimeVal& newDuration) noexcept;
225 double m_slotHeight{};
228 QPointF m_position{};
233 SCORE_LIB_PROCESS_EXPORT
234 ProcessModel* parentProcess(QObject* obj) noexcept;
235 SCORE_LIB_PROCESS_EXPORT
236 const ProcessModel* parentProcess(
const QObject* obj) noexcept;
240 Q_DECLARE_METATYPE(
Id<
Process::ProcessModel>)
241 W_REGISTER_ARGTYPE(
Id<
Process::ProcessModel>)
242 W_REGISTER_ARGTYPE(OptionalId<
Process::ProcessModel>)
244 Q_DECLARE_METATYPE(
Process::ProcessModel*)
245 Q_DECLARE_METATYPE(const
Process::ProcessModel*)
246 W_REGISTER_ARGTYPE(
Process::ProcessModel*)
247 W_REGISTER_ARGTYPE(const
Process::ProcessModel*)
248 W_REGISTER_ARGTYPE(QPointer<const
Process::ProcessModel>)
249 W_REGISTER_ARGTYPE(QPointer<
Process::ProcessModel>)
251 Q_DECLARE_METATYPE(std::shared_ptr<
Process::Preset>)
252 W_REGISTER_ARGTYPE(std::shared_ptr<
Process::Preset>)
Definition: QmlObjects.hpp:406
Definition: QmlObjects.hpp:433
Definition: QmlObjects.hpp:114
Definition: DataStreamVisitor.hpp:202
Definition: JSONVisitor.hpp:423
Definition: QmlObjects.hpp:464
Definition: QmlObjects.hpp:500
Definition: QmlObjects.hpp:51
The Process class.
Definition: score-lib-process/Process/Process.hpp:61
void startExecution()
Execution.
Definition: ProcessStateDataInterface.hpp:24
The Selectable class.
Definition: Selectable.hpp:14
Definition: Selection.hpp:12
The id_base_t class.
Definition: Identifier.hpp:57
Base for complex model objects.
Definition: EntityBase.hpp:24
Generic serialization method for abstract classes.
Definition: SerializableInterface.hpp:21
Base classes and tools to implement processes and layers.
Definition: JSONVisitor.hpp:1324
ProcessFlags
Various settings for processes.
Definition: ProcessFlags.hpp:17
Definition: PortForward.hpp:23
Definition: PortForward.hpp:27
Definition: Preset.hpp:32
Definition: TimeValue.hpp:21