2 #include <Curve/Segment/CurveSegmentModel.hpp>
4 #include <score/model/IdentifiedObject.hpp>
5 #include <score/model/IdentifiedObjectMap.hpp>
6 #include <score/model/Identifier.hpp>
7 #include <score/serialization/VisitorInterface.hpp>
9 #include <score_plugin_curve_export.h>
26 SCORE_SERIALIZE_FRIENDS
31 template <
typename Impl>
32 Model(Impl& vis, QObject* parent)
44 void loadSegments(
const std::vector<SegmentModel*>& models);
49 std::vector<SegmentModel*> sortedSegments()
const;
50 std::vector<SegmentData> toCurveData()
const;
51 void fromCurveData(
const std::vector<SegmentData>& curve);
58 const auto& segments()
const {
return m_segments; }
59 auto& segments() {
return m_segments; }
61 const std::vector<PointModel*>& points()
const;
62 std::vector<PointModel*>& points() {
return m_points; }
64 double lastPointPos()
const;
66 std::optional<double> valueAt(
double x)
const noexcept;
70 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, segmentAdded, arg_1)
72 SCORE_PLUGIN_CURVE_EXPORT, segmentRemoved,
75 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, pointAdded, arg_1)
77 SCORE_PLUGIN_CURVE_EXPORT, pointRemoved,
83 void changed() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, changed)
84 void curveReset() E_SIGNAL(
85 SCORE_PLUGIN_CURVE_EXPORT,
87 void cleared() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, cleared)
97 std::vector<PointModel*> m_points;
100 SCORE_PLUGIN_CURVE_EXPORT
101 std::vector<SegmentData> orderedSegments(
const Model& curve);
111 CurveDomain(
const ossia::domain& dom,
const ossia::value&);
112 CurveDomain(
const ossia::domain& dom,
double start,
double end);
114 : min{std::min(start, end)}
115 , max{std::max(start, end)}
121 void refine(
const ossia::domain&);
Definition: CurveModel.hpp:25
Definition: CurvePointModel.hpp:18
Definition: CurveSegmentModel.hpp:32
A map to access child objects through their id.
Definition: IdentifiedObjectMap.hpp:16
The IdentifiedObject class.
Definition: IdentifiedObject.hpp:19
Definition: Selection.hpp:12
The id_base_t class.
Definition: Identifier.hpp:57
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12
Definition: CurveModel.hpp:104