MuseScore  3.4
Music composition and notation
shadownote.h
Go to the documentation of this file.
1 //=============================================================================
2 // MuseScore
3 // Music Composition & Notation
4 //
5 // Copyright (C) 2010-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 __SHADOWNOTE_H__
14 #define __SHADOWNOTE_H__
15 
16 #include "element.h"
17 #include "durationtype.h"
18 
19 namespace Ms {
20 
21 //---------------------------------------------------------
22 // ShadowNote
23 //---------------------------------------------------------
24 
30 class ShadowNote final : public Element {
31  int _line;
34  int _voice;
35  bool _rest;
36 
37  public:
38  ShadowNote(Score*);
39  virtual ShadowNote* clone() const { return new ShadowNote(*this); }
40  virtual ElementType type() const { return ElementType::SHADOW_NOTE; }
41  virtual void layout();
42  int line() const { return _line; }
43  void setLine(int n) { _line = n; }
44  virtual void draw(QPainter*) const;
45 
46  void setState(SymId noteSymbol, int voice, TDuration duration, bool rest = false);
47 
48  SymId getNoteFlag() const;
49  bool computeUp() const;
50 
51  SymId notehead() const { return _notehead; }
52  bool isValid() const;
53  };
54 
55 
56 } // namespace Ms
57 #endif
58 
SymId getNoteFlag() const
Definition: shadownote.cpp:52
void setLine(int n)
Definition: shadownote.h:43
int voice() const
Definition: element.h:324
Definition: durationtype.h:28
int _voice
Definition: shadownote.h:34
Graphic representation of a shadow note, which shows the note insert position in note entry mode...
Definition: shadownote.h:30
void setState(SymId noteSymbol, int voice, TDuration duration, bool rest=false)
Definition: shadownote.cpp:41
virtual ShadowNote * clone() const
Definition: shadownote.h:39
bool _rest
Definition: shadownote.h:35
bool computeUp() const
Definition: shadownote.cpp:95
virtual void layout()
Definition: shadownote.cpp:191
SymId
Definition: sym.h:30
Base class of score layout elements.
Definition: element.h:158
Definition: score.h:391
int _line
Definition: shadownote.h:31
SymId notehead() const
Definition: shadownote.h:51
Definition: aeolus.cpp:26
virtual void draw(QPainter *) const
Definition: shadownote.cpp:107
SymId _notehead
Definition: shadownote.h:32
int line() const
Definition: shadownote.h:42
TDuration _duration
Definition: shadownote.h:33
bool isValid() const
Definition: shadownote.cpp:36
ShadowNote(Score *)
Definition: shadownote.cpp:27
ElementType
Definition: types.h:34
virtual ElementType type() const
Definition: shadownote.h:40