#include <drawablenote.h>

Public Member Functions | |
| CADrawableNote (CANote *note, CADrawableContext *drawableContext, int x, int y, bool shadowNote=false, CADrawableAccidental *acc=0) | |
| ~CADrawableNote () | |
| void | draw (QPainter *p, CADrawSettings s) |
| CANote * | note () |
| CADrawableNote * | clone (CADrawableContext *newContext=0) |
| void | setDrawLedgerLines (bool ledgerLines) |
| bool | drawLedgerLines () |
| void | setXPos (int xPos) |
| void | setYPos (int yPos) |
| void | setDrawableAccidental (CADrawableAccidental *acc) |
| CADrawableAccidental * | drawableAccidental () |
Private Attributes | |
| bool | _drawLedgerLines |
| bool | _shadowNote |
| Are the ledger lines drawn or not. True when ledger lines needed, False when the note is inside the staff. | |
| CADrawableAccidental * | _drawableAcc |
| Is the current note shadow note? | |
| CANote::CAStemDirection | _stemDirection |
| int | _noteHeadWidth |
| This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on CADrawableNote constructor. | |
Static Private Attributes | |
| static const int | HUNDREDTWENTYEIGHTH_STEM_LENGTH = 43 |
| static const int | SIXTYFOURTH_STEM_LENGTH = 43 |
| static const int | THIRTYSECOND_STEM_LENGTH = 37 |
| static const int | SIXTEENTH_STEM_LENGTH = 31 |
| static const int | EIGHTH_STEM_LENGTH = 31 |
| static const int | QUARTER_STEM_LENGTH = 31 |
| static const int | HALF_STEM_LENGTH = 31 |
| static const int | QUARTER_YPOS_DELTA = 21 |
| static const int | HALF_YPOS_DELTA = 23 |
Definition at line 17 of file drawablenote.h.
| CADrawableNote::CADrawableNote | ( | CANote * | n, | |
| CADrawableContext * | drawableContext, | |||
| int | x, | |||
| int | y, | |||
| bool | shadowNote = false, |
|||
| CADrawableAccidental * | drawableAcc = 0 | |||
| ) |
Default constructor.
| x | coordinate represents the left border of the notehead. | |
| y | coordinate represents the center of the notehead. |
Definition at line 31 of file drawablenote.cpp.
References _drawableAcc, CADrawableMusElement::_drawableMusElementType, _drawLedgerLines, CADrawable::_height, CADrawable::_neededHeight, CADrawable::_neededWidth, _noteHeadWidth, _shadowNote, _stemDirection, CADrawable::_width, CADrawable::_xPos, CADrawable::_yPos, CANote::actualStemDirection(), CAPlayable::Breve, CAPlayable::dotted(), CADrawableMusElement::DrawableNote, CAPlayable::Eighth, CAPlayable::Half, CAPlayable::HundredTwentyEighth, note(), CAPlayable::playableLength(), CAPlayable::Quarter, CAPlayable::Sixteenth, CAPlayable::SixtyFourth, CAPlayable::ThirtySecond, and CAPlayable::Whole.
Referenced by clone().


| CADrawableNote::~CADrawableNote | ( | ) |
Definition at line 82 of file drawablenote.cpp.
| void CADrawableNote::draw | ( | QPainter * | p, | |
| CADrawSettings | s | |||
| ) | [virtual] |
Implements CADrawable.
Definition at line 85 of file drawablenote.cpp.
References _drawLedgerLines, CADrawable::_height, _noteHeadWidth, _stemDirection, CAPlayable::Breve, CADrawSettings::color, CAPlayable::dotted(), CAPlayable::Eighth, EIGHTH_STEM_LENGTH, CAPlayable::Half, HALF_STEM_LENGTH, CADrawable::height(), CAPlayable::HundredTwentyEighth, HUNDREDTWENTYEIGHTH_STEM_LENGTH, note(), CANote::notePosition(), CAPlayable::Quarter, QUARTER_STEM_LENGTH, CAPlayable::Sixteenth, SIXTEENTH_STEM_LENGTH, CAPlayable::SixtyFourth, CANote::StemUp, CAPlayable::ThirtySecond, THIRTYSECOND_STEM_LENGTH, CAPlayable::Whole, CADrawSettings::x, CADrawSettings::y, and CADrawSettings::z.
Referenced by CADrawableMark::draw().


| CANote* CADrawableNote::note | ( | ) | [inline] |
Definition at line 25 of file drawablenote.h.
References CADrawableMusElement::_musElement.
Referenced by CADrawableNote(), clone(), draw(), and setYPos().

| CADrawableNote * CADrawableNote::clone | ( | CADrawableContext * | newContext = 0 |
) | [virtual] |
Implements CADrawableMusElement.
Definition at line 317 of file drawablenote.cpp.
References CADrawableMusElement::_drawableContext, CADrawable::_height, CADrawable::_xPos, CADrawable::_yPos, CADrawableNote(), and note().

| void CADrawableNote::setDrawLedgerLines | ( | bool | ledgerLines | ) | [inline] |
| bool CADrawableNote::drawLedgerLines | ( | ) | [inline] |
| void CADrawableNote::setXPos | ( | int | xPos | ) | [virtual] |
Reimplemented from CADrawable.
Definition at line 321 of file drawablenote.cpp.
References CADrawable::_xPos.
| void CADrawableNote::setYPos | ( | int | yPos | ) | [virtual] |
Reimplemented from CADrawable.
Definition at line 325 of file drawablenote.cpp.
References CADrawable::_height, CADrawable::_yPos, CAPlayable::Breve, CAPlayable::Half, note(), CAPlayable::Quarter, and CAPlayable::Whole.

| void CADrawableNote::setDrawableAccidental | ( | CADrawableAccidental * | acc | ) | [inline] |
| CADrawableAccidental* CADrawableNote::drawableAccidental | ( | ) | [inline] |
bool CADrawableNote::_drawLedgerLines [private] |
Definition at line 38 of file drawablenote.h.
Referenced by CADrawableNote(), draw(), drawLedgerLines(), and setDrawLedgerLines().
bool CADrawableNote::_shadowNote [private] |
Are the ledger lines drawn or not. True when ledger lines needed, False when the note is inside the staff.
Definition at line 39 of file drawablenote.h.
Referenced by CADrawableNote().
CADrawableAccidental* CADrawableNote::_drawableAcc [private] |
Is the current note shadow note?
Definition at line 40 of file drawablenote.h.
Referenced by CADrawableNote(), drawableAccidental(), and setDrawableAccidental().
int CADrawableNote::_noteHeadWidth [private] |
This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on CADrawableNote constructor.
Definition at line 42 of file drawablenote.h.
Referenced by CADrawableNote(), and draw().
const int CADrawableNote::HUNDREDTWENTYEIGHTH_STEM_LENGTH = 43 [static, private] |
Copyright (c) 2006, Matevž Jekovec, Canorus development team All Rights Reserved. See AUTHORS for a complete list of authors.
Licensed under the GNU GENERAL PUBLIC LICENSE. See COPYING for details.
Definition at line 43 of file drawablenote.h.
Referenced by draw().
const int CADrawableNote::SIXTYFOURTH_STEM_LENGTH = 43 [static, private] |
Definition at line 44 of file drawablenote.h.
const int CADrawableNote::THIRTYSECOND_STEM_LENGTH = 37 [static, private] |
const int CADrawableNote::SIXTEENTH_STEM_LENGTH = 31 [static, private] |
const int CADrawableNote::EIGHTH_STEM_LENGTH = 31 [static, private] |
const int CADrawableNote::QUARTER_STEM_LENGTH = 31 [static, private] |
const int CADrawableNote::HALF_STEM_LENGTH = 31 [static, private] |
const int CADrawableNote::QUARTER_YPOS_DELTA = 21 [static, private] |
Definition at line 50 of file drawablenote.h.
const int CADrawableNote::HALF_YPOS_DELTA = 23 [static, private] |
Definition at line 51 of file drawablenote.h.
1.5.3