|
Canorus 0.0
|
#include <clef.h>

Public Types | |
| enum | CAPredefinedClefType { Undefined =-1 , Treble , Bass , French , Soprano , Mezzosoprano , Alto , Tenor , Baritone , Varbaritone , Subbass , Percussion , Tablature } |
| enum | CAClefType { F , G , C , PercussionHigh , PercussionLow , Tab } |
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 | clefTypeToString (CAClefType) |
| static CAClefType | clefTypeFromString (const QString) |
| static const int | offsetFromReadable (const int offsetInterval) |
| static const int | offsetToReadable (const int offset) |
Static Public Member Functions inherited from CAMusElement | |
| static const QString | musElementTypeToString (CAMusElementType) |
| static CAMusElementType | musElementTypeFromString (const QString) |
Private Attributes | |
| CAClefType | _clefType |
| int | _c1 |
| int | _centerPitch |
| int | _offset |
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 |
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.
Represents a clef in the score
This class represents every clef in the score. It directly inherits the base class CAMusElement. Element is not playable (_timeLength=0).
| enum CAClef::CAClefType |
| CAClef::CAClef | ( | CAPredefinedClefType | type, |
| CAStaff * | staff, | ||
| int | time, | ||
| int | offsetInterval = 0 |
||
| ) |
Creates a new predefined clef with type type, parent staff and start time time. _timeLength is set to 0. offsetInterval can be custom -1,0,1 no offset, +8 or -8 etc. mean the 8 written above or below the clef which raises or lowers the clef for one octave or whichever interval. Offset is the musical interval, not the internal offset.
References CAMusElement::_musElementType, _offset, CAMusElement::Clef, offsetFromReadable(), and setPredefinedType().
Referenced by clone().


| CAClef::CAClef | ( | CAClefType | type, |
| int | c1, | ||
| CAStaff * | staff, | ||
| int | time, | ||
| int | offset = 0 |
||
| ) |
Creates a new clef with type type, location of middle C c1, time start time and parent staff. offset is the internal clef offset 0, +7, -7 etc. It does not affect c1.
References _c1, CAMusElement::_musElementType, _offset, c1(), CAMusElement::Clef, offset(), and setClefType().

|
inline |
References _c1.
Referenced by CAClef(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableStaff::calculateCenterYCoord(), CADrawableStaff::calculatePitch(), compare(), CAMusicXmlExport::exportClef(), CALilyPondExport::exportVoiceImpl(), CACanorusMLExport::exportVoiceImpl(), and CANote::notePosition().

|
inline |
References _centerPitch.
|
inline |
References _clefType.
Referenced by compare(), CAMusicXmlExport::exportClef(), CALilyPondExport::exportVoiceImpl(), and CACanorusMLExport::exportVoiceImpl().

|
static |
Converts QString type to clef type.
References C, F, G, PercussionHigh, PercussionLow, and Tab.
Referenced by CACanorusMLImport::startElement().

|
static |
Converts clef type to QString.
References C, F, G, PercussionHigh, PercussionLow, and Tab.
Referenced by CACanorusMLExport::exportVoiceImpl().

Clones a music element with exact properties including the context.
Implements CAMusElement.
References _c1, _clefType, _offset, CAMusElement::_timeStart, CAMusElement::addMark(), CAClef(), 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 _c1, _clefType, _offset, c1(), CAMusElement::Clef, clefType(), CAMusElement::musElementType(), and offset().

|
inline |
References _offset.
Referenced by CAClef(), compare(), CAMusicXmlExport::exportClef(), CALilyPondExport::exportVoiceImpl(), CACanorusMLExport::exportVoiceImpl(), offsetFromReadable(), setClefType(), setOffset(), setPredefinedType(), and CAMainWin::updateClefToolBar().

Converts the musical interval offset to Canorus internal offset. This method is usually called where user inputs the offset interval and it needs to be stored.
References offset().
Referenced by CAClef(), and CAMainWin::on_uiClefOffset_valueChanged().


Converts the internal clef offset to the musical interval. eg. offset +1 means +2 (supper second), +7 means +8 (supper octave), -7 means -8 (sub octave), 0 is an exception and stays 0 (instead of prime)
This method is usually called when displaying the offset of the key (eg. when rendering it).
Referenced by CAMainWin::updateClefToolBar().

| void CAClef::setClefType | ( | CAClefType | type | ) |
Sets the clef type to type and update _c1 and _centerPitch.
References _centerPitch, _clefType, C, F, G, offset(), PercussionHigh, PercussionLow, and Tab.
Referenced by CAClef(), and setPredefinedType().


|
inline |
References _c1, _offset, and offset().
Referenced by CAMainWin::on_uiClefOffset_valueChanged().


| void CAClef::setPredefinedType | ( | CAPredefinedClefType | type | ) |
References _c1, Alto, Baritone, Bass, C, F, French, G, Mezzosoprano, offset(), Percussion, setClefType(), Soprano, Subbass, Tablature, Tenor, Treble, Undefined, and Varbaritone.
Referenced by CAClef().


|
inline |
|
private |
Location of the middle C:
Referenced by c1(), CAClef(), clone(), compare(), setOffset(), and setPredefinedType().
|
private |
Location of the clefs physical center:
Referenced by centerPitch(), and setClefType().
|
private |
Referenced by clefType(), clone(), compare(), and setClefType().
|
private |
Referenced by CAClef(), clone(), compare(), offset(), and setOffset().