3 #include <score/model/Identifier.hpp>
4 #include <score/plugins/Interface.hpp>
6 #include <score/tools/Metadata.hpp>
11 #include <score_plugin_curve_export.h>
23 SCORE_INTERFACE(
SegmentFactory,
"608ecec9-d8bc-4b6b-8e9e-31867a310f1e")
27 virtual QString prettyName()
const = 0;
28 virtual QString category()
const = 0;
36 virtual QVariant makeCurveSegmentData()
const = 0;
38 virtual void serializeCurveSegmentData(
40 virtual QVariant makeCurveSegmentData(
const VisitorVariant& visitor)
const = 0;
51 return new T{id, parent};
56 return score::deserialize_dyn(vis, [&](
auto&& deserializer) {
57 return new T{deserializer, parent};
63 return new T{dat, parent};
66 QVariant makeCurveSegmentData()
const override
68 return QVariant::fromValue(
typename T::data_type{});
71 void serializeCurveSegmentData(
72 const QVariant& data,
const VisitorVariant& visitor)
const override
74 score::serialize_dyn(visitor, data.value<
typename T::data_type>());
77 QVariant makeCurveSegmentData(
const VisitorVariant& vis)
const override
79 return QVariant::fromValue(score::deserialize_dyn<typename T::data_type>(vis));
Metadata to categorize objects: curves, audio, etc.
Definition: lib/score/tools/Metadata.hpp:61
Definition: CurveSegmentFactory.hpp:45
Definition: CurveSegmentFactory.hpp:22
Definition: CurveSegmentModel.hpp:32
The id_base_t class.
Definition: Identifier.hpp:57
Base class for plug-in interfaces.
Definition: Interface.hpp:52
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Definition: CurveSegmentData.hpp:63
The VisitorVariant struct.
Definition: VisitorInterface.hpp:26