Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CADrawableKeySignature Class Reference

#include <drawablekeysignature.h>

Inheritance diagram for CADrawableKeySignature:
Inheritance graph
[legend]

Public Member Functions

 CADrawableKeySignature (CAKeySignature *keySig, CADrawableStaff *staff, double x, double y)
 
 ~CADrawableKeySignature ()
 
void draw (QPainter *p, CADrawSettings s)
 
CADrawableKeySignatureclone (CADrawableContext *newContext=0)
 
CAKeySignaturekeySignature ()
 
- Public Member Functions inherited from CADrawableMusElement
 CADrawableMusElement (CAMusElement *musElement, CADrawableContext *drawableContext, double x, double y)
 
CADrawableMusElementType drawableMusElementType ()
 
CAMusElementmusElement ()
 
CADrawableContextdrawableContext ()
 
void setDrawableContext (CADrawableContext *context)
 
- Public Member Functions inherited from CADrawable
 CADrawable (double x, double y)
 
virtual ~CADrawable ()
 
virtual CADrawableclone ()
 
void drawHScaleHandles (QPainter *p, const CADrawSettings s)
 
void drawVScaleHandles (QPainter *p, const CADrawSettings s)
 
CADrawableType drawableType ()
 
double xPos ()
 
double yPos ()
 
double width ()
 
double height ()
 
double neededSpaceWidth ()
 
double neededSpaceHeight ()
 
double neededWidth ()
 
double neededHeight ()
 
double xCenter ()
 
double yCenter ()
 
const QRect bBox ()
 
bool isVisible ()
 
bool isSelectable ()
 
bool isHScalable ()
 
bool isVScalable ()
 
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)
 

Static Public Member Functions

static void populateComboBox (QComboBox *c)
 
static CADiatonicKey comboBoxRowToDiatonicKey (int row)
 
static int diatonicKeyToRow (CADiatonicKey k)
 
static void populateComboBoxDirection (QComboBox *c)
 

Private Attributes

QList< CADrawableAccidental * > _drawableAccidentalList
 

Additional Inherited Members

- Public Types inherited from CADrawableMusElement
enum  CADrawableMusElementType {
  DrawableNote, DrawableRest, DrawableClef, DrawableKeySignature,
  DrawableTimeSignature, DrawableBarline, DrawableAccidental, DrawableSlur,
  DrawableTuplet, DrawableSyllable, DrawableFunctionMark, DrawableFunctionMarkSupport,
  DrawableMark
}
 
- Protected Member Functions inherited from CADrawableMusElement
void setDrawableMusElementType (CADrawableMusElementType t)
 
- Protected Attributes inherited from CADrawableMusElement
CADrawableMusElementType _drawableMusElementType
 
CADrawableContext_drawableContext
 
CAMusElement_musElement
 
bool _selectable
 
- Static Protected Attributes inherited from CADrawable
static const int SCALE_HANDLES_SIZE = 2
 

Constructor & Destructor Documentation

CADrawableKeySignature::CADrawableKeySignature ( CAKeySignature keySig,
CADrawableStaff drawableStaff,
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.

Default constructor.

y marks the top line Y coordinate of the staff in absolute world units.

References _drawableAccidentalList, CAKeySignature::accidentals(), CAClef::c1(), CADrawableStaff::calculateCenterYCoord(), CADrawableMusElement::DrawableKeySignature, CADrawableStaff::getClef(), CADrawableStaff::getKeySignature(), CAStaff::numberOfLines(), CADrawableMusElement::setDrawableMusElementType(), CADrawable::setHeight(), CADrawable::setWidth(), CADrawable::setYPos(), CADrawableStaff::staff(), and CADrawable::yPos().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CADrawableKeySignature::~CADrawableKeySignature ( )

Member Function Documentation

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

Implements CADrawableMusElement.

References CADrawableMusElement::_drawableContext, CADrawableKeySignature(), keySignature(), and CADrawable::xPos().

Here is the call graph for this function:

CADiatonicKey CADrawableKeySignature::comboBoxRowToDiatonicKey ( int  row)
static

This function returns the selected diatonic key dependent on the selected row.

See Also
CADrawableKeySignature::populateComboBox(), CADrawableKeySignature::populateComboBoxDirection()

References CADiatonicKey::Major, and CADiatonicKey::Minor.

Referenced by CATransposeView::on_uiApply_clicked(), and CAMainWin::on_uiKeySig_activated().

Here is the caller graph for this function:

int CADrawableKeySignature::diatonicKeyToRow ( CADiatonicKey  k)
static

Returns the item index in the combo box corresponding to the given diatonic key k.

References CADiatonicKey::gender(), CADiatonicKey::Minor, and CADiatonicKey::numberOfAccs().

Referenced by CATransposeView::show(), CAMainWin::updateFMToolBar(), and CAMainWin::updateKeySigToolBar().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Implements CADrawable.

References _drawableAccidentalList, CADrawSettings::x, CADrawable::xPos(), CADrawSettings::y, CADrawable::yPos(), and CADrawSettings::z.

Here is the call graph for this function:

CAKeySignature* CADrawableKeySignature::keySignature ( )
inline

References CADrawableMusElement::_musElement.

Referenced by clone(), and CAEngraver::reposit().

Here is the caller graph for this function:

void CADrawableKeySignature::populateComboBox ( QComboBox *  c)
static

This function adds key signatures to the given combobox in order major-minor-major-... from most flats to most sharps.

This function usually called when initializing the main window.

See Also
CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBoxDirection()

Referenced by CAMainWin::createCustomActions(), and CATransposeView::setupCustomUi().

Here is the caller graph for this function:

void CADrawableKeySignature::populateComboBoxDirection ( QComboBox *  c)
static

Adds directions Up and Down with icons to the given combo box.

See Also
CADrawableKeySignature::comboBoxRowToDiatonicKey(), CADrawableKeySignature::populateComboBox()

Referenced by CATransposeView::setupCustomUi().

Here is the caller graph for this function:

Member Data Documentation

QList<CADrawableAccidental*> CADrawableKeySignature::_drawableAccidentalList
private

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