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

Rectangles, key names, numbers below/above function, lines etc. Support class which draws the key of the function, rectangle around it, chord area, ellipse etc. These drawable music elements aren't selectable, but they can't be drawn by a single CADrawableFunctionMark because they're usually dependent on more than one function mark. More...

#include <drawablefunctionmark.h>

Inheritance diagram for CADrawableFunctionMarkSupport:
Inheritance graph
[legend]

Public Types

enum  CADrawableFunctionMarkSupportType {
  Key , Rectangle , ChordArea , Tonicization ,
  Ellipse , Alterations
}
 
- 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
}
 

Public Member Functions

 CADrawableFunctionMarkSupport (CADrawableFunctionMarkSupportType, const QString key, CADrawableContext *c, double x, double y)
 
 CADrawableFunctionMarkSupport (CADrawableFunctionMarkSupportType, CADrawableFunctionMark *function, CADrawableContext *c, double x, double y, CADrawableFunctionMark *function2=0)
 
 CADrawableFunctionMarkSupport (CADrawableFunctionMarkSupportType, CAFunctionMark *function, CADrawableContext *c, double x, double y)
 
 ~CADrawableFunctionMarkSupport ()
 
void draw (QPainter *p, const CADrawSettings s)
 
CADrawableFunctionMarkSupportclone (CADrawableContext *newContext=0)
 
CADrawableFunctionMarkSupportType drawableFunctionMarkSupportType ()
 
bool isExtenderLineVisible ()
 
void setExtenderLineVisible (bool visible)
 
bool rectWider ()
 
void setRectWider (bool wider)
 
- 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

CADrawableFunctionMarkSupportType _drawableFunctionMarkSupportType
 
QString _key
 
CADrawableFunctionMark_function1
 
CADrawableFunctionMark_function2
 
bool _extenderLineVisible
 
bool _rectWider
 

Additional Inherited Members

- 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

Rectangles, key names, numbers below/above function, lines etc. Support class which draws the key of the function, rectangle around it, chord area, ellipse etc. These drawable music elements aren't selectable, but they can't be drawn by a single CADrawableFunctionMark because they're usually dependent on more than one function mark.

See also
CADrawableFunctionMark

Member Enumeration Documentation

◆ CADrawableFunctionMarkSupportType

Enumerator
Key 
Rectangle 
ChordArea 
Tonicization 
Ellipse 
Alterations 

Constructor & Destructor Documentation

◆ CADrawableFunctionMarkSupport() [1/3]

CADrawableFunctionMarkSupport::CADrawableFunctionMarkSupport ( CADrawableFunctionMarkSupportType  type,
const QString  key,
CADrawableContext c,
double  x,
double  y 
)

KeyName constructor.

Todo:
Width determination should be done automatically using QPainter::boundingRect() method

References _drawableFunctionMarkSupportType, CADrawableMusElement::_drawableMusElementType, _function1, _function2, CADrawable::_height, _key, CADrawable::_width, CADrawableMusElement::DrawableFunctionMarkSupport, Key, CADrawable::setSelectable(), and CADrawable::setWidth().

Referenced by clone().

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

◆ CADrawableFunctionMarkSupport() [2/3]

CADrawableFunctionMarkSupport::CADrawableFunctionMarkSupport ( CADrawableFunctionMarkSupportType  type,
CADrawableFunctionMark f1,
CADrawableContext c,
double  x,
double  y,
CADrawableFunctionMark f2 = 0 
)

◆ CADrawableFunctionMarkSupport() [3/3]

CADrawableFunctionMarkSupport::CADrawableFunctionMarkSupport ( CADrawableFunctionMarkSupportType  type,
CAFunctionMark function,
CADrawableContext c,
double  x,
double  y 
)

◆ ~CADrawableFunctionMarkSupport()

CADrawableFunctionMarkSupport::~CADrawableFunctionMarkSupport ( )

Member Function Documentation

◆ clone()

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

◆ draw()

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

◆ drawableFunctionMarkSupportType()

CADrawableFunctionMarkSupportType CADrawableFunctionMarkSupport::drawableFunctionMarkSupportType ( )
inline

◆ isExtenderLineVisible()

bool CADrawableFunctionMarkSupport::isExtenderLineVisible ( )
inline

References _extenderLineVisible.

◆ rectWider()

bool CADrawableFunctionMarkSupport::rectWider ( )
inline

References _rectWider.

◆ setExtenderLineVisible()

void CADrawableFunctionMarkSupport::setExtenderLineVisible ( bool  visible)
inline

References _extenderLineVisible.

◆ setRectWider()

void CADrawableFunctionMarkSupport::setRectWider ( bool  wider)
inline

References CADrawable::_height, _rectWider, and CADrawable::_yPos.

Referenced by CALayoutEngine::reposit().

Here is the caller graph for this function:

Member Data Documentation

◆ _drawableFunctionMarkSupportType

CADrawableFunctionMarkSupportType CADrawableFunctionMarkSupport::_drawableFunctionMarkSupportType
private

◆ _extenderLineVisible

bool CADrawableFunctionMarkSupport::_extenderLineVisible
private

◆ _function1

CADrawableFunctionMark* CADrawableFunctionMarkSupport::_function1
private

◆ _function2

CADrawableFunctionMark * CADrawableFunctionMarkSupport::_function2
private

◆ _key

QString CADrawableFunctionMarkSupport::_key
private

◆ _rectWider

bool CADrawableFunctionMarkSupport::_rectWider
private

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