|
Canorus
0.7
|
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, Barline, Clef, TimeSignature, KeySignature, Slur, Tuplet, Syllable, FunctionMark, 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 |
| signed char | _accidentals [7] |
Additional Inherited Members | |
Protected Member Functions inherited from CAMusElement | |
| void | setMusElementType (CAMusElementType type) |
Protected Attributes inherited from CAMusElement | |
| QList< CAMark * > | _markList |
| CAMusElementType | _musElementType |
| 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 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 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(), diatonicKey(), keySignatureType(), MajorMinor, CAMusElement::markList(), 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(), CACanorusMLExport::exportVoiceImpl(), CALilyPondExport::exportVoiceImpl(), CAKeybdInput::matchPitchToKey(), CAMainWin::scoreViewPortKeyPress(), CATransposeView::show(), and CAMainWin::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(), and setModus().

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

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

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


|
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(), and updateAccidentals().
|
private |
Referenced by diatonicKey(), setDiatonicKey(), and updateAccidentals().
|
private |
Referenced by keySignatureType(), and setKeySignatureType().
|
private |
Referenced by modus(), and setModus().
1.8.3