MuseScore  3.4
Music composition and notation
sticking.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2019 Werner Schweer and others
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 //
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
14 //
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18 //=============================================================================
19 
20 #ifndef __STICKING_H__
21 #define __STICKING_H__
22 
23 #include "textbase.h"
24 
25 namespace Ms {
26 
27 //-----------------------------------------------------------------------------
28 // @@ Sticking
30 //-----------------------------------------------------------------------------
31 
32 class Sticking final : public TextBase {
33  virtual Sid getPropertyStyle(Pid) const override;
34  virtual QVariant propertyDefault(Pid id) const override;
35 
36  public:
37  Sticking(Score*);
38  virtual Sticking* clone() const override { return new Sticking(*this); }
39  virtual ElementType type() const override { return ElementType::STICKING; }
40  Segment* segment() const { return (Segment*)parent(); }
41  Measure* measure() const { return (Measure*)parent()->parent(); }
42 
43  virtual void layout() override;
44  virtual void write(XmlWriter& xml) const override;
45  virtual void read(XmlReader&) override;
46  };
47 
48 } // namespace Ms
49 #endif
Sticking(Score *)
Definition: sticking.cpp:38
Pid
Definition: property.h:62
Definition: xml.h:67
virtual Sid getPropertyStyle(Pid) const override
Definition: sticking.cpp:98
Segment * segment() const
Definition: sticking.h:40
one measure in a system
Definition: measure.h:65
Element * parent() const
Definition: element.h:192
Definition: score.h:391
virtual Sticking * clone() const override
Definition: sticking.h:38
Definition: textbase.h:217
Definition: segment.h:50
Definition: aeolus.cpp:26
Sid
Definition: style.h:33
Definition: xml.h:218
virtual void write(XmlWriter &xml) const override
Definition: sticking.cpp:48
virtual void read(XmlReader &) override
Definition: sticking.cpp:61
virtual void layout() override
Definition: sticking.cpp:74
virtual QVariant propertyDefault(Pid id) const override
Definition: sticking.cpp:84
virtual ElementType type() const override
Definition: sticking.h:39
ElementType
Definition: types.h:34
Measure * measure() const
Definition: sticking.h:41
Drum sticking.
Definition: sticking.h:32