Logo Search packages:      
Sourcecode: canorus version File versions  Download package

CAMusElementFactory Class Reference

List of all members.

Detailed Description

creation, removal, configuration of music elements

Copyright (c) 2006, Reinhard Katzmann, Canorus development team 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.

This class is used when creating a new music element, settings its values, but not having it placed inside the score (eg. music element still in the GUI, but user didn't clicked on the score to place it yet).

The factory contains the methods to set properties of all the available music elements ranging from playable elements to slurs and lyrics. The actual music element is created and added to the scene when one of the configure functions are called. These functions return True, if the element was successfully created or False otherwise.

This class should be typically used in the following order: 1) User selects a music element to place. CAMusElementFactory::setMusElementType() is called. 2) GUI for music element properties is updated according to the current factory values. 3) User sets music element properties he wants (eg. number of accidentals in key signature). CAMusElementFactory::setSomeMusicElementProperty( music element property value ) is called (eg. CAMusElementFactory::setKeySigNumberOfAccs(3) for A-Major/fis-minor). 4) User places the music element. CAMusElementFactory::configureSomeMusicElement() (eg. CAMusElementFactory::configureKeySignature(currentStaff, prevElement)). 5) If the configure function returns True, the GUI is refreshed and the note is drawn.

Changing the properties of already placed elements (eg. in edit mode) is done without using the factory.

See also:
CAMainWin, CAMusElement

Definition at line 38 of file muselementfactory.h.

Public Member Functions

void addNoteAccs (int iAdd)
void addNoteExtraAccs (int iAdd)
void addPlayableDotted (int add, CAPlayableLength curLength)
CAArticulation::CAArticulationType articulationType ()
CABarline::CABarlineType barlineType ()
 CAMusElementFactory ()
CAClef::CAPredefinedClefType clef ()
int clefOffset ()
void cloneMusElem ()
bool configureBarline (CAStaff *staff, CAMusElement *right)
bool configureClef (CAStaff *staff, CAMusElement *right)
bool configureFunctionMark (CAFunctionMarkContext *fmc, int timeStart, int timeLength)
bool configureKeySignature (CAStaff *staff, CAMusElement *right)
bool configureMark (CAMusElement *elt)
void configureMusElem (CAMusElement &roMusElement)
bool configureNote (int pitch, CAVoice *voice, CAMusElement *right, bool addToChord)
bool configureRest (CAVoice *voice, CAMusElement *right)
bool configureSlur (CAStaff *staff, CANote *noteStart, CANote *noteEnd)
bool configureTimeSignature (CAStaff *staff, CAMusElement *right)
bool configureTuplet (QList< CAPlayable * > listOfNotes)
CAMusElementcreateMusElem ()
const int crescendoFinalVolume ()
const CACrescendo::CACrescendoType crescendoType ()
CADiatonicKey::CAGender diatonicKeyGender ()
int diatonicKeyNumberOfAccs ()
const QString dynamicText ()
const int dynamicVolume ()
void emptyMusElem ()
const CAFermata::CAFermataType fermataType ()
const CAFingering::CAFingerNumber fingeringFinger ()
CAFunctionMark::CAFunctionType fmChordArea ()
CAFunctionMark::CAFunctionType fmFunction ()
CAFunctionMark::CAFunctionType fmTonicDegree ()
const int instrument ()
const bool isFingeringOriginal ()
bool isFMChordAreaMinor ()
bool isFMEllipse ()
bool isFMFunctionMinor ()
bool isFMTonicDegreeMinor ()
CAMark::CAMarkType markType ()
CAMusElementmusElement ()
CAMusElement::CAMusElementType musElementType ()
int noteAccs ()
int noteExtraAccs ()
CANote::CAStemDirection noteStemDirection ()
CAPlayableLengthplayableLength ()
void removeMusElem (bool bReallyRemove=false)
repeatMarkType ()
const int repeatMarkVoltaNumber ()
CARest::CARestType restType ()
ritardandoType ()
void setArticulationType (CAArticulation::CAArticulationType t)
void setBarlineType (CABarline::CABarlineType type)
void setClef (CAClef::CAPredefinedClefType eClefType)
void setClefOffset (int offset)
void setCrescendoFinalVolume (const int v)
void setCrescendoType (const CACrescendo::CACrescendoType t)
void setDiatonicKeyGender (CADiatonicKey::CAGender g)
void setDiatonicKeyNumberOfAccs (int accs)
void setDynamicText (const QString t)
void setDynamicVolume (const int vol)
void setFermataType (const CAFermata::CAFermataType type)
void setFingeringFinger (const CAFingering::CAFingerNumber f)
void setFingeringOriginal (const int o)
void setFMChordArea (CAFunctionMark::CAFunctionType c)
void setFMChordAreaMinor (bool m)
void setFMEllipse (bool e)
void setFMFunction (CAFunctionMark::CAFunctionType f)
void setFMFunctionMinor (bool m)
void setFMTonicDegree (CAFunctionMark::CAFunctionType td)
void setFMTonicDegreeMinor (bool m)
void setInstrument (const int instrument)
void setMarkType (CAMark::CAMarkType t)
void setMusElement (CAMusElement *elt)
void setMusElementType (CAMusElement::CAMusElementType eMEType)
void setNoteAccs (int iNoteAccs)
void setNoteExtraAccs (int iNoteExtraAccs)
void setNoteStemDirection (CANote::CAStemDirection eDir)
void setPlayableLength (CAPlayableLength &playableLength)
void setRepeatMarkType (const CARepeatMark::CARepeatMarkType t)
void setRepeatMarkVoltaNumber (const int n)
void setRestType (CARest::CARestType eType)
void setRitardandoType (CARitardando::CARitardandoType t)
void setSlurStyle (CASlur::CASlurStyle style)
void setSlurType (CASlur::CASlurType type)
void setTempoBeat (CAPlayableLength &length)
void setTempoBpm (const int tempoBpm)
void setTimeSigBeat (int iTimeSigBeat)
void setTimeSigBeats (int iTimeSigBeats)
void setTupletActualNumber (int actualNumber)
void setTupletNumber (int number)
CASlur::CASlurStyle slurStyle ()
CASlur::CASlurType slurType ()
void subNoteAccs (int iSub)
void subNoteExtraAccs (int iSub)
CAPlayableLengthtempoBeat ()
const int tempoBpm ()
int timeSigBeat ()
int timeSigBeats ()
int tupletActualNumber ()
int tupletNumber ()
 ~CAMusElementFactory ()

Static Public Member Functions

static void placeAutoBar (CAPlayable *elt)

Private Attributes

CAArticulation::CAArticulationType _articulationType
int _crescendoFinalVolume
CACrescendo::CACrescendoType _crescendoType
CADiatonicKey::CAGender _diatonicKeyGender
int _diatonicKeyNumberOfAccs
QString _dynamicText
int _dynamicVolume
CABarline::CABarlineType _eBarlineType
CAClef::CAPredefinedClefType _eClef
CANote::CAStemDirection _eNoteStemDirection
CARest::CARestType _eRestType
CASlur::CASlurType _eSlurType
CAFermata::CAFermataType _fermataType
CAFingering::CAFingerNumber _fingeringFinger
int _fingeringOriginal
CAFunctionMark::CAFunctionType _fmChordArea
bool _fmChordAreaMinor
bool _fmEllipse
CAFunctionMark::CAFunctionType _fmFunction
bool _fmFunctionMinor
CAFunctionMark::CAFunctionType _fmTonicDegree
bool _fmTonicDegreeMinor
int _iClefOffset
int _iNoteAccs
int _iNoteExtraAccs
int _instrument
int _iPlayableDotted
int _iTimeSigBeat
int _iTimeSigBeats
CAMark::CAMarkType _markType
CAMusElement::CAMusElementType _musElementType
CAPlayableLength _playableLength
CARepeatMark::CARepeatMarkType _repeatMarkType
int _repeatMarkVoltaNumber
CARitardando::CARitardandoType _ritardandoType
CASlur::CASlurStyle _slurStyle
CAPlayableLength _tempoBeat
int _tempoBpm
int _tupletActualNumber
int _tupletNumber

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

Generated by  Doxygen 1.6.0   Back to index