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

#include <drawablecontext.h>

Inheritance diagram for CADrawableContext:
Inheritance graph
[legend]

Public Types

enum  CADrawableContextType { DrawableStaff , DrawableLyricsContext , DrawableFiguredBassContext , DrawableFunctionMarkContext }
 
- Public Types inherited from CADrawable
enum  CADrawableType { DrawableMusElement , DrawableContext }
 
enum  CADirection {
  Undefined , Top , Bottom , Left ,
  Right , TopLeft , TopRight , BottomLeft ,
  BottomRight
}
 

Public Member Functions

 CADrawableContext (CAContext *c, double x, double y)
 
CAContextcontext ()
 
CADrawableContextType drawableContextType ()
 
virtual void addMElement (CADrawableMusElement *elt)
 
virtual int removeMElement (CADrawableMusElement *elt)
 
CADrawableMusElementlastDrawableMusElement ()
 
virtual CADrawableContextclone ()=0
 
QList< CADrawableMusElement * > & drawableMusElementList ()
 
CADrawableMusElementfindMElement (CAMusElement *elt)
 
QList< CADrawableMusElement * > findInRange (double x1, double x2)
 
- 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)
 

Protected Member Functions

void setDrawableContextType (CADrawableContextType type)
 
- Protected Member Functions inherited from CADrawable
void setDrawableType (CADrawableType t)
 

Protected Attributes

CADrawableContextType _drawableContextType
 
CAContext_context
 
QList< CADrawableMusElement * > _drawableMusElementList
 
- 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
 

Additional Inherited Members

- Static Protected Attributes inherited from CADrawable
static const int SCALE_HANDLES_SIZE = 2
 

Member Enumeration Documentation

◆ CADrawableContextType

Enumerator
DrawableStaff 
DrawableLyricsContext 
DrawableFiguredBassContext 
DrawableFunctionMarkContext 

Constructor & Destructor Documentation

◆ CADrawableContext()

CADrawableContext::CADrawableContext ( CAContext c,
double  x,
double  y 
)

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.

References CADrawable::DrawableContext, and CADrawable::setDrawableType().

Here is the call graph for this function:

Member Function Documentation

◆ addMElement()

virtual void CADrawableContext::addMElement ( CADrawableMusElement elt)
inlinevirtual

Reimplemented in CADrawableStaff.

References _drawableMusElementList, and CADrawable::xPos().

Referenced by CAScoreView::addMElement().

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

◆ clone()

virtual CADrawableContext * CADrawableContext::clone ( )
pure virtual

◆ context()

CAContext * CADrawableContext::context ( )
inline

◆ drawableContextType()

CADrawableContextType CADrawableContext::drawableContextType ( )
inline

◆ drawableMusElementList()

QList< CADrawableMusElement * > & CADrawableContext::drawableMusElementList ( )
inline

◆ findInRange()

QList< CADrawableMusElement * > CADrawableContext::findInRange ( double  x1,
double  x2 
)

Returns a list of drawable music elements the current drawable context includes between the horizontal coordinates x1 and x2. The element is in a list already if only part of the element is touched by the region. That is the first returned element's left border is smaller than x1 and the last returned element's right border is larger than x2.

References _drawableMusElementList, CADrawable::width(), and CADrawable::xPos().

Here is the call graph for this function:

◆ findMElement()

CADrawableMusElement * CADrawableContext::findMElement ( CAMusElement elt)
inline

References _drawableMusElementList.

Referenced by CALayoutEngine::reposit().

Here is the caller graph for this function:

◆ lastDrawableMusElement()

CADrawableMusElement * CADrawableContext::lastDrawableMusElement ( )
inline

◆ removeMElement()

virtual int CADrawableContext::removeMElement ( CADrawableMusElement elt)
inlinevirtual

Reimplemented in CADrawableStaff.

References _drawableMusElementList.

◆ setDrawableContextType()

void CADrawableContext::setDrawableContextType ( CADrawableContextType  type)
inlineprotected

Member Data Documentation

◆ _context

CAContext* CADrawableContext::_context
protected

◆ _drawableContextType

CADrawableContextType CADrawableContext::_drawableContextType
protected

◆ _drawableMusElementList

QList<CADrawableMusElement *> CADrawableContext::_drawableMusElementList
protected

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