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;
58 void fromCurveData(
const std::vector<SegmentData>& curve);
65 std::span<const SegmentData* const> upserted);
72 const auto& segments()
const {
return m_segments; }
73 auto& segments() {
return m_segments; }
76 const std::vector<PointModel*>& points()
const;
77 std::vector<PointModel*>& points() {
return m_points; }
79 double lastPointPos()
const;
81 std::optional<double> valueAt(
double x)
const noexcept;
85 E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, segmentAdded, arg_1)
87 SCORE_PLUGIN_CURVE_EXPORT, segmentRemoved,
93 void changed() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, changed)
94 void curveReset() E_SIGNAL(
95 SCORE_PLUGIN_CURVE_EXPORT,
97 void cleared() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, cleared)
104 void relinkAfterChanges(std::span<SegmentModel* const> added);
105 bool spliceOrder(std::span<SegmentModel* const> added);
111 std::vector<PointModel*> m_points;
112 std::vector<SegmentModel*> m_sorted;
113 int32_t m_nextPointId{};
114 uint32_t m_relinkPass{};
Definition CurveModel.hpp:126