Canorus  0.0
Public Member Functions | Private Attributes | Static Private Attributes | List of all members
CADrawableNote Class Reference

#include <drawablenote.h>

Inheritance diagram for CADrawableNote:
Inheritance graph
[legend]

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)
 
CANotenote ()
 
CADrawableNoteclone (CADrawableContext *newContext=0)
 
void setDrawLedgerLines (bool ledgerLines)
 
bool drawLedgerLines ()
 
void setDrawableAccidental (CADrawableAccidental *acc)
 
CADrawableAccidentaldrawableAccidental ()
 
- Public Member Functions inherited from CADrawableMusElement
 CADrawableMusElement (CAMusElement *musElement, CADrawableContext *drawableContext, double x, double y)
 
CADrawableMusElementType drawableMusElementType ()
 
CAMusElementmusElement ()
 
CADrawableContextdrawableContext ()
 
void setDrawableContext (CADrawableContext *context)
 
- Public Member Functions inherited from CADrawable
 CADrawable (double x, double y)
 
virtual ~CADrawable ()
 
virtual CADrawableclone ()
 
void drawHScaleHandles (QPainter *p, const CADrawSettings s)
 
void drawVScaleHandles (QPainter *p, const CADrawSettings s)
 
CADrawableType drawableType ()
 
double xPos () const
 
double yPos () const
 
double width () const
 
double height () const
 
double neededSpaceWidth () const
 
double neededSpaceHeight () const
 
double neededWidth () const
 
double neededHeight () const
 
double xCenter () const
 
double yCenter () const
 
const QRect bBox () const
 
bool isVisible () const
 
bool isSelectable () const
 
bool isHScalable () const
 
bool isVScalable () const
 
void setXPos (double xPos)
 
void setYPos (double yPos)
 
void setWidth (double width)
 
void setHeight (double height)
 
void setNeededSpaceWidth (double width)
 
void setNeededSpaceHeight (double height)
 
void setVisible (bool v)
 
void setSelectable (bool s)
 
void setHScalable (bool s)
 
void setVScalable (bool s)
 

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. More...
 
CADrawableAccidental_drawableAcc
 Is the current note shadow note? More...
 
CANote::CAStemDirection _stemDirection
 
double _stemLength
 This value is StemUp or StemDown only, no StemPreferred or StemNeutral present. We generate this on CADrawableNote constructor. More...
 
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
 

Additional Inherited Members

- Public Types inherited from CADrawableMusElement
enum  CADrawableMusElementType {
  DrawableNote, DrawableRest, DrawableMidiNote, DrawableClef,
  DrawableKeySignature, DrawableTimeSignature, DrawableBarline, DrawableAccidental,
  DrawableSlur, DrawableTuplet, DrawableSyllable, DrawableFunctionMark,
  DrawableFunctionMarkSupport, DrawableFiguredBassNumber, DrawableMark
}
 
- Public Types inherited from CADrawable
enum  CADrawableType { DrawableMusElement, DrawableContext }
 
enum  CADirection {
  Undefined, Top, Bottom, Left,
  Right, TopLeft, TopRight, BottomLeft,
  BottomRight
}
 
- Protected Member Functions inherited from CADrawableMusElement
void setDrawableMusElementType (CADrawableMusElementType t)
 
- Protected Member Functions inherited from CADrawable
void setDrawableType (CADrawableType t)
 
- Protected Attributes inherited from CADrawableMusElement
CADrawableMusElementType _drawableMusElementType
 
CADrawableContext_drawableContext
 
CAMusElement_musElement
 
bool _selectable
 
- Protected Attributes inherited from CADrawable
CADrawableType _drawableType
 
double _xPos
 
double _yPos
 
double _width
 
double _height
 
double _neededSpaceWidth
 
double _neededSpaceHeight
 
bool _visible
 
bool _selectable
 
bool _hScalable
 
bool _vScalable
 
- Static Protected Attributes inherited from CADrawable
static const int SCALE_HANDLES_SIZE = 2
 

Constructor & Destructor Documentation

◆ CADrawableNote()

CADrawableNote::CADrawableNote ( CANote n,
CADrawableContext drawableContext,
double  x,
double  y,
bool  shadowNote = false,
CADrawableAccidental drawableAcc = 0 
)

◆ ~CADrawableNote()

CADrawableNote::~CADrawableNote ( )

Member Function Documentation

◆ clone()

CADrawableNote * CADrawableNote::clone ( CADrawableContext newContext = 0)
virtual

◆ draw()

void CADrawableNote::draw ( QPainter *  p,
CADrawSettings  s 
)
virtual

◆ drawableAccidental()

CADrawableAccidental* CADrawableNote::drawableAccidental ( )
inline

References _drawableAcc.

◆ drawLedgerLines()

bool CADrawableNote::drawLedgerLines ( )
inline

References _drawLedgerLines.

◆ note()

CANote* CADrawableNote::note ( )
inline

References CADrawableMusElement::_musElement.

Referenced by CADrawableNote(), clone(), draw(), and CALayoutEngine::reposit().

Here is the caller graph for this function:

◆ setDrawableAccidental()

void CADrawableNote::setDrawableAccidental ( CADrawableAccidental acc)
inline

References _drawableAcc.

◆ setDrawLedgerLines()

void CADrawableNote::setDrawLedgerLines ( bool  ledgerLines)
inline

References _drawLedgerLines.

Member Data Documentation

◆ _drawableAcc

CADrawableAccidental* CADrawableNote::_drawableAcc
private

Is the current note shadow note?

Referenced by CADrawableNote(), drawableAccidental(), and setDrawableAccidental().

◆ _drawLedgerLines

bool CADrawableNote::_drawLedgerLines
private

◆ _flagDownGlyphName

QString CADrawableNote::_flagDownGlyphName
private

Referenced by CADrawableNote(), and draw().

◆ _flagUpGlyphName

QString CADrawableNote::_flagUpGlyphName
private

Referenced by CADrawableNote(), and draw().

◆ _noteHeadGlyphName

QString CADrawableNote::_noteHeadGlyphName
private

Referenced by CADrawableNote(), and draw().

◆ _noteHeadWidth

double CADrawableNote::_noteHeadWidth
private

Referenced by CADrawableNote(), and draw().

◆ _penWidth

double CADrawableNote::_penWidth
private

Referenced by CADrawableNote(), and draw().

◆ _shadowNote

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().

◆ _stemDirection

CANote::CAStemDirection CADrawableNote::_stemDirection
private

Referenced by CADrawableNote(), and draw().

◆ _stemLength

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().

◆ EIGHTH_STEM_LENGTH

const double CADrawableNote::EIGHTH_STEM_LENGTH = 31
staticprivate

Referenced by CADrawableNote().

◆ HALF_STEM_LENGTH

const double CADrawableNote::HALF_STEM_LENGTH = 31
staticprivate

Referenced by CADrawableNote().

◆ HALF_YPOS_DELTA

const double CADrawableNote::HALF_YPOS_DELTA = 23
staticprivate

◆ HUNDREDTWENTYEIGHTH_STEM_LENGTH

const double CADrawableNote::HUNDREDTWENTYEIGHTH_STEM_LENGTH = 50
staticprivate

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().

◆ QUARTER_STEM_LENGTH

const double CADrawableNote::QUARTER_STEM_LENGTH = 31
staticprivate

Referenced by CADrawableNote().

◆ QUARTER_YPOS_DELTA

const double CADrawableNote::QUARTER_YPOS_DELTA = 21
staticprivate

◆ SIXTEENTH_STEM_LENGTH

const double CADrawableNote::SIXTEENTH_STEM_LENGTH = 31
staticprivate

Referenced by CADrawableNote().

◆ SIXTYFOURTH_STEM_LENGTH

const double CADrawableNote::SIXTYFOURTH_STEM_LENGTH = 43
staticprivate

Referenced by CADrawableNote().

◆ THIRTYSECOND_STEM_LENGTH

const double CADrawableNote::THIRTYSECOND_STEM_LENGTH = 37
staticprivate

Referenced by CADrawableNote().


The documentation for this class was generated from the following files: