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)
48 std::vector<SegmentModel*> sortedSegments()
const;
49 std::vector<SegmentData> toCurveData()
const;
50 void fromCurveData(
const std::vector<SegmentData>& curve);
57 const auto& segments()
const {
return m_segments; }
58 auto& segments() {
return m_segments; }
60 const std::vector<PointModel*>& points()
const;
61 std::vector<PointModel*>& points() {
return m_points; }
63 double lastPointPos()
const;
65 std::optional<double> valueAt(
double x)
const noexcept;
69 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, segmentAdded, arg_1)
71 SCORE_PLUGIN_CURVE_EXPORT, segmentRemoved,
74 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, pointAdded, arg_1)
76 SCORE_PLUGIN_CURVE_EXPORT, pointRemoved,
82 void changed() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, changed)
83 void curveReset() E_SIGNAL(
84 SCORE_PLUGIN_CURVE_EXPORT,
86 void cleared() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, cleared)
93 std::vector<PointModel*> m_points;
96 SCORE_PLUGIN_CURVE_EXPORT
97 std::vector<SegmentData> orderedSegments(
const Model& curve);
107 CurveDomain(
const ossia::domain& dom,
const ossia::value&);
108 CurveDomain(
const ossia::domain& dom,
double start,
double end);
110 : min{std::min(start, end)}
111 , max{std::max(start, end)}
117 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:100