27 SCORE_SERIALIZE_FRIENDS
33 template <
typename Impl>
34 Model(Impl& vis, QObject* parent)
47 void loadSegments(
const std::vector<SegmentModel*>& models);
50 const std::vector<SegmentModel*>& sortedSegments()
const noexcept;
52 std::vector<SegmentData> toCurveData()
const;
54 void toCurveData(std::vector<SegmentData>& out)
const;
59 void fromCurveData(
const std::vector<SegmentData>& curve);
66 std::span<const SegmentData* const> upserted);
73 const auto& segments()
const {
return m_segments; }
74 auto& segments() {
return m_segments; }
77 const std::vector<PointModel*>& points()
const;
78 std::vector<PointModel*>& points() {
return m_points; }
80 double lastPointPos()
const;
82 std::optional<double> valueAt(
double x)
const noexcept;
86 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, segmentAdded, arg_1)
88 SCORE_PLUGIN_CURVE_EXPORT, segmentRemoved,
94 void changed() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, changed)
95 void curveReset() E_SIGNAL(
96 SCORE_PLUGIN_CURVE_EXPORT,
98 void cleared() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, cleared)
105 void relinkAfterChanges(std::span<SegmentModel* const> added);
106 bool spliceOrder(std::span<SegmentModel* const> added);
112 std::vector<PointModel*> m_points;
113 std::vector<SegmentModel*> m_sorted;
114 int32_t m_nextPointId{};
115 uint32_t m_relinkPass{};
Definition CurveModel.hpp:127