|
Canorus
0.7
|
#include <drawablenote.h>

Public Member Functions | |
| CADrawableNote (CANote *note, CADrawableContext *drawableContext, double x, double 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 | 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 |
| double | _stemLength |
| This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on CADrawableNote constructor. | |
| double | _noteHeadWidth |
| double | _penWidth |
| QString | _noteHeadGlyphName |
| QString | _flagUpGlyphName |
| QString | _flagDownGlyphName |
Static Private Attributes | |
| static const double | HUNDREDTWENTYEIGHTH_STEM_LENGTH = 50 |
| static const double | SIXTYFOURTH_STEM_LENGTH = 43 |
| static const double | THIRTYSECOND_STEM_LENGTH = 37 |
| static const double | SIXTEENTH_STEM_LENGTH = 31 |
| static const double | EIGHTH_STEM_LENGTH = 31 |
| static const double | QUARTER_STEM_LENGTH = 31 |
| static const double | HALF_STEM_LENGTH = 31 |
| static const double | QUARTER_YPOS_DELTA = 21 |
| static const double | HALF_YPOS_DELTA = 23 |
| CADrawableNote::CADrawableNote | ( | CANote * | n, |
| CADrawableContext * | drawableContext, | ||
| double | x, | ||
| double | 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. |
References _drawableAcc, CADrawableMusElement::_drawableMusElementType, _drawLedgerLines, _flagDownGlyphName, _flagUpGlyphName, _noteHeadGlyphName, _noteHeadWidth, _penWidth, _shadowNote, _stemDirection, _stemLength, CANote::actualStemDirection(), CAPlayableLength::Breve, CAPlayableLength::dotted(), CADrawableMusElement::DrawableNote, CAPlayableLength::Eighth, EIGHTH_STEM_LENGTH, CAPlayableLength::Half, HALF_STEM_LENGTH, CADrawable::height(), CAPlayableLength::HundredTwentyEighth, HUNDREDTWENTYEIGHTH_STEM_LENGTH, CAPlayableLength::musicLength(), note(), CAPlayable::playableLength(), CAPlayableLength::Quarter, QUARTER_STEM_LENGTH, CADrawable::setHeight(), CADrawable::setWidth(), CADrawable::setXPos(), CADrawable::setYPos(), CAPlayableLength::Sixteenth, SIXTEENTH_STEM_LENGTH, CAPlayableLength::SixtyFourth, SIXTYFOURTH_STEM_LENGTH, CAPlayableLength::ThirtySecond, THIRTYSECOND_STEM_LENGTH, CAPlayableLength::Whole, and CADrawable::width().
Referenced by clone().


| CADrawableNote * CADrawableNote::clone | ( | CADrawableContext * | newContext = 0 | ) | [virtual] |
Implements CADrawableMusElement.
References CADrawableMusElement::_drawableContext, CADrawableNote(), CADrawable::height(), note(), CADrawable::xPos(), and CADrawable::yPos().

| void CADrawableNote::draw | ( | QPainter * | p, |
| CADrawSettings | s | ||
| ) | [virtual] |
Implements CADrawable.
References CADrawableMusElement::_drawableContext, _drawLedgerLines, _flagDownGlyphName, _flagUpGlyphName, _noteHeadGlyphName, _noteHeadWidth, _penWidth, _stemDirection, _stemLength, CADrawSettings::color, CAPlayableLength::dotted(), CADrawableMusElement::drawableContext(), CADrawableContext::DrawableStaff, CAPlayableLength::Eighth, CACanorus::fetaCodepoint(), CAPlayableLength::Half, CADrawable::height(), note(), CANote::notePosition(), CAPlayable::playableLength(), CANote::StemUp, CADrawSettings::worldY, CADrawSettings::x, CADrawSettings::y, CADrawable::yPos(), and CADrawSettings::z.
Referenced by CADrawableMark::draw().


| CADrawableAccidental* CADrawableNote::drawableAccidental | ( | ) | [inline] |
References _drawableAcc.
| bool CADrawableNote::drawLedgerLines | ( | ) | [inline] |
References _drawLedgerLines.
| CANote* CADrawableNote::note | ( | ) | [inline] |
References CADrawableMusElement::_musElement.
Referenced by CADrawableNote(), clone(), and draw().

| void CADrawableNote::setDrawableAccidental | ( | CADrawableAccidental * | acc | ) | [inline] |
References _drawableAcc.
| void CADrawableNote::setDrawLedgerLines | ( | bool | ledgerLines | ) | [inline] |
References _drawLedgerLines.
CADrawableAccidental* CADrawableNote::_drawableAcc [private] |
Is the current note shadow note?
Referenced by CADrawableNote(), drawableAccidental(), and setDrawableAccidental().
bool CADrawableNote::_drawLedgerLines [private] |
Referenced by CADrawableNote(), draw(), drawLedgerLines(), and setDrawLedgerLines().
QString CADrawableNote::_flagDownGlyphName [private] |
Referenced by CADrawableNote(), and draw().
QString CADrawableNote::_flagUpGlyphName [private] |
Referenced by CADrawableNote(), and draw().
QString CADrawableNote::_noteHeadGlyphName [private] |
Referenced by CADrawableNote(), and draw().
double CADrawableNote::_noteHeadWidth [private] |
Referenced by CADrawableNote(), and draw().
double CADrawableNote::_penWidth [private] |
Referenced by CADrawableNote(), and draw().
bool CADrawableNote::_shadowNote [private] |
Are the ledger lines drawn or not. True when ledger lines needed, False when the note is inside the staff.
Referenced by CADrawableNote().
Referenced by CADrawableNote(), and draw().
double CADrawableNote::_stemLength [private] |
This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on CADrawableNote constructor.
Referenced by CADrawableNote(), and draw().
const double CADrawableNote::EIGHTH_STEM_LENGTH = 31 [static, private] |
Referenced by CADrawableNote().
const double CADrawableNote::HALF_STEM_LENGTH = 31 [static, private] |
Referenced by CADrawableNote().
const double CADrawableNote::HALF_YPOS_DELTA = 23 [static, private] |
const double CADrawableNote::HUNDREDTWENTYEIGHTH_STEM_LENGTH = 50 [static, private] |
Copyright (c) 2006-2009, 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.
Referenced by CADrawableNote().
const double CADrawableNote::QUARTER_STEM_LENGTH = 31 [static, private] |
Referenced by CADrawableNote().
const double CADrawableNote::QUARTER_YPOS_DELTA = 21 [static, private] |
const double CADrawableNote::SIXTEENTH_STEM_LENGTH = 31 [static, private] |
Referenced by CADrawableNote().
const double CADrawableNote::SIXTYFOURTH_STEM_LENGTH = 43 [static, private] |
Referenced by CADrawableNote().
const double CADrawableNote::THIRTYSECOND_STEM_LENGTH = 37 [static, private] |
Referenced by CADrawableNote().
1.8.0