CADrawable Class Reference

#include <drawable.h>

Inheritance diagram for CADrawable:

Inheritance graph
[legend]

List of all members.

Public Types

enum  CADrawableType { DrawableMusElement, DrawableContext }
enum  CADirection {
  Undefined, Top, Bottom, Left,
  Right, TopLeft, TopRight, BottomLeft,
  BottomRight
}

Public Member Functions

 CADrawable (int x, int 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 ()
int xPos ()
int yPos ()
int xPosOrig ()
int yPosOrig ()
int width ()
int height ()
int neededWidth ()
int neededHeight ()
int xCenter ()
int yCenter ()
const QRect bBox ()
bool isVisible ()
bool isSelectable ()
bool isHScalable ()
bool isVScalable ()
virtual void setXPos (int xPos)
virtual void setYPos (int yPos)
void setXPosAbsolute (int xPos)
void setYPosAbsolute (int yPos)
void setXPosOffset (int xPosOffset)
void setYPosOffset (int yPosOffset)
void setWidth (int width)
void setHeight (int height)
void setVisible (bool v)
void setSelectable (bool s)
void setHScalable (bool s)
void setVScalable (bool s)

Protected Member Functions

void setNeededWidth (int width)
void setNeededHeight (int height)

Protected Attributes

CADrawableType _drawableType
int _xPos
int _yPos
int _xPosOffset
int _yPosOffset
int _width
int _height
int _neededWidth
int _neededHeight
bool _visible
bool _selectable
bool _HScalable
bool _VScalable

Static Protected Attributes

static const int SCALE_HANDLES_SIZE = 2


Detailed Description

Definition at line 26 of file drawable.h.


Member Enumeration Documentation

enum CADrawable::CADrawableType

Enumerator:
DrawableMusElement 
DrawableContext 

Definition at line 28 of file drawable.h.

enum CADrawable::CADirection

Enumerator:
Undefined 
Top 
Bottom 
Left 
Right 
TopLeft 
TopRight 
BottomLeft 
BottomRight 

Definition at line 33 of file drawable.h.


Constructor & Destructor Documentation

CADrawable::CADrawable ( int  x,
int  y 
)

Definition at line 16 of file drawable.cpp.

References setHScalable(), setSelectable(), setVisible(), setVScalable(), setXPosAbsolute(), setXPosOffset(), setYPosAbsolute(), and setYPosOffset().

Here is the call graph for this function:

virtual CADrawable::~CADrawable (  )  [inline, virtual]

Definition at line 46 of file drawable.h.


Member Function Documentation

virtual void CADrawable::draw ( QPainter *  p,
const CADrawSettings  s 
) [pure virtual]

Implemented in CADrawableAccidental, CADrawableBarline, CADrawableClef, CADrawableFunctionMarking, CADrawableFunctionMarkingSupport, CADrawableFunctionMarkingContext, CADrawableKeySignature, CADrawableLyricsContext, CADrawableMark, CADrawableNote, CADrawableRest, CADrawableSlur, CADrawableStaff, CADrawableSyllable, and CADrawableTimeSignature.

CADrawable * CADrawable::clone (  )  [virtual]

Reimplemented in CADrawableContext, CADrawableFunctionMarkingContext, CADrawableLyricsContext, and CADrawableStaff.

Definition at line 27 of file drawable.cpp.

void CADrawable::drawHScaleHandles ( QPainter *  p,
const CADrawSettings  s 
)

Definition at line 33 of file drawable.cpp.

References CADrawSettings::color, height(), SCALE_HANDLES_SIZE, width(), CADrawSettings::x, CADrawSettings::y, and CADrawSettings::z.

Here is the call graph for this function:

void CADrawable::drawVScaleHandles ( QPainter *  p,
const CADrawSettings  s 
)

Definition at line 41 of file drawable.cpp.

References CADrawSettings::color, height(), SCALE_HANDLES_SIZE, width(), CADrawSettings::x, CADrawSettings::y, and CADrawSettings::z.

Here is the call graph for this function:

CADrawableType CADrawable::drawableType (  )  [inline]

Definition at line 53 of file drawable.h.

References _drawableType.

int CADrawable::xPos (  )  [inline]

Definition at line 54 of file drawable.h.

References _xPos, and _xPosOffset.

Referenced by CADrawableStaff::addClef(), CADrawableStaff::addKeySignature(), CADrawableContext::addMElement(), CADrawableStaff::addTimeSignature(), CAScoreViewPort::addToSelection(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableMark::CADrawableMark(), CADrawableTimeSignature::clone(), CADrawableSyllable::clone(), CADrawableSlur::clone(), CADrawableMark::clone(), CADrawableLyricsContext::clone(), CADrawableKeySignature::clone(), CADrawableFunctionMarkingContext::clone(), CADrawableFunctionMarking::clone(), CADrawableClef::clone(), CAScoreViewPort::coordsToTime(), CAScoreViewPort::createTextEdit(), CADrawableSlur::draw(), CADrawableKeySignature::draw(), CADrawableFunctionMarkingSupport::draw(), CADrawableContext::findInRange(), CAKDTree< T >::findNearestLeft(), CAKDTree< T >::findNearestRight(), CADrawableStaff::getClef(), CADrawableStaff::getKeySignature(), CADrawableStaff::getTimeSignature(), CAMainWin::insertMusElementAt(), CAEngraver::placeMarks(), CAEngraver::reposit(), CAMainWin::scoreViewPortMousePress(), CAScoreViewPort::timeToCoords(), and CADrawableSlur::updateGeometry().

Here is the caller graph for this function:

int CADrawable::yPos (  )  [inline]

Definition at line 55 of file drawable.h.

References _yPos, and _yPosOffset.

Referenced by CADrawableClef::CADrawableClef(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableStaff::calculateCenterYCoord(), CADrawableStaff::calculatePitch(), CADrawableSyllable::clone(), CADrawableMark::clone(), CADrawableLyricsContext::clone(), CADrawableFunctionMarkingContext::clone(), CADrawableFunctionMarking::clone(), CAScoreViewPort::createTextEdit(), CADrawableKeySignature::draw(), CAKDTree< T >::findNearestDown(), CAKDTree< T >::findNearestUp(), CAScoreViewPort::paintEvent(), CAEngraver::placeMarks(), CAEngraver::reposit(), CAMainWin::scoreViewPortMousePress(), CADrawableSlur::updateGeometry(), and CADrawableFunctionMarkingContext::yPosLine().

Here is the caller graph for this function:

int CADrawable::xPosOrig (  )  [inline]

Definition at line 56 of file drawable.h.

References _xPos.

Referenced by CAKDTree< T >::findNearestLeft(), and CAKDTree< T >::findNearestRight().

Here is the caller graph for this function:

int CADrawable::yPosOrig (  )  [inline]

Definition at line 57 of file drawable.h.

References _yPos.

int CADrawable::width (  )  [inline]

Definition at line 58 of file drawable.h.

References _width.

Referenced by CADrawableClef::CADrawableClef(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableMark::CADrawableMark(), CADrawableSlur::CADrawableSlur(), CADrawableSyllable::CADrawableSyllable(), CADrawableSlur::clone(), CADrawableFunctionMarkingSupport::clone(), CADrawableSyllable::draw(), CADrawableSlur::draw(), CADrawableMark::draw(), CADrawableFunctionMarkingSupport::draw(), CADrawableClef::draw(), drawHScaleHandles(), drawVScaleHandles(), CADrawableContext::findInRange(), CAMainWin::insertMusElementAt(), CAScoreViewPort::paintEvent(), CAEngraver::placeMarks(), CAEngraver::reposit(), and CAMainWin::scoreViewPortMousePress().

Here is the caller graph for this function:

int CADrawable::height (  )  [inline]

Definition at line 59 of file drawable.h.

References _height.

Referenced by CADrawableBarline::CADrawableBarline(), CADrawableClef::CADrawableClef(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableMark::CADrawableMark(), CADrawableSlur::CADrawableSlur(), CADrawableSyllable::CADrawableSyllable(), CADrawableTimeSignature::CADrawableTimeSignature(), CADrawableStaff::calculateCenterYCoord(), CADrawableStaff::calculatePitch(), CADrawableTimeSignature::draw(), CADrawableSyllable::draw(), CADrawableRest::draw(), CADrawableNote::draw(), CADrawableMark::draw(), CADrawableLyricsContext::draw(), CADrawableFunctionMarkingContext::draw(), CADrawableFunctionMarkingSupport::draw(), CADrawableClef::draw(), CADrawableBarline::draw(), drawHScaleHandles(), drawVScaleHandles(), CAKDTree< T >::findNearestUp(), CAEngraver::placeMarks(), CAEngraver::reposit(), and CAMainWin::scoreViewPortMousePress().

Here is the caller graph for this function:

int CADrawable::neededWidth (  )  [inline]

Definition at line 60 of file drawable.h.

References _neededWidth.

Referenced by CAEngraver::reposit().

Here is the caller graph for this function:

int CADrawable::neededHeight (  )  [inline]

Definition at line 61 of file drawable.h.

References _neededHeight.

int CADrawable::xCenter (  )  [inline]

Definition at line 62 of file drawable.h.

References _width, _xPos, and _xPosOffset.

int CADrawable::yCenter (  )  [inline]

Definition at line 63 of file drawable.h.

References _height, _yPos, and _yPosOffset.

Referenced by CADrawableTimeSignature::CADrawableTimeSignature().

Here is the caller graph for this function:

const QRect CADrawable::bBox (  )  [inline]

Definition at line 64 of file drawable.h.

References _height, _width, _xPos, _xPosOffset, _yPos, and _yPosOffset.

bool CADrawable::isVisible (  )  [inline]

Definition at line 65 of file drawable.h.

References _visible.

bool CADrawable::isSelectable (  )  [inline]

Definition at line 66 of file drawable.h.

References _selectable.

Referenced by CAScoreViewPort::addToSelection(), and CAScoreViewPort::selectMElement().

Here is the caller graph for this function:

bool CADrawable::isHScalable (  )  [inline]

Definition at line 67 of file drawable.h.

References _HScalable.

Referenced by CAEngraver::placeMarks().

Here is the caller graph for this function:

bool CADrawable::isVScalable (  )  [inline]

Definition at line 68 of file drawable.h.

References _VScalable.

Referenced by CAEngraver::placeMarks().

Here is the caller graph for this function:

virtual void CADrawable::setXPos ( int  xPos  )  [inline, virtual]

Reimplemented in CADrawableNote.

Definition at line 70 of file drawable.h.

References _xPos.

Referenced by CADrawableMark::CADrawableMark(), CAEngraver::reposit(), and CADrawableSlur::updateGeometry().

Here is the caller graph for this function:

virtual void CADrawable::setYPos ( int  yPos  )  [inline, virtual]

Reimplemented in CADrawableNote.

Definition at line 71 of file drawable.h.

References _yPos.

Referenced by CADrawableSlur::updateGeometry().

Here is the caller graph for this function:

void CADrawable::setXPosAbsolute ( int  xPos  )  [inline]

Definition at line 72 of file drawable.h.

References _xPos.

Referenced by CADrawable().

Here is the caller graph for this function:

void CADrawable::setYPosAbsolute ( int  yPos  )  [inline]

Definition at line 73 of file drawable.h.

References _yPos.

Referenced by CADrawable().

Here is the caller graph for this function:

void CADrawable::setXPosOffset ( int  xPosOffset  )  [inline]

Definition at line 74 of file drawable.h.

References _xPosOffset.

Referenced by CADrawable().

Here is the caller graph for this function:

void CADrawable::setYPosOffset ( int  yPosOffset  )  [inline]

Definition at line 75 of file drawable.h.

References _yPosOffset.

Referenced by CADrawable().

Here is the caller graph for this function:

void CADrawable::setWidth ( int  width  )  [inline]

Definition at line 76 of file drawable.h.

References _neededWidth, and _width.

Referenced by CADrawableLyricsContext::CADrawableLyricsContext(), CADrawableMark::CADrawableMark(), CADrawableSyllable::CADrawableSyllable(), CAEngraver::reposit(), and CADrawableSlur::updateGeometry().

Here is the caller graph for this function:

void CADrawable::setHeight ( int  height  )  [inline]

Definition at line 77 of file drawable.h.

References _height, and _neededHeight.

Referenced by CADrawableLyricsContext::CADrawableLyricsContext(), CADrawableMark::CADrawableMark(), CADrawableSyllable::CADrawableSyllable(), and CADrawableSlur::updateGeometry().

Here is the caller graph for this function:

void CADrawable::setVisible ( bool  v  )  [inline]

Definition at line 78 of file drawable.h.

References _visible.

Referenced by CADrawable().

Here is the caller graph for this function:

void CADrawable::setSelectable ( bool  s  )  [inline]

Definition at line 79 of file drawable.h.

References _selectable.

Referenced by CADrawable(), CADrawableAccidental::CADrawableAccidental(), and CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport().

Here is the caller graph for this function:

void CADrawable::setHScalable ( bool  s  )  [inline]

Definition at line 80 of file drawable.h.

References _HScalable.

Referenced by CADrawable(), and CADrawableMark::CADrawableMark().

Here is the caller graph for this function:

void CADrawable::setVScalable ( bool  s  )  [inline]

Definition at line 81 of file drawable.h.

References _VScalable.

Referenced by CADrawable().

Here is the caller graph for this function:

void CADrawable::setNeededWidth ( int  width  )  [inline, protected]

Definition at line 84 of file drawable.h.

References _neededWidth.

Referenced by CADrawableClef::CADrawableClef(), CADrawableMark::CADrawableMark(), CADrawableSlur::CADrawableSlur(), and CADrawableSyllable::CADrawableSyllable().

Here is the caller graph for this function:

void CADrawable::setNeededHeight ( int  height  )  [inline, protected]

Definition at line 85 of file drawable.h.

References _neededHeight.

Referenced by CADrawableClef::CADrawableClef(), CADrawableMark::CADrawableMark(), CADrawableSlur::CADrawableSlur(), and CADrawableSyllable::CADrawableSyllable().

Here is the caller graph for this function:


Member Data Documentation

CADrawableType CADrawable::_drawableType [protected]

Definition at line 86 of file drawable.h.

Referenced by CADrawableContext::CADrawableContext(), CADrawableMusElement::CADrawableMusElement(), and drawableType().

int CADrawable::_xPos [protected]

Definition at line 87 of file drawable.h.

Referenced by bBox(), CADrawableAccidental::CADrawableAccidental(), CADrawableFunctionMarking::CADrawableFunctionMarking(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), CADrawableStaff::clone(), CADrawableRest::clone(), CADrawableNote::clone(), CADrawableFunctionMarkingSupport::clone(), CADrawableBarline::clone(), CADrawableNote::setXPos(), setXPos(), setXPosAbsolute(), xCenter(), xPos(), and xPosOrig().

int CADrawable::_yPos [protected]

Definition at line 88 of file drawable.h.

Referenced by bBox(), CADrawableAccidental::CADrawableAccidental(), CADrawableClef::CADrawableClef(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), CADrawableTimeSignature::CADrawableTimeSignature(), CADrawableStaff::clone(), CADrawableRest::clone(), CADrawableNote::clone(), CADrawableFunctionMarkingSupport::clone(), CADrawableBarline::clone(), CADrawableFunctionMarkingSupport::setRectWider(), CADrawableNote::setYPos(), setYPos(), setYPosAbsolute(), yCenter(), yPos(), CADrawableFunctionMarkingContext::yPosLine(), and yPosOrig().

int CADrawable::_xPosOffset [protected]

Definition at line 89 of file drawable.h.

Referenced by bBox(), setXPosOffset(), xCenter(), and xPos().

int CADrawable::_yPosOffset [protected]

Definition at line 90 of file drawable.h.

Referenced by bBox(), setYPosOffset(), yCenter(), and yPos().

int CADrawable::_width [protected]

Definition at line 91 of file drawable.h.

Referenced by bBox(), CADrawableAccidental::CADrawableAccidental(), CADrawableBarline::CADrawableBarline(), CADrawableClef::CADrawableClef(), CADrawableFunctionMarking::CADrawableFunctionMarking(), CADrawableFunctionMarkingContext::CADrawableFunctionMarkingContext(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), CADrawableStaff::CADrawableStaff(), CADrawableTimeSignature::CADrawableTimeSignature(), CADrawableFunctionMarkingSupport::draw(), CADrawableFunctionMarking::draw(), setWidth(), width(), and xCenter().

int CADrawable::_height [protected]

Definition at line 92 of file drawable.h.

Referenced by bBox(), CADrawableAccidental::CADrawableAccidental(), CADrawableBarline::CADrawableBarline(), CADrawableClef::CADrawableClef(), CADrawableFunctionMarking::CADrawableFunctionMarking(), CADrawableFunctionMarkingContext::CADrawableFunctionMarkingContext(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), CADrawableStaff::CADrawableStaff(), CADrawableTimeSignature::CADrawableTimeSignature(), CADrawableNote::clone(), CADrawableStaff::draw(), CADrawableRest::draw(), CADrawableNote::draw(), CADrawableFunctionMarkingSupport::draw(), CADrawableFunctionMarking::draw(), CADrawableAccidental::draw(), height(), CADrawableStaff::lineSpace(), setHeight(), CADrawableFunctionMarkingSupport::setRectWider(), CADrawableNote::setYPos(), and yCenter().

int CADrawable::_neededWidth [protected]

Definition at line 93 of file drawable.h.

Referenced by CADrawableAccidental::CADrawableAccidental(), CADrawableBarline::CADrawableBarline(), CADrawableFunctionMarking::CADrawableFunctionMarking(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), CADrawableTimeSignature::CADrawableTimeSignature(), neededWidth(), setNeededWidth(), and setWidth().

int CADrawable::_neededHeight [protected]

Definition at line 94 of file drawable.h.

Referenced by CADrawableAccidental::CADrawableAccidental(), CADrawableBarline::CADrawableBarline(), CADrawableFunctionMarking::CADrawableFunctionMarking(), CADrawableFunctionMarkingSupport::CADrawableFunctionMarkingSupport(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), CADrawableTimeSignature::CADrawableTimeSignature(), neededHeight(), setHeight(), and setNeededHeight().

bool CADrawable::_visible [protected]

Definition at line 95 of file drawable.h.

Referenced by isVisible(), and setVisible().

bool CADrawable::_selectable [protected]

Reimplemented in CADrawableMusElement.

Definition at line 96 of file drawable.h.

Referenced by isSelectable(), and setSelectable().

bool CADrawable::_HScalable [protected]

Definition at line 97 of file drawable.h.

Referenced by isHScalable(), and setHScalable().

bool CADrawable::_VScalable [protected]

Definition at line 98 of file drawable.h.

Referenced by isVScalable(), and setVScalable().

const int CADrawable::SCALE_HANDLES_SIZE = 2 [static, protected]

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.

Definition at line 100 of file drawable.h.

Referenced by drawHScaleHandles(), and drawVScaleHandles().


The documentation for this class was generated from the following files:
Generated on Sat Feb 9 13:12:34 2008 for Canorus by  doxygen 1.5.3