Canorus 0.0
drawablenote.h
Go to the documentation of this file.
1
8#ifndef DRAWABLENOTE_H_
9#define DRAWABLENOTE_H_
10
12#include "score/note.h"
13
14class 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; }
31
34
35 private:
42 double _penWidth; // pen width for stem
43 QString _noteHeadGlyphName; // Feta glyph name for the notehead symbol.
44 QString _flagUpGlyphName; // likewise for stem flags
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: drawableaccidental.h:13
Definition: drawablecontext.h:18
Definition: drawablemuselement.h:16
CADrawableContext * drawableContext()
Definition: drawablemuselement.h:39
CAMusElement * _musElement
Definition: drawablemuselement.h:48
Definition: drawablenote.h:17
static const double EIGHTH_STEM_LENGTH
Definition: drawablenote.h:50
void draw(QPainter *p, CADrawSettings s)
Definition: drawablenote.cpp:141
bool drawLedgerLines()
Definition: drawablenote.h:30
CANote * note()
Definition: drawablenote.h:25
CADrawableAccidental * drawableAccidental()
Definition: drawablenote.h:33
static const double THIRTYSECOND_STEM_LENGTH
Definition: drawablenote.h:48
static const double HUNDREDTWENTYEIGHTH_STEM_LENGTH
Definition: drawablenote.h:46
QString _flagUpGlyphName
Definition: drawablenote.h:44
double _noteHeadWidth
Definition: drawablenote.h:41
void setDrawableAccidental(CADrawableAccidental *acc)
Definition: drawablenote.h:32
bool _drawLedgerLines
Definition: drawablenote.h:36
static const double QUARTER_YPOS_DELTA
Definition: drawablenote.h:53
static const double SIXTEENTH_STEM_LENGTH
Definition: drawablenote.h:49
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
QString _noteHeadGlyphName
Definition: drawablenote.h:43
double _penWidth
Definition: drawablenote.h:42
CADrawableAccidental * _drawableAcc
Is the current note shadow note?
Definition: drawablenote.h:38
double _stemLength
This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on C...
Definition: drawablenote.h:40
QString _flagDownGlyphName
Definition: drawablenote.h:45
static const double HALF_YPOS_DELTA
Definition: drawablenote.h:54
~CADrawableNote()
Definition: drawablenote.cpp:138
static const double HALF_STEM_LENGTH
Definition: drawablenote.h:52
CADrawableNote(CANote *note, CADrawableContext *drawableContext, double x, double y, bool shadowNote=false, CADrawableAccidental *acc=0)
Definition: drawablenote.cpp:34
static const double SIXTYFOURTH_STEM_LENGTH
Definition: drawablenote.h:47
static const double QUARTER_STEM_LENGTH
Definition: drawablenote.h:51
void setDrawLedgerLines(bool ledgerLines)
Definition: drawablenote.h:29
CANote::CAStemDirection _stemDirection
Definition: drawablenote.h:39
virtual CADrawable * clone()
Definition: drawable.cpp:23
Represents a note in the score.
Definition: note.h:18
CAStemDirection
Direction of the note's stem.
Definition: note.h:20
Definition: drawable.h:16