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_ */