Canorus
0.7
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
src
drawable
drawablenote.h
Go to the documentation of this file.
1
8
#ifndef DRAWABLENOTE_H_
9
#define DRAWABLENOTE_H_
10
11
#include "
drawable/drawablemuselement.h
"
12
#include "
core/note.h
"
13
14
class
CANote
;
15
class
CADrawableAccidental
;
16
17
class
CADrawableNote
:
public
CADrawableMusElement
{
18
public
:
19
CADrawableNote
(
CANote
*
note
,
CADrawableContext
*
drawableContext
,
double
x,
double
y,
bool
shadowNote =
false
,
CADrawableAccidental
* acc=0);
20
21
~CADrawableNote
();
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
32
void
setDrawableAccidental
(
CADrawableAccidental
*acc) {
_drawableAcc
= acc; }
33
CADrawableAccidental
*
drawableAccidental
() {
return
_drawableAcc
; }
34
35
private
:
36
bool
_drawLedgerLines
;
37
bool
_shadowNote
;
38
CADrawableAccidental
*
_drawableAcc
;
39
CANote::CAStemDirection
_stemDirection
;
40
double
_stemLength
;
41
double
_noteHeadWidth
;
42
double
_penWidth
;
// pen width for stem
43
QString
_noteHeadGlyphName
;
// Feta glyph name for the notehead symbol.
44
QString
_flagUpGlyphName
;
// likewise for stem flags
45
QString
_flagDownGlyphName
;
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_ */
Generated on Fri Jan 11 2013 14:40:12 for Canorus by
1.8.3