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

Public Types | |
| enum | CAKeySignatureType { MajorMinor, Modus, Custom } |
| enum | CAModus { Ionian, Dorian, Phrygian, Lydian, Mixolydian, Aeolian, Locrian, Hypodorian, Hypolydian, Hypomixolydian, Hypophrygian } |
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 | keySignatureTypeToString (CAKeySignatureType) |
| static CAKeySignatureType | keySignatureTypeFromString (const QString) |
| static const QString | modusToString (CAModus) |
| static CAModus | modusFromString (const QString) |
Static Public Member Functions inherited from CAMusElement | |
| static const QString | musElementTypeToString (CAMusElementType) |
| static CAMusElementType | musElementTypeFromString (const QString) |
Private Member Functions | |
| void | updateAccidentals () |
Private Attributes | |
| CAKeySignatureType | _keySignatureType |
| CAModus | _modus |
| CADiatonicKey | _diatonicKey |
| QList< int > | _accidentals |
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 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.
| 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 _accidentals, CAMusElement::KeySignature, MajorMinor, setDiatonicKey(), setKeySignatureType(), and CAMusElement::setMusElementType().
Referenced by clone().


Creates a new key signature of type Modus, modus type m, parent staff and timeStart.
References _accidentals, CAMusElement::KeySignature, Modus, setKeySignatureType(), setModus(), and CAMusElement::setMusElementType().

| CAKeySignature::~CAKeySignature | ( | ) |
|
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().

|
virtual |
Clones a music element with exact properties including the context.
Implements CAMusElement.
References CAMusElement::addMark(), CAKeySignature(), CAMusElement::context(), Custom, diatonicKey(), keySignatureType(), MajorMinor, CAMusElement::markList(), Modus, and CAMusElement::timeStart().

|
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().

|
inline |
References _diatonicKey.
Referenced by clone(), compare(), CAMusicXmlExport::exportKeySig(), CALilyPondExport::exportVoiceImpl(), CACanorusMLExport::exportVoiceImpl(), CAPlayback::loopUntilPlayable(), CAKeybdInput::matchPitchToKey(), CAMidiImport::matchPitchToKey(), CATranspose::reinterpretAccidentals(), CALayoutEngine::reposit(), CAMainWin::scoreViewKeyPress(), CATransposeView::show(), CATranspose::transposeByInterval(), and CAKeySignatureUI::updateKeySigToolBar().

|
inline |
References _keySignatureType.
Referenced by clone(), compare(), CACanorusMLImport::endElement(), CACanorusMLExport::exportVoiceImpl(), and updateAccidentals().

|
static |
References Custom, MajorMinor, and Modus.
Referenced by CACanorusMLImport::startElement().

|
static |
References Custom, MajorMinor, and Modus.
Referenced by CACanorusMLExport::exportVoiceImpl().

|
inline |
References _modus.
Referenced by CACanorusMLExport::exportVoiceImpl(), modusFromString(), modusToString(), and setModus().

|
static |
References Aeolian, Dorian, Hypodorian, Hypolydian, Hypomixolydian, Hypophrygian, Ionian, Locrian, Lydian, Mixolydian, modus(), and Phrygian.
Referenced by CACanorusMLImport::startElement().


References Aeolian, Dorian, Hypodorian, Hypolydian, Hypomixolydian, Hypophrygian, Ionian, Locrian, Lydian, Mixolydian, modus(), and Phrygian.
Referenced by CACanorusMLExport::exportVoiceImpl().


|
inline |
References _diatonicKey, and updateAccidentals().
Referenced by CAKeySignature(), CACanorusMLImport::endElement(), CAKeySignatureCtl::on_uiKeySig_activated(), and CATranspose::reinterpretAccidentals().


|
inline |
References _keySignatureType.
Referenced by CAKeySignature().

|
inline |
References _modus, and modus().
Referenced by CAKeySignature().


|
inline |
|
private |
References _accidentals, _diatonicKey, keySignatureType(), MajorMinor, and CADiatonicKey::numberOfAccs().
Referenced by setDiatonicKey().


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