Planeshift
|
Keep general attributes that can change from a measure to another like key signature, beats and tempo. More...
#include <scoreelements.h>
Public Member Functions | |
int | GetBeats () const |
Get the numerator of the time signature. | |
int | GetBeatType () const |
Get the denominator of the time signature. | |
int | GetFifths () const |
Get the tonality as the number of accidentals in the key signature. | |
int | GetTempo () const |
Get the tempo. | |
bool | IsUndefined () const |
Check if all attributes are undefined. | |
MeasureAttributes () | |
Initialize all attributes to UNDEFINED_MEASURE_ATTRIBUTE. | |
void | SetBeats (int beats) |
Set the numerator of the time signature. | |
void | SetBeatType (int beatType) |
Set the denominator of the time signature. | |
void | SetFifths (int fifths) |
Set the key signature as the number of accidentals. | |
void | SetTempo (int tempo) |
Set the tempo. | |
void | UpdateAttributes (const MeasureAttributes &attributes) |
Update the measure context with the attributes of the given measure. |
Keep general attributes that can change from a measure to another like key signature, beats and tempo.
Some attributes can be undefined. This means that the specific attribute takes the same value of the same attribute in the previous measure. Undefined attributes take the value UNDEFINED_MEASURE_ATTRIBUTE.
Definition at line 309 of file scoreelements.h.
Measure< MeasureElementType >::MeasureAttributes::MeasureAttributes | ( | ) |
Initialize all attributes to UNDEFINED_MEASURE_ATTRIBUTE.
int Measure< MeasureElementType >::MeasureAttributes::GetBeats | ( | ) | const [inline] |
Get the numerator of the time signature.
Definition at line 322 of file scoreelements.h.
int Measure< MeasureElementType >::MeasureAttributes::GetBeatType | ( | ) | const [inline] |
Get the denominator of the time signature.
Definition at line 329 of file scoreelements.h.
int Measure< MeasureElementType >::MeasureAttributes::GetFifths | ( | ) | const [inline] |
Get the tonality as the number of accidentals in the key signature.
Definition at line 337 of file scoreelements.h.
int Measure< MeasureElementType >::MeasureAttributes::GetTempo | ( | ) | const [inline] |
Get the tempo.
Definition at line 344 of file scoreelements.h.
bool Measure< MeasureElementType >::MeasureAttributes::IsUndefined | ( | ) | const |
Check if all attributes are undefined.
void Measure< MeasureElementType >::MeasureAttributes::SetBeats | ( | int | beats | ) | [inline] |
Set the numerator of the time signature.
beats | The new numerator of the time signature. |
Definition at line 358 of file scoreelements.h.
void Measure< MeasureElementType >::MeasureAttributes::SetBeatType | ( | int | beatType | ) | [inline] |
Set the denominator of the time signature.
beatType | The new denominator of the time signature. |
Definition at line 365 of file scoreelements.h.
void Measure< MeasureElementType >::MeasureAttributes::SetFifths | ( | int | fifths | ) | [inline] |
Set the key signature as the number of accidentals.
fifths | The number of accidentals in the key signature. Positive for sharps, negative for flats. |
Definition at line 373 of file scoreelements.h.
void Measure< MeasureElementType >::MeasureAttributes::UpdateAttributes | ( | const MeasureAttributes & | attributes | ) |
Update the measure context with the attributes of the given measure.
Attributes that are undefined in the given object are not updated.
measure | The measure with the new attributes. |