Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
drawablenote.h
Go to the documentation of this file.
1 
8 #ifndef DRAWABLENOTE_H_
9 #define DRAWABLENOTE_H_
10 
12 #include "core/note.h"
13 
14 class CANote;
16 
18  public:
19  CADrawableNote(CANote *note, CADrawableContext *drawableContext, double x, double y, bool shadowNote = false, CADrawableAccidental* acc=0);
20 
22 
23  void draw(QPainter *p, CADrawSettings s);
24 
25  inline CANote* note() { return static_cast<CANote*>(_musElement); }
26 
27  CADrawableNote *clone(CADrawableContext* newContext = 0);
28 
29  void setDrawLedgerLines(bool ledgerLines) { _drawLedgerLines = ledgerLines; }
30  bool drawLedgerLines() { return _drawLedgerLines; }
31 
34 
35  private:
37  bool _shadowNote;
40  double _stemLength;
42  double _penWidth; // pen width for stem
43  QString _noteHeadGlyphName; // Feta glyph name for the notehead symbol.
44  QString _flagUpGlyphName; // likewise for stem flags
46  static const double HUNDREDTWENTYEIGHTH_STEM_LENGTH;
47  static const double SIXTYFOURTH_STEM_LENGTH;
48  static const double THIRTYSECOND_STEM_LENGTH;
49  static const double SIXTEENTH_STEM_LENGTH;
50  static const double EIGHTH_STEM_LENGTH;
51  static const double QUARTER_STEM_LENGTH;
52  static const double HALF_STEM_LENGTH;
53  static const double QUARTER_YPOS_DELTA;
54  static const double HALF_YPOS_DELTA;
55 };
56 
57 #endif /* DRAWABLENOTE_H_ */
Definition: drawablenote.h:17
QString _flagUpGlyphName
Definition: drawablenote.h:44
~CADrawableNote()
Definition: drawablenote.cpp:127
static const double THIRTYSECOND_STEM_LENGTH
Definition: drawablenote.h:48
Definition: drawablecontext.h:18
CAStemDirection
Direction of the note&#39;s stem.
Definition: note.h:20
bool _shadowNote
Are the ledger lines drawn or not. True when ledger lines needed, False when the note is inside the s...
Definition: drawablenote.h:37
static const double HALF_STEM_LENGTH
Definition: drawablenote.h:52
void setDrawableAccidental(CADrawableAccidental *acc)
Definition: drawablenote.h:32
virtual CADrawable * clone()
Definition: drawable.cpp:23
static const double HUNDREDTWENTYEIGHTH_STEM_LENGTH
Definition: drawablenote.h:46
CADrawableNote(CANote *note, CADrawableContext *drawableContext, double x, double y, bool shadowNote=false, CADrawableAccidental *acc=0)
Definition: drawablenote.cpp:34
Definition: drawable.h:16
double _noteHeadWidth
Definition: drawablenote.h:41
static const double QUARTER_STEM_LENGTH
Definition: drawablenote.h:51
CANote::CAStemDirection _stemDirection
Definition: drawablenote.h:39
Represents a note in the score.
Definition: note.h:18
QString _flagDownGlyphName
Definition: drawablenote.h:45
CADrawableAccidental * _drawableAcc
Is the current note shadow note?
Definition: drawablenote.h:38
bool _drawLedgerLines
Definition: drawablenote.h:36
bool drawLedgerLines()
Definition: drawablenote.h:30
Definition: drawablemuselement.h:16
CADrawableContext * drawableContext()
Definition: drawablemuselement.h:37
CANote * note()
Definition: drawablenote.h:25
CADrawableAccidental * drawableAccidental()
Definition: drawablenote.h:33
double _stemLength
This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on C...
Definition: drawablenote.h:40
static const double EIGHTH_STEM_LENGTH
Definition: drawablenote.h:50
static const double HALF_YPOS_DELTA
Definition: drawablenote.h:54
CAMusElement * _musElement
Definition: drawablemuselement.h:46
void draw(QPainter *p, CADrawSettings s)
Definition: drawablenote.cpp:130
static const double SIXTYFOURTH_STEM_LENGTH
Definition: drawablenote.h:47
Definition: drawableaccidental.h:13
double _penWidth
Definition: drawablenote.h:42
static const double SIXTEENTH_STEM_LENGTH
Definition: drawablenote.h:49
static const double QUARTER_YPOS_DELTA
Definition: drawablenote.h:53
QString _noteHeadGlyphName
Definition: drawablenote.h:43
void setDrawLedgerLines(bool ledgerLines)
Definition: drawablenote.h:29