MuseScore  3.4
Music composition and notation
letring.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2017 Werner Schweer
6 //
7 // This program is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License version 2
9 // as published by the Free Software Foundation and appearing in
10 // the file LICENCE.GPL
11 //=============================================================================
12 
13 #ifndef __LETRING_H__
14 #define __LETRING_H__
15 
16 #include "textlinebase.h"
17 
18 namespace Ms {
19 
20 class LetRing;
21 
22 //---------------------------------------------------------
23 // @@ LetRingSegment
24 //---------------------------------------------------------
25 
26 class LetRingSegment final : public TextLineBaseSegment {
27  public:
29  virtual ElementType type() const override { return ElementType::LET_RING_SEGMENT; }
30  virtual LetRingSegment* clone() const override { return new LetRingSegment(*this); }
31  LetRing* letRing() const { return (LetRing*)spanner(); }
32  virtual void layout() override;
33 
34  friend class LetRing;
35  };
36 
37 //---------------------------------------------------------
38 // @@ LetRing
39 //---------------------------------------------------------
40 
41 class LetRing final : public TextLineBase {
42  protected:
43  QPointF linePos(Grip, System**) const override;
44 
45  public:
46  LetRing(Score* s);
47  virtual LetRing* clone() const override { return new LetRing(*this); }
48  virtual ElementType type() const override { return ElementType::LET_RING; }
49  virtual void read(XmlReader&) override;
50 // virtual void write(XmlWriter& xml) const override;
51  LineSegment* createLineSegment();
52  virtual QVariant propertyDefault(Pid propertyId) const override;
53  virtual Sid getPropertyStyle(Pid) const override;
54  };
55 
56 } // namespace Ms
57 #endif
58 
LetRingSegment(Spanner *sp, Score *s)
Definition: letring.h:28
Pid
Definition: property.h:62
Definition: xml.h:67
friend class LetRing
Definition: letring.h:34
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
Definition: letring.h:26
virtual QVariant propertyDefault(Pid id) const override
Definition: spanner.cpp:162
Spanner * spanner() const
Definition: spanner.h:67
Virtual base class for segmented lines segments (OttavaSegment, HairpinSegment, TrillSegment...)
Definition: line.h:34
Definition: score.h:391
virtual Sid getPropertyStyle(Pid id) const override
Definition: spanner.cpp:178
LetRing * letRing() const
Definition: letring.h:31
virtual Pid propertyId(const QStringRef &xmlName) const override
Definition: element.cpp:1326
Grip
Definition: element.h:43
Definition: textlinebase.h:31
ElementFlag
Definition: element.h:66
Definition: aeolus.cpp:26
Sid
Definition: style.h:33
virtual ElementType type() const override
Definition: letring.h:48
virtual void layout() override
Definition: letring.cpp:51
Definition: letring.h:41
virtual LetRing * clone() const override
Definition: letring.h:47
virtual void read(XmlReader &) override
Definition: line.cpp:69
virtual LetRingSegment * clone() const override
Definition: letring.h:30
virtual ElementType type() const override
Definition: letring.h:29
Definition: textlinebase.h:70
One row of measures for all instruments; a complete piece of the timeline.
Definition: system.h:79
ElementType
Definition: types.h:34