|
Canorus
0.7
|
#include <clef.h>

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

| const int CAClef::c1 | ( | ) | [inline] |
References _c1.
Referenced by CAClef(), CADrawableKeySignature::CADrawableKeySignature(), CADrawableStaff::calculateCenterYCoord(), CADrawableStaff::calculatePitch(), CACanorusMLExport::exportVoiceImpl(), CALilyPondExport::exportVoiceImpl(), and CANote::notePosition().

| const int CAClef::centerPitch | ( | ) | [inline] |
References _centerPitch.
| CAClefType CAClef::clefType | ( | ) | [inline] |
References _clefType.
Referenced by CACanorusMLExport::exportVoiceImpl(), and CALilyPondExport::exportVoiceImpl().

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

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

| CAClef * CAClef::clone | ( | CAContext * | context = 0 | ) | [virtual] |
Clones a music element with exact properties including the context.
Implements CAMusElement.
References _c1, _clefType, _offset, CAMusElement::_timeStart, CAMusElement::addMark(), CAClef(), and CAMusElement::markList().

| int CAClef::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 _c1, _clefType, _offset, CAMusElement::Clef, and CAMusElement::musElementType().

| int CAClef::offset | ( | ) | [inline] |
References _offset.
Referenced by CAClef(), CACanorusMLExport::exportVoiceImpl(), CALilyPondExport::exportVoiceImpl(), setClefType(), setOffset(), setPredefinedType(), and CAMainWin::updateClefToolBar().

| const int CAClef::offsetFromReadable | ( | const int | offset | ) | [static] |
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.
Referenced by CAClef(), and CAMainWin::on_uiClefOffset_valueChanged().

| const int CAClef::offsetToReadable | ( | const int | offsetInterval | ) | [static] |
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, and offset().
Referenced by CAClef(), and setPredefinedType().


| void CAClef::setOffset | ( | int | offset | ) | [inline] |
References _c1, _offset, and offset().
Referenced by CAMainWin::on_uiClefOffset_valueChanged().


| void CAClef::setPredefinedType | ( | CAPredefinedClefType | type | ) |
| CAStaff* CAClef::staff | ( | ) | [inline] |
CAClef::_c1 [private] |
Location of the middle C:
Referenced by c1(), CAClef(), clone(), compare(), setOffset(), and setPredefinedType().
CAClef::_centerPitch [private] |
Location of the clefs physical center:
Referenced by centerPitch(), and setClefType().
CAClefType CAClef::_clefType [private] |
Referenced by clefType(), clone(), compare(), and setClefType().
int CAClef::_offset [private] |
Referenced by CAClef(), clone(), compare(), offset(), and setOffset().
1.8.0