MuseScore  3.4
Music composition and notation
pedal.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 __PEDAL_H__
14 #define __PEDAL_H__
15 
16 #include "textlinebase.h"
17 
18 namespace Ms {
19 
20 class Pedal;
21 
22 //---------------------------------------------------------
23 // @@ PedalSegment
24 //---------------------------------------------------------
25 
26 class PedalSegment final : public TextLineBaseSegment {
27 
28  virtual Sid getPropertyStyle(Pid) const override;
29 
30  public:
32  virtual ElementType type() const override { return ElementType::PEDAL_SEGMENT; }
33  virtual PedalSegment* clone() const override { return new PedalSegment(*this); }
34  Pedal* pedal() const { return toPedal(spanner()); }
35  virtual void layout() override;
36 
37  friend class Pedal;
38  };
39 
40 //---------------------------------------------------------
41 // @@ Pedal
42 //---------------------------------------------------------
43 
44 class Pedal final : public TextLineBase {
45 
46  virtual Sid getPropertyStyle(Pid) const override;
47 
48  protected:
49  QPointF linePos(Grip, System**) const override;
50 
51  public:
52  Pedal(Score* s);
53  virtual Pedal* clone() const override { return new Pedal(*this); }
54  virtual ElementType type() const override { return ElementType::PEDAL; }
55  virtual void read(XmlReader&) override;
56  virtual void write(XmlWriter& xml) const override;
57  LineSegment* createLineSegment();
58  virtual QVariant propertyDefault(Pid propertyId) const override;
59 
60  friend class PedalLine;
61  };
62 
63 } // namespace Ms
64 #endif
65 
PedalSegment(Spanner *sp, Score *s)
Definition: pedal.h:31
Definition: pedal.h:26
Pid
Definition: property.h:62
Definition: xml.h:67
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
virtual PedalSegment * clone() const override
Definition: pedal.h:33
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
Definition: score.h:391
virtual Sid getPropertyStyle(Pid) const override
Definition: pedal.cpp:63
virtual Pid propertyId(const QStringRef &xmlName) const override
Definition: element.cpp:1326
Grip
Definition: element.h:43
Definition: textlinebase.h:31
friend class Pedal
Definition: pedal.h:37
ElementFlag
Definition: element.h:66
Definition: aeolus.cpp:26
Sid
Definition: style.h:33
Definition: xml.h:218
Pedal * pedal() const
Definition: pedal.h:34
virtual void read(XmlReader &) override
Definition: line.cpp:69
virtual ElementType type() const override
Definition: pedal.h:54
Definition: pedal.h:44
virtual void layout() override
Definition: pedal.cpp:51
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
virtual ElementType type() const override
Definition: pedal.h:32
virtual Pedal * clone() const override
Definition: pedal.h:53