|
Canorus
0.0
|
Represents a rest in the score. More...
#include <rest.h>

Public Types | |
| enum | CARestType { Undefined =-1, Normal, Hidden } |
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 | |
| static const QString | restTypeToString (CARestType) |
| static CARestType | restTypeFromString (const QString) |
| static QList< CARest * > | composeRests (int timeLength, int timeStart, CAVoice *voice=0, CARestType=Hidden) |
Static Public Member Functions inherited from CAMusElement | |
| static const QString | musElementTypeToString (CAMusElementType) |
| static CAMusElementType | musElementTypeFromString (const QString) |
Private Attributes | |
| CARestType | _restType |
Additional Inherited Members | |
Protected Member Functions inherited from CAMusElement | |
| void | setMusElementType (CAMusElementType type) |
Protected Attributes inherited from CAPlayable | |
| 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 |
Represents a rest in the score.
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.
This class represents every rest in the score. It inherits the base class CAPlayable.
| enum CARest::CARestType |
| CARest::CARest | ( | CARestType | type, |
| CAPlayableLength | length, | ||
| CAVoice * | voice, | ||
| int | timeStart, | ||
| int | timeLength = -1 |
||
| ) |
Creates a new rest with given type, playable length length in voice voice with starting time in the score timeStart and number of dots dotted. timeLength is calculated automatically from the playable length.
References CAMusElement::_musElementType, _restType, and CAMusElement::Rest.
Referenced by clone(), and composeRests().

| CARest::~CARest | ( | ) |
Destroys the rest.
Implements CAPlayable.
References CAMusElement::addMark(), CARest(), CAMusElement::markList(), CAPlayable::playableLength(), restType(), CAMusElement::timeLength(), CAMusElement::timeStart(), and CAPlayable::voice().

|
virtual |
Compares the music element with the given elt and returns number of differences in their properties. Returns 0, if the music elements are exact; -1 if the music element type differs; otherwise number greater than 0.
This method is usually used when opening a score document where music elements are written in various voices (eg. barlines), but are eventually merged and written only once per staff.
Implements CAMusElement.
References CAMusElement::musElementType(), CAPlayable::playableLength(), and CAMusElement::Rest.

|
static |
Generates a list of new rests in the total length of timeLength. Rests are sorted from the shortes to the longest one. The first rest has the given timeStart. Passing voice and restType is optional.
This function is usually called when a gap between two voices with shared elements appear in one voice and the gap with custom length needs to be filled with rests.
References CAPlayableLength::Breve, CARest(), CAMusElement::timeLength(), CAMusElement::timeStart(), and CAPlayable::voice().
Referenced by CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), CAMainWin::on_uiPlayableLength_toggled(), CAMusicXmlImport::readForward(), CAMainWin::scoreViewKeyPress(), and CAStaff::synchronizeVoices().


|
inline |
References _restType.
Referenced by clone(), CALilyPondExport::exportPlayable(), CACanorusMLExport::exportVoiceImpl(), CAScoreView::paintEvent(), and CAMainWin::updatePlayableToolBar().

|
static |
Converts rest type from QString to CARestType. This is usually used when loading the score.
References Hidden, and Normal.
Referenced by CACanorusMLImport::startElement().

|
static |
Converts rest type CARestType to QString. This is usually used when saving the score.
References Hidden, and Normal.
Referenced by CACanorusMLExport::exportVoiceImpl().

|
inline |
References _restType.
Referenced by CAMainWin::on_uiHiddenRest_toggled().

|
private |
Type of the rest.
Referenced by CARest(), restType(), and setRestType().