2 #include <Curve/Segment/CurveSegmentModel.hpp>
11 CURVE_SEGMENT_METADATA(
12 SCORE_PLUGIN_CURVE_EXPORT, Curve::LinearSegment,
13 "a8bd14e2-d7e4-47cd-b76a-6a88fa11f0d2",
"Linear",
"Linear",
"")
17 struct SCORE_PLUGIN_CURVE_EXPORT LinearSegmentData
21 class SCORE_PLUGIN_CURVE_EXPORT LinearSegment final :
public SegmentModel
23 MODEL_METADATA_IMPL(LinearSegment)
25 using data_type = LinearSegmentData;
26 using SegmentModel::SegmentModel;
28 LinearSegment(
const LinearSegment& other,
const id_type&
id, QObject* parent);
31 : SegmentModel{vis, parent}
37 : SegmentModel{vis, parent}
42 void on_startChanged()
override;
43 void on_endChanged()
override;
45 void updateData(
int numInterp)
const override;
46 double valueAt(
double x)
const override;
48 QVariant toSegmentSpecificData()
const override;
50 ossia::curve_segment<double> makeDoubleFunction()
const override;
51 ossia::curve_segment<float> makeFloatFunction()
const override;
52 ossia::curve_segment<int> makeIntFunction()
const override;
56 SCORE_SERIALIZE_DATASTREAM_DECLARE(SCORE_PLUGIN_CURVE_EXPORT, Curve::LinearSegmentData)
57 Q_DECLARE_METATYPE(Curve::LinearSegmentData)
58 W_REGISTER_ARGTYPE(Curve::LinearSegmentData)
Definition: DataStreamVisitor.hpp:202
Definition: JSONVisitor.hpp:423
Utilities and base classes for 1D curves.
Definition: FocusDispatcher.hpp:12