35 SCORE_SERIALIZE_FRIENDS
37 using data_vector = std::vector<
38 QPointF, boost::alignment::aligned_allocator_adaptor<std::allocator<QPointF>, 32>>;
46 Curve::Point s, Curve::Point e,
const Id<SegmentModel>&
id, QObject* parent);
53 virtual void updateData(
int numInterp)
const = 0;
54 virtual double valueAt(
double x)
const = 0;
56 const data_vector& data()
const {
return m_data; }
58 void setStart(
const Curve::Point& pt);
59 Curve::Point start()
const {
return m_start; }
61 void setEnd(
const Curve::Point& pt);
62 Curve::Point end()
const {
return m_end; }
64 void setPrevious(
const OptionalId<SegmentModel>& previous);
65 const OptionalId<SegmentModel>& previous()
const {
return m_previous; }
67 void setFollowing(
const OptionalId<SegmentModel>& following);
68 const OptionalId<SegmentModel>& following()
const {
return m_following; }
71 virtual void setVerticalParameter(
double p);
72 virtual void setHorizontalParameter(
double p);
73 virtual std::optional<double> verticalParameter()
const;
74 virtual std::optional<double> horizontalParameter()
const;
76 virtual ossia::curve_segment<double> makeDoubleFunction()
const = 0;
77 virtual ossia::curve_segment<float> makeFloatFunction()
const = 0;
78 virtual ossia::curve_segment<int> makeIntFunction()
const = 0;
88 toSegmentSpecificData()};
92 void dataChanged() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, dataChanged)
93 void previousChanged() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, previousChanged)
94 void followingChanged() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, followingChanged)
95 void startChanged() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, startChanged)
96 void endChanged() E_SIGNAL(SCORE_PLUGIN_CURVE_EXPORT, endChanged)
99 virtual void on_startChanged() = 0;
100 virtual void on_endChanged() = 0;
102 virtual QVariant toSegmentSpecificData()
const = 0;
104 mutable data_vector m_data;
105 mutable bool m_valid{};
108 Curve::Point m_start, m_end;
111 OptionalId<SegmentModel> m_previous, m_following;