44 QPointF
pos()
const {
return p + off; }
61 CubicBezier(QPointF _p1, QPointF _p2, QPointF _p3, QPointF _p4)
62 : p1(_p1), p2(_p2), p3(_p3), p4(_p4) {}
66 Q_ASSERT(t >= 0.0 && t <= 1.0);
67 const qreal r = 1.0 - t;
68 const QPointF B123 = r * (r*p1 + t*
p2) + t * (r*p2 + t*p3);
69 const QPointF B234 = r * (r*p2 + t*p3) + t * (r*p3 + t*p4);
70 return r*B123 + t*B234;
85 QPainterPath shapePath;
88 virtual void changeAnchor(EditData&, Element*) = 0;
89 virtual QPointF gripAnchor(Grip grip) const override;
94 virtual void spatiumChanged(qreal, qreal) override;
97 virtual void startEditDrag(
EditData& ed)
override;
98 virtual void endEditDrag(
EditData& ed)
override;
99 virtual void editDrag(
EditData&)
override;
102 virtual bool setProperty(
Pid propertyId,
const QVariant&)
override;
103 virtual QVariant propertyDefault(
Pid id)
const override;
104 virtual void reset()
override;
105 virtual void undoChangeProperty(
Pid id,
const QVariant&,
PropertyFlags ps)
override;
106 virtual void move(
const QPointF& s)
override;
110 const struct UP&
ups(
Grip i)
const {
return _ups[int(i)]; }
118 std::vector<QPointF> gripsPositions(
const EditData&)
const override;
120 void writeSlur(
XmlWriter& xml,
int no)
const;
122 virtual void drawEditMode(QPainter*,
EditData&)
override;
123 virtual void computeBezier(QPointF so = QPointF()) = 0;
139 qreal firstNoteRestSegmentX(
System* system);
140 void fixupSegments(
unsigned nsegs);
148 bool up()
const {
return _up; }
150 virtual void reset()
override;
157 virtual bool contains(
const QPointF&)
const {
return false; }
161 void writeProperties(
XmlWriter& xml)
const;
166 void undoSetLineType(
int);
168 virtual void slurPos(
SlurPos*) = 0;
173 virtual bool setProperty(
Pid propertyId,
const QVariant&)
override;
174 virtual QVariant propertyDefault(
Pid id)
const override;
virtual void layout2(const QPointF, int, struct UP &)
Definition: slurtie.h:156
virtual bool isEditable() const override
Definition: slurtie.h:107
Pid
Definition: property.h:62
void setSlurDirection(Direction d)
Definition: slurtie.h:153
QPointF p3
Definition: slurtie.h:57
parent: System
Definition: spanner.h:50
int gripsCount() const override
Definition: slurtie.h:115
QPointF p2
Definition: slurtie.h:28
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
Definition: slurtie.h:132
void setSlurOffset(Grip i, const QPointF &val)
Definition: slurtie.h:109
QPointF p
Definition: slurtie.h:41
Direction _slurDirection
Definition: slurtie.h:138
virtual Shape shape() const override
Definition: slurtie.h:112
QPointF pos() const
Definition: slurtie.h:44
PropertyFlags
Definition: property.h:54
Element::EditBehavior normalModeEditBehavior() const override
Definition: slurtie.h:114
bool up() const
Definition: slurtie.h:148
QPointF p4
Definition: slurtie.h:58
QPointF off
Definition: slurtie.h:42
QPointF p1
Definition: slurtie.h:26
int _lineType
Definition: slurtie.h:133
bool operator!=(const UP &up) const
Definition: slurtie.h:45
System * system1
Definition: slurtie.h:27
System * system2
Definition: slurtie.h:29
virtual bool contains(const QPointF &) const
Definition: slurtie.h:157
Grip
Definition: element.h:43
struct UP & ups(Grip i)
Definition: slurtie.h:111
QPointF p2
Definition: slurtie.h:56
const struct UP & ups(Grip i) const
Definition: slurtie.h:110
Definition: aeolus.cpp:26
CubicBezier(QPointF _p1, QPointF _p2, QPointF _p3, QPointF _p4)
Definition: slurtie.h:61
QPointF p1
Definition: slurtie.h:55
Direction slurDirection() const
Definition: slurtie.h:152
Direction
Definition: types.h:282
Definition: element.h:111
bool _up
Definition: slurtie.h:136
QPointF pointAtPercent(qreal t) const
Definition: slurtie.h:64
One row of measures for all instruments; a complete piece of the timeline.
Definition: system.h:79
Grip initialEditModeGrip() const override
Definition: slurtie.h:116
Grip defaultGrip() const override
Definition: slurtie.h:117
ElementType
Definition: types.h:34
void setLineType(int val)
Definition: slurtie.h:165
Pid propertyId(const QStringRef &s)
Definition: property.cpp:347
EditBehavior
Definition: element.h:173
int lineType() const
Definition: slurtie.h:164