|
Canorus
0.7
|
Marks that depend on other music elements. More...
#include <mark.h>

Public Types | |
| enum | CAMarkType { Undefined = -1, Text, Tempo, Ritardando, Dynamic, Crescendo, Pedal, InstrumentChange, BookMark, RehersalMark, Fermata, RepeatMark, Articulation, Fingering } |
Public Member Functions | |
| CAMark (CAMarkType type, CAMusElement *associatedElt, int timeStart=-1, int timeLength=-1) | |
| CAMark (CAMarkType type, CAContext *context, int timeStart, int timeLength) | |
| virtual | ~CAMark () |
| virtual CAMark * | clone (CAContext *context) |
| virtual CAMark * | clone (CAMusElement *elt=0) |
| virtual int | compare (CAMusElement *elt) |
| CAMusElement * | associatedElement () |
| void | setAssociatedElement (CAMusElement *elt) |
| CAMarkType | markType () |
| void | setMarkType (CAMarkType type) |
| bool | isCommon () |
Static Public Member Functions | |
| static const QString | markTypeToString (CAMarkType t) |
| static CAMarkType | markTypeFromString (const QString s) |
Protected Member Functions | |
| void | setCommon (bool c) |
Private Attributes | |
| CAMusElement * | _associatedElt |
| CAMarkType | _markType |
| bool | _common |
Marks that depend on other music elements.
Copyright (c) 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.
This class covers all marks that depend on other music elements. This includes all
text signs, dynamic marks, articulation, fingering, etc.| enum CAMark::CAMarkType |
| CAMark::CAMark | ( | CAMarkType | type, |
| CAMusElement * | associatedElt, | ||
| int | timeStart = -1, |
||
| int | timeLength = -1 |
||
| ) |
References CAMusElement::Mark, setAssociatedElement(), setCommon(), setMarkType(), and CAMusElement::setMusElementType().
Referenced by clone().


| CAMark::CAMark | ( | CAMarkType | type, |
| CAContext * | context, | ||
| int | timeStart, | ||
| int | timeLength | ||
| ) |
References CAMusElement::Mark, setAssociatedElement(), setCommon(), setMarkType(), and CAMusElement::setMusElementType().

| CAMark::~CAMark | ( | ) | [virtual] |
References associatedElement(), and CAMusElement::removeMark().

| CAMusElement* CAMark::associatedElement | ( | ) | [inline] |
References _associatedElt.
Referenced by CAArticulation::associatedNote(), and ~CAMark().

| virtual CAMark* CAMark::clone | ( | CAContext * | context | ) | [inline, virtual] |
Clones a music element with exact properties including the context.
Implements CAMusElement.
References clone(), and CAMusElement::setContext().
Referenced by clone().


| CAMark * CAMark::clone | ( | CAMusElement * | elt = 0 | ) | [virtual] |
Reimplemented in CAArticulation, CAFingering, CARepeatMark, CAFermata, CADynamic, CACrescendo, CARitardando, CABookMark, CAText, CAInstrumentChange, and CATempo.
References CAMark(), markType(), CAMusElement::timeLength(), and CAMusElement::timeStart().

| int CAMark::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.
Reimplemented in CAArticulation, CAFingering, CARepeatMark, CAFermata, CADynamic, CACrescendo, CARitardando, CABookMark, CAText, CAInstrumentChange, and CATempo.
References CAMusElement::Mark, markType(), and CAMusElement::musElementType().

| bool CAMark::isCommon | ( | ) | [inline] |
References _common.
Referenced by CACanorusMLExport::exportMarks(), and CAVoice::updateTimes().

| CAMarkType CAMark::markType | ( | ) | [inline] |
References _markType.
Referenced by CAMusElement::addMark(), CADrawableMark::CADrawableMark(), clone(), compare(), CACanorusMLImport::endElement(), CACanorusMLExport::exportMarks(), CALilyPondExport::exportMarks(), CAMainWin::onTextEditKeyPressEvent(), and CAEngraver::placeMarks().

| CAMark::CAMarkType CAMark::markTypeFromString | ( | const QString | s | ) | [static] |
Converts mark type from string.
References Articulation, BookMark, Crescendo, Dynamic, Fermata, Fingering, InstrumentChange, Pedal, RehersalMark, RepeatMark, Ritardando, Tempo, Text, and Undefined.
Referenced by CACanorusMLImport::importMark().

| const QString CAMark::markTypeToString | ( | CAMark::CAMarkType | t | ) | [static] |
Converts mark type to string.
References Articulation, BookMark, Crescendo, Dynamic, Fermata, Fingering, InstrumentChange, Pedal, RehersalMark, RepeatMark, Ritardando, Tempo, and Text.
Referenced by CACanorusMLExport::exportMarks().

| void CAMark::setAssociatedElement | ( | CAMusElement * | elt | ) | [inline] |
References _associatedElt, CAMusElement::_context, and CAMusElement::context().
Referenced by CAMark(), and CAArticulation::setAssociatedNote().


| void CAMark::setCommon | ( | bool | c | ) | [inline, protected] |
References _common.
Referenced by CAFingering::CAFingering(), and CAMark().

| void CAMark::setMarkType | ( | CAMarkType | type | ) | [inline] |
CAMusElement* CAMark::_associatedElt [private] |
Referenced by associatedElement(), and setAssociatedElement().
bool CAMark::_common [private] |
Is mark present in all music elements in the chord. Default: True.
The exception is the fingering which is assigned explicitly to the specific note inside the chord
Referenced by isCommon(), and setCommon().
CAMarkType CAMark::_markType [private] |
Referenced by markType(), and setMarkType().
1.8.0