MuseScore  3.4
Music composition and notation
palmmute.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 __PALM_MUTE_H__
14 #define __PALM_MUTE_H__
15 
16 #include "textlinebase.h"
17 
18 namespace Ms {
19 
20 class PalmMute;
21 
22 //---------------------------------------------------------
23 // @@ PalmMuteSegment
24 //---------------------------------------------------------
25 
26 class PalmMuteSegment final : public TextLineBaseSegment {
27 
28  virtual Sid getPropertyStyle(Pid) const override;
29 
30  public:
32  virtual ElementType type() const override { return ElementType::PALM_MUTE_SEGMENT; }
33  virtual PalmMuteSegment* clone() const override { return new PalmMuteSegment(*this); }
34  PalmMute* palmMute() const { return (PalmMute*)spanner(); }
35  virtual void layout() override;
36 
37  friend class PalmMute;
38  };
39 
40 //---------------------------------------------------------
41 // @@ PalmMute
42 //---------------------------------------------------------
43 
44 class PalmMute 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  PalmMute(Score* s);
53  virtual PalmMute* clone() const override { return new PalmMute(*this); }
54  virtual ElementType type() const override { return ElementType::PALM_MUTE; }
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 PalmMuteLine;
61  };
62 
63 } // namespace Ms
64 #endif
65 
Definition: palmmute.h:44
Pid
Definition: property.h:62
Definition: xml.h:67
virtual void layout() override
Definition: palmmute.cpp:52
Virtual base class for slurs, ties, lines etc.
Definition: spanner.h:136
PalmMute * palmMute() const
Definition: palmmute.h:34
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
friend class PalmMute
Definition: palmmute.h:37
PalmMuteSegment(Spanner *sp, Score *s)
Definition: palmmute.h:31
Definition: palmmute.h:26
virtual ElementType type() const override
Definition: palmmute.h:32
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: palmmute.h:54
virtual void read(XmlReader &) override
Definition: line.cpp:69
virtual PalmMute * clone() const override
Definition: palmmute.h:53
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 PalmMuteSegment * clone() const override
Definition: palmmute.h:33
virtual Sid getPropertyStyle(Pid) const override
Definition: palmmute.cpp:62