|
Canorus 0.0
|
Represents a time signature in the staff. More...
#include <timesignature.h>

Public Types | |
| enum | CATimeSignatureType { Classical , Number , Mensural , Neomensural , Baroque } |
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 | timeSignatureTypeToString (CATimeSignatureType) |
| static CATimeSignatureType | timeSignatureTypeFromString (const QString) |
Static Public Member Functions inherited from CAMusElement | |
| static const QString | musElementTypeToString (CAMusElementType) |
| static CAMusElementType | musElementTypeFromString (const QString) |
Private Attributes | |
| int | _beats |
| int | _beat |
| CATimeSignatureType | _timeSignatureType |
Additional Inherited Members | |
Protected Member Functions inherited from CAMusElement | |
| void | setMusElementType (CAMusElementType type) |
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 time signature in the staff.
Copyright (c) 2006-2008, 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 is used for different time signatures in the score. Every staff has its own time signature object. Time signatures are non-playable objects (timeLength=0) aka signs. Time signature object is common to all the voices in one staff
Time signature consists of the upper number - number of beats and the lower number - beat. Internal values _beats and _beat represent these values.
Type of time signature to be shown.
Possible options:
| Enumerator | |
|---|---|
| Classical | |
| Number | |
| Mensural | |
| Neomensural | |
| Baroque | |
| CATimeSignature::CATimeSignature | ( | int | beats, |
| int | beat, | ||
| CAStaff * | staff, | ||
| int | startTime, | ||
| CATimeSignatureType | type = Classical |
||
| ) |
Creates a time signature with a beat beat, number of beats beats, parent staff, startTime and of given type.
eg. 3/4 time signature should be called new CATimeSignature(3, 4, staff, startTime);
References _beat, _beats, CAMusElement::_musElementType, _timeSignatureType, beat(), beats(), and CAMusElement::TimeSignature.
Referenced by clone().


| CATimeSignature::~CATimeSignature | ( | ) |
| int CATimeSignature::barDuration | ( | ) |
Returns the duration of a full measure in time units.
References _beat, _beats, and CAPlayableLength::musicLengthToTimeLength().
Referenced by CAScoreView::computeBarlinePositions(), and CAStaff::placeAutoBar().


|
inline |
Returns the beat of this time signature.
References _beat.
Referenced by CATimeSignature(), compare(), CALilyPondExport::doAnacrusisCheck(), CAMusicXmlExport::exportTimeSig(), CALilyPondExport::exportVoiceImpl(), CACanorusMLExport::exportVoiceImpl(), CAPlayableLength::matchToBars(), setBeat(), and CAMainWin::updateTimeSigToolBar().

|
inline |
Returns the number of beats of this time signature.
References _beats.
Referenced by CATimeSignature(), compare(), CALilyPondExport::doAnacrusisCheck(), CAMusicXmlExport::exportTimeSig(), CALilyPondExport::exportVoiceImpl(), CACanorusMLExport::exportVoiceImpl(), CAPlayableLength::matchToBars(), setBeats(), and CAMainWin::updateTimeSigToolBar().

|
virtual |
Clones a music element with exact properties including the context.
Implements CAMusElement.
References _beat, _beats, _timeSignatureType, CAMusElement::_timeStart, CAMusElement::addMark(), CATimeSignature(), CAMusElement::context(), and CAMusElement::markList().

|
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 _beat, _beats, _timeSignatureType, beat(), beats(), CAMusElement::musElementType(), CAMusElement::TimeSignature, and timeSignatureType().

|
inline |
|
inline |
|
inline |
| const QString CATimeSignature::timeSignatureML | ( | ) |
|
inline |
Returns type of the time signature.
References _timeSignatureType.
Referenced by compare(), and CACanorusMLExport::exportVoiceImpl().

|
static |
References Baroque, Classical, Mensural, Neomensural, and Number.
Referenced by CACanorusMLImport::startElement().

| const QString CATimeSignature::timeSignatureTypeML | ( | ) |
References _timeSignatureType, Baroque, Classical, Mensural, Neomensural, and Number.
|
static |
References Baroque, Classical, Mensural, Neomensural, and Number.
Referenced by CACanorusMLExport::exportVoiceImpl().

|
private |
Beat of this time signature. That's the lower number in the time signature.
Referenced by barDuration(), beat(), CATimeSignature(), clone(), compare(), setBeat(), and timeSignatureML().
|
private |
Number of beats of this time signature. That's the upper number in the time signature.
Referenced by barDuration(), beats(), CATimeSignature(), clone(), compare(), setBeats(), and timeSignatureML().
|
private |
Stores the type of the time signature.
Referenced by CATimeSignature(), clone(), compare(), timeSignatureType(), and timeSignatureTypeML().