Canorus  0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
CADrawable Class Referenceabstract

#include <drawable.h>

Inheritance diagram for CADrawable:
Inheritance graph
[legend]

Public Types

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

Public Member Functions

 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)
 

Protected Member Functions

void setDrawableType (CADrawableType t)
 

Protected Attributes

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

static const int SCALE_HANDLES_SIZE = 2
 

Member Enumeration Documentation

◆ CADirection

Enumerator
Undefined 
Top 
Bottom 
Left 
Right 
TopLeft 
TopRight 
BottomLeft 
BottomRight 

◆ CADrawableType

Enumerator
DrawableMusElement 
DrawableContext 

Constructor & Destructor Documentation

◆ CADrawable()

CADrawable::CADrawable ( double  x,
double  y 
)

◆ ~CADrawable()

virtual CADrawable::~CADrawable ( )
inlinevirtual

Member Function Documentation

◆ bBox()

const QRect CADrawable::bBox ( ) const
inline

References _height, _width, _xPos, and _yPos.

◆ clone()

CADrawable * CADrawable::clone ( )
virtual

◆ draw()

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

◆ drawableType()

CADrawableType CADrawable::drawableType ( )
inline

References _drawableType.

◆ drawHScaleHandles()

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

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

Here is the call graph for this function:

◆ drawVScaleHandles()

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

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

Here is the call graph for this function:

◆ height()

double CADrawable::height ( ) const
inline

◆ isHScalable()

bool CADrawable::isHScalable ( ) const
inline

References _hScalable.

Referenced by CALayoutEngine::placeMarks().

Here is the caller graph for this function:

◆ isSelectable()

bool CADrawable::isSelectable ( ) const
inline

References _selectable.

Referenced by CAScoreView::addToSelection().

Here is the caller graph for this function:

◆ isVisible()

bool CADrawable::isVisible ( ) const
inline

References _visible.

◆ isVScalable()

bool CADrawable::isVScalable ( ) const
inline

References _vScalable.

Referenced by CALayoutEngine::placeMarks().

Here is the caller graph for this function:

◆ neededHeight()

double CADrawable::neededHeight ( ) const
inline

References _height, and _neededSpaceHeight.

◆ neededSpaceHeight()

double CADrawable::neededSpaceHeight ( ) const
inline

References _neededSpaceHeight.

Referenced by CADrawableMidiNote::draw().

Here is the caller graph for this function:

◆ neededSpaceWidth()

double CADrawable::neededSpaceWidth ( ) const
inline

References _neededSpaceWidth.

Referenced by CADrawableMidiNote::draw().

Here is the caller graph for this function:

◆ neededWidth()

double CADrawable::neededWidth ( ) const
inline

References _neededSpaceWidth, and _width.

Referenced by CALayoutEngine::reposit().

Here is the caller graph for this function:

◆ setDrawableType()

void CADrawable::setDrawableType ( CADrawableType  t)
inlineprotected

References _drawableType.

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

Here is the caller graph for this function:

◆ setHeight()

void CADrawable::setHeight ( double  height)
inline

◆ setHScalable()

void CADrawable::setHScalable ( bool  s)
inline

References _hScalable.

Referenced by CADrawableMark::CADrawableMark().

Here is the caller graph for this function:

◆ setNeededSpaceHeight()

void CADrawable::setNeededSpaceHeight ( double  height)
inline

References _neededSpaceHeight, and height().

Referenced by CADrawableMidiNote::CADrawableMidiNote(), and CADrawableSlur::CADrawableSlur().

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

◆ setNeededSpaceWidth()

void CADrawable::setNeededSpaceWidth ( double  width)
inline

References _neededSpaceWidth, and width().

Referenced by CADrawableBarline::CADrawableBarline(), CADrawableMidiNote::CADrawableMidiNote(), and CADrawableSlur::CADrawableSlur().

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

◆ setSelectable()

void CADrawable::setSelectable ( bool  s)
inline

References _selectable.

Referenced by CADrawableAccidental::CADrawableAccidental(), and CADrawableFunctionMarkSupport::CADrawableFunctionMarkSupport().

Here is the caller graph for this function:

◆ setVisible()

void CADrawable::setVisible ( bool  v)
inline

References _visible.

◆ setVScalable()

void CADrawable::setVScalable ( bool  s)
inline

References _vScalable.

◆ setWidth()

void CADrawable::setWidth ( double  width)
inline

◆ setXPos()

void CADrawable::setXPos ( double  xPos)
inline

◆ setYPos()

void CADrawable::setYPos ( double  yPos)
inline

◆ width()

double CADrawable::width ( ) const
inline

◆ xCenter()

double CADrawable::xCenter ( ) const
inline

References _width, and _xPos.

◆ xPos()

double CADrawable::xPos ( ) const
inline

◆ yCenter()

double CADrawable::yCenter ( ) const
inline

References _height, and _yPos.

Referenced by CADrawableTimeSignature::CADrawableTimeSignature().

Here is the caller graph for this function:

◆ yPos()

double CADrawable::yPos ( ) const
inline

Member Data Documentation

◆ _drawableType

CADrawableType CADrawable::_drawableType
protected

Referenced by drawableType(), and setDrawableType().

◆ _height

double CADrawable::_height
protected

◆ _hScalable

bool CADrawable::_hScalable
protected

Referenced by isHScalable(), and setHScalable().

◆ _neededSpaceHeight

double CADrawable::_neededSpaceHeight
protected

◆ _neededSpaceWidth

double CADrawable::_neededSpaceWidth
protected

◆ _selectable

bool CADrawable::_selectable
protected

Referenced by isSelectable(), and setSelectable().

◆ _visible

bool CADrawable::_visible
protected

Referenced by isVisible(), and setVisible().

◆ _vScalable

bool CADrawable::_vScalable
protected

Referenced by isVScalable(), and setVScalable().

◆ _width

double CADrawable::_width
protected

◆ _xPos

double CADrawable::_xPos
protected

◆ _yPos

double CADrawable::_yPos
protected

◆ SCALE_HANDLES_SIZE

const int CADrawable::SCALE_HANDLES_SIZE = 2
staticprotected

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 drawHScaleHandles(), and drawVScaleHandles().


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