|
Canorus
0.7
|
Represents a key signature sign in the staff. More...
#include <keysignature.h>

Represents a key signature sign in the staff.
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.
CAKeySignature represents a key signature sign (static accidentals) in the staff.
The actual key signature key is stored (depends on type though - currently only major/minor
diatonic keys are supported) in _diatonicKey.
\sa CADiatonicKey| CAKeySignature::CAKeySignature | ( | CADiatonicKey | k, |
| CAStaff * | staff, | ||
| int | timeStart | ||
| ) |
Creates a new key signature of type MajorMinor, diatonic key dKey, parent staff and timeStart.
Number of accidentals is a signed number, positive for sharps, negative for flats. eg.
References CAMusElement::KeySignature, MajorMinor, setDiatonicKey(), setKeySignatureType(), and CAMusElement::setMusElementType().
Referenced by clone().


| CAKeySignature::CAKeySignature | ( | CAModus | m, |
| CAStaff * | staff, | ||
| int | timeStart | ||
| ) |
Creates a new key signature of type Modus, modus type \a m, parent \a staff and \a timeStart.
References CAMusElement::KeySignature, Modus, setKeySignatureType(), setModus(), and CAMusElement::setMusElementType().

| CAKeySignature::accidentals | ( | ) | [inline] |
Returns the array of accidentals for every level in the scale.
The levels can have the following values:
References _accidentals.
Referenced by CADrawableKeySignature::CADrawableKeySignature(), CADrawableStaff::getAccs(), and CAKeybdInput::matchPitchToKey().

| CAKeySignature * CAKeySignature::clone | ( | CAContext * | context = 0 | ) | [virtual] |
Clones a music element with exact properties including the context.
Implements CAMusElement.
References CAMusElement::addMark(), CAKeySignature(), diatonicKey(), keySignatureType(), MajorMinor, CAMusElement::markList(), and CAMusElement::timeStart().

| int CAKeySignature::compare | ( | CAMusElement * | elt | ) | [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 diatonicKey(), CAMusElement::KeySignature, keySignatureType(), MajorMinor, and CAMusElement::musElementType().

| CADiatonicKey CAKeySignature::diatonicKey | ( | ) | [inline] |
References _diatonicKey.
Referenced by clone(), compare(), CACanorusMLExport::exportVoiceImpl(), CALilyPondExport::exportVoiceImpl(), CAKeybdInput::matchPitchToKey(), CAMainWin::scoreViewPortKeyPress(), CATransposeView::show(), and CAMainWin::updateKeySigToolBar().

| CAKeySignatureType CAKeySignature::keySignatureType | ( | ) | [inline] |
References _keySignatureType.
Referenced by clone(), compare(), CACanorusMLImport::endElement(), CACanorusMLExport::exportVoiceImpl(), and updateAccidentals().

| CAKeySignature::CAKeySignatureType CAKeySignature::keySignatureTypeFromString | ( | const QString | type | ) | [static] |
References Custom, MajorMinor, and Modus.
Referenced by CACanorusMLImport::startElement().

| const QString CAKeySignature::keySignatureTypeToString | ( | CAKeySignatureType | type | ) | [static] |
References Custom, MajorMinor, and Modus.
Referenced by CACanorusMLExport::exportVoiceImpl().

| CAModus CAKeySignature::modus | ( | ) | [inline] |
References _modus.
Referenced by CACanorusMLExport::exportVoiceImpl(), and setModus().

| CAKeySignature::CAModus CAKeySignature::modusFromString | ( | const QString | modus | ) | [static] |
References Aeolian, Dorian, Hypodorian, Hypolydian, Hypomixolydian, Hypophrygian, Ionian, Locrian, Lydian, Mixolydian, and Phrygian.
Referenced by CACanorusMLImport::startElement().

| const QString CAKeySignature::modusToString | ( | CAModus | modus | ) | [static] |
References Aeolian, Dorian, Hypodorian, Hypolydian, Hypomixolydian, Hypophrygian, Ionian, Locrian, Lydian, Mixolydian, and Phrygian.
Referenced by CACanorusMLExport::exportVoiceImpl().

| void CAKeySignature::setDiatonicKey | ( | CADiatonicKey | k | ) | [inline] |
References _diatonicKey, and updateAccidentals().
Referenced by CAKeySignature(), CACanorusMLImport::endElement(), and CAMainWin::on_uiKeySig_activated().


| void CAKeySignature::setKeySignatureType | ( | CAKeySignatureType | type | ) | [inline] |
References _keySignatureType.
Referenced by CAKeySignature().

| void CAKeySignature::setModus | ( | CAModus | modus | ) | [inline] |
References _modus, and modus().
Referenced by CAKeySignature().


| CAStaff* CAKeySignature::staff | ( | ) | [inline] |
| void CAKeySignature::updateAccidentals | ( | ) | [private] |
References _accidentals, _diatonicKey, keySignatureType(), MajorMinor, and CADiatonicKey::numberOfAccs().
Referenced by setDiatonicKey().


CAKeySignature::_accidentals [private] |
Accidentals configuration for each level.
Indexes: [0..6] - C, D, E, F ... B Values: 0 - none, -1 - flat, +1 - sharp
Referenced by accidentals(), and updateAccidentals().
CADiatonicKey CAKeySignature::_diatonicKey [private] |
Referenced by diatonicKey(), setDiatonicKey(), and updateAccidentals().
Referenced by keySignatureType(), and setKeySignatureType().
CAModus CAKeySignature::_modus [private] |
Referenced by modus(), and setModus().
1.8.0