|
Canorus 0.0
|
Playable instances of music elements. More...
#include <playable.h>

Protected Attributes | |
| CAPlayableLength | _playableLength |
| CAVoice * | _voice |
| CATuplet * | _tuplet |
Protected Attributes inherited from CAMusElement | |
| CAMusElementType | _musElementType |
| QList< CAMark * > | _markList |
| QList< CANoteCheckerError * > | _noteCheckerErrorList |
| CAContext * | _context |
| int | _timeStart |
| int | _timeLength |
| bool | _visible |
| QColor | _color |
| QString | _name |
Additional Inherited Members | |
Public Types inherited from CAMusElement | |
| enum | CAMusElementType { Undefined = 0 , Note , Rest , MidiNote , Barline , Clef , TimeSignature , KeySignature , Slur , Tuplet , Syllable , FunctionMark , FiguredBassMark , Mark } |
Static Public Member Functions inherited from CAMusElement | |
| static const QString | musElementTypeToString (CAMusElementType) |
| static CAMusElementType | musElementTypeFromString (const QString) |
Protected Member Functions inherited from CAMusElement | |
| void | setMusElementType (CAMusElementType type) |
Playable instances of music elements.
Copyright (c) 2006-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 LICENSE.GPL for details.
CAPlayable class represents a base class for all the music elements which are playable (timeLength property is greater than 0). It also adds other properties like the music length (whole, half, quarter etc.), number of dots and instead of contexts, playable elements voices for their parent objects.
Notes and rests inherit this class.
| CAPlayable::CAPlayable | ( | CAPlayableLength | length, |
| CAVoice * | voice, | ||
| int | timeStart, | ||
| int | timeLength = -1 |
||
| ) |
Creates a new playable element with playable length length, voice, timeStart and number of dots dotted.
References calculateTimeLength(), setPlayableLength(), setTuplet(), setVoice(), CAMusElement::timeLength(), and voice().

|
virtual |
Destroys the playable element.
The element is removed from any voice, if part of.
References CAVoice::remove(), CATuplet::removeNote(), tuplet(), and voice().

| void CAPlayable::calculateTimeLength | ( | ) |
Calculates the new timeLength depending on the playableLength.
Tuplets and other time transformations are not recognized.
References playableLength(), CAPlayableLength::playableLengthToTimeLength(), and CAMusElement::setTimeLength().
Referenced by CAPlayable(), CACanorusMLImport::endElement(), CAMainWin::on_uiPlayableLength_toggled(), resetTime(), and CAMainWin::scoreViewKeyPress().


|
inlinevirtual |
Clones a music element with exact properties including the context.
Implements CAMusElement.
References clone(), CAMusElement::context(), and CAMusElement::setContext().
Referenced by clone(), CAStaff::clone(), CAMainWin::copySelection(), and CAMainWin::pasteAt().


|
pure virtual |
Implemented in CAMidiNote, CANote, and CARest.
|
inline |
References _tuplet, and CATuplet::firstNote().
Referenced by CALilyPondExport::exportPlayable(), CACanorusMLExport::exportVoiceImpl(), CAMainWin::insertMusElementAt(), and CAKeybdInput::midiInEventToScore().


|
inline |
References _tuplet, and CATuplet::lastNote().
Referenced by CAStaff::clone(), CALilyPondExport::exportPlayable(), and CALayoutEngine::reposit().


|
inline |
References _playableLength.
Referenced by CAVoice::addNoteToChord(), CADrawableNote::CADrawableNote(), CADrawableRest::CADrawableRest(), calculateTimeLength(), CANote::clone(), CARest::clone(), CANote::compare(), CARest::compare(), CAMainWin::deleteSelection(), CADrawableNote::draw(), CADrawableRest::draw(), CAMusicXmlExport::exportNote(), CALilyPondExport::exportPlayable(), CACanorusMLExport::exportVoiceImpl(), CAMainWin::scoreViewKeyPress(), and CAMainWin::updatePlayableToolBar().

| void CAPlayable::resetTime | ( | ) |
Calculates both the new timeLength and timeStart according to the playableLength and the previous playable element timeEnd.
Element should be part of the voice.
Tuplets and other time transformations are not recognized.
References calculateTimeLength(), CAMusElement::setTimeStart(), CAMusElement::timeEnd(), CAMusElement::timeStart(), and voice().

|
inline |
References _playableLength.
Referenced by CAVoice::addNoteToChord(), CAPlayable(), CACanorusMLImport::endElement(), and CAMainWin::on_uiPlayableLength_toggled().

|
inline |
References _tuplet.
Referenced by CAPlayable(), CAMainWin::deleteSelection(), CAVoice::insertInTupletAndVoiceAt(), and CACanorusMLImport::startElement().

| void CAPlayable::setVoice | ( | CAVoice * | v | ) |
References CAMusElement::_context, _voice, CAVoice::staff(), and voice().
Referenced by CAPlayable().


|
inline |
References CAMusElement::_context.
Referenced by CANote::actualStemDirection(), CAMainWin::deleteSelection(), CALilyPondImport::importVoiceImpl(), CANote::notePosition(), CAMainWin::on_uiPlayableLength_toggled(), CAStaff::placeAutoBar(), CAMainWin::scoreViewKeyPress(), and CACanorusMLImport::startElement().

|
inline |
References _tuplet.
Referenced by CAStaff::clone(), CAMusElementFactory::configureNote(), CAMainWin::copySelection(), CAMainWin::deleteSelection(), CACanorusMLImport::endElement(), CALilyPondExport::exportPlayable(), CACanorusMLExport::exportVoiceImpl(), CAVoice::insertInTupletAndVoiceAt(), CAMainWin::insertMusElementAt(), CAKeybdInput::midiInEventToScore(), CAMainWin::pasteAt(), CAVoice::remove(), CALayoutEngine::reposit(), CAMainWin::scoreViewMousePress(), and ~CAPlayable().

|
inline |
References _voice.
Referenced by CANote::actualSlurDirection(), CANote::actualStemDirection(), CAPlayable(), CANote::clone(), CARest::clone(), CARest::composeRests(), CAMainWin::copySelection(), CAMainWin::deleteSelection(), CAMusicXmlExport::exportNote(), CAKDTree< T >::findNearestLeft(), CAKDTree< T >::findNearestRight(), CANote::getChord(), CAVoice::insertInTupletAndVoiceAt(), CAMainWin::insertMusElementAt(), CANote::isFirstInChord(), CANote::isLastInChord(), CANote::isPartOfChord(), CANote::notePosition(), CAMainWin::on_uiPlayableLength_toggled(), CAScoreView::paintEvent(), CAStaff::placeAutoBar(), CAPlayback::playSelectionImpl(), resetTime(), CAPlayback::run(), CAMainWin::scoreViewKeyPress(), CAMainWin::scoreViewMouseRelease(), setVoice(), CANote::updateTies(), and ~CAPlayable().

|
protected |
Referenced by CANote::noteLength(), playableLength(), and setPlayableLength().
|
protected |
Referenced by isFirstInTuplet(), isLastInTuplet(), setTuplet(), and tuplet().
|
protected |
Referenced by setVoice(), and voice().