MuseScore  3.4
Music composition and notation
textline.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2002-2011 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 __TEXTLINE_H__
14 #define __TEXTLINE_H__
15 
16 #include "textlinebase.h"
17 
18 namespace Ms {
19 
20 class Note;
21 
22 //---------------------------------------------------------
23 // @@ TextLineSegment
24 //---------------------------------------------------------
25 
26 class TextLineSegment final : public TextLineBaseSegment {
27 
28  virtual Sid getPropertyStyle(Pid) const override;
29 
30  public:
31  TextLineSegment(Spanner* sp, Score* s);
32  virtual ElementType type() const override { return ElementType::TEXTLINE_SEGMENT; }
33  virtual TextLineSegment* clone() const override { return new TextLineSegment(*this); }
34  TextLine* textLine() const { return toTextLine(spanner()); }
35  virtual void layout() override;
36  };
37 
38 //---------------------------------------------------------
39 // @@ TextLine
40 //---------------------------------------------------------
41 
42 class TextLine final : public TextLineBase {
43 
44  virtual Sid getPropertyStyle(Pid) const override;
45 
46  public:
47  TextLine(Score* s);
48  TextLine(const TextLine&);
49  ~TextLine() {}
50 
51  virtual TextLine* clone() const { return new TextLine(*this); }
52  virtual ElementType type() const { return ElementType::TEXTLINE; }
53  virtual void write(XmlWriter&) const override;
54  virtual LineSegment* createLineSegment() override;
55  virtual QVariant propertyDefault(Pid) const override;
56  };
57 
58 
59 } // namespace Ms
60 #endif
61 
virtual ElementType type() const override
Definition: textline.h:32
Pid
Definition: property.h:62
virtual Sid getPropertyStyle(Pid) const override
Definition: textline.cpp:134
~TextLine()
Definition: textline.h:49
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
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
virtual void write(XmlWriter &) const
Definition: element.cpp:732
TextLine * textLine() const
Definition: textline.h:34
Definition: score.h:391
Definition: textlinebase.h:31
Definition: aeolus.cpp:26
Sid
Definition: style.h:33
Definition: xml.h:218
virtual TextLineSegment * clone() const override
Definition: textline.h:33
Definition: textline.h:26
virtual TextLine * clone() const
Definition: textline.h:51
Definition: textline.h:42
Definition: textlinebase.h:70
ElementType
Definition: types.h:34
TextLineSegment(Spanner *sp, Score *s)
Definition: textline.cpp:45
virtual ElementType type() const
Definition: textline.h:52
virtual void layout() override
Definition: textline.cpp:54