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

#include <drawableaccidental.h>

Inheritance diagram for CADrawableAccidental:
Inheritance graph
[legend]

Public Member Functions

 CADrawableAccidental (signed char accs, CAMusElement *musElement, CADrawableContext *drawableContext, double x, double y)
 
 ~CADrawableAccidental ()
 
void draw (QPainter *p, CADrawSettings s)
 
CADrawableAccidentalclone (CADrawableContext *newContext=0)
 
- Public Member Functions inherited from CADrawableMusElement
 CADrawableMusElement (CAMusElement *musElement, CADrawableContext *drawableContext, double x, double y)
 
CADrawableMusElementType drawableMusElementType ()
 
CAMusElementmusElement ()
 
CADrawableContextdrawableContext ()
 
void setDrawableContext (CADrawableContext *context)
 
virtual CADrawableMusElementclone (CADrawableContext *newContext=0)=0
 
- Public Member Functions inherited from CADrawable
 CADrawable (double x, double y)
 
virtual ~CADrawable ()
 
virtual void draw (QPainter *p, const CADrawSettings s)=0
 
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

signed char _accs
 
double _centerX
 
double _centerY
 

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
 

Detailed Description

Copyright (c) 2006-2007, 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.

Constructor & Destructor Documentation

◆ CADrawableAccidental()

CADrawableAccidental::CADrawableAccidental ( signed char  accs,
CAMusElement musElement,
CADrawableContext drawableContext,
double  x,
double  y 
)

Copyright (c) 2006-2007, 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.

Default constructor.

Parameters
accsType of the accidental: 0 - natural, -1 - flat, +1 - sharp, -2 doubleflat, +2 - cross etc.
musElementPointer to the according musElement which the accidental represents (usually a CANote or CAKeySignature).
drawableContextPointer to the according drawable context which the accidental belongs to (usually CADrawableStaff or CADrawableFiguredBass).
xLeft X-coordinate of the accidental.
yCenter Y-coordinate of the accidental.

References _accs, _centerX, _centerY, CADrawableMusElement::DrawableAccidental, CADrawable::height(), CADrawableMusElement::setDrawableMusElementType(), CADrawable::setHeight(), CADrawable::setSelectable(), CADrawable::setWidth(), CADrawable::setXPos(), and CADrawable::setYPos().

Referenced by clone().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ~CADrawableAccidental()

CADrawableAccidental::~CADrawableAccidental ( )

Member Function Documentation

◆ clone()

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

◆ draw()

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

Implements CADrawable.

References _accs, CADrawSettings::color, CACanorus::fetaCodepoint(), CADrawable::height(), CADrawSettings::x, CADrawSettings::y, and CADrawSettings::z.

Referenced by CAScoreView::paintEvent().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ _accs

signed char CADrawableAccidental::_accs
private

Referenced by CADrawableAccidental(), clone(), and draw().

◆ _centerX

double CADrawableAccidental::_centerX
private

Referenced by CADrawableAccidental(), and clone().

◆ _centerY

double CADrawableAccidental::_centerY
private

Referenced by CADrawableAccidental(), and clone().


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