Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
CAFunctionMark Class Reference

Represents a function mark in the score. More...

#include <functionmark.h>

Inheritance diagram for CAFunctionMark:
Inheritance graph
[legend]

List of all members.

Public Types

enum  CAFunctionType {
  Undefined = 0, I = 1, II = 2, III = 3,
  IV = 4, V = 5, VI = 6, VII = 7,
  T = 8, S = 9, D = 10, F = 11,
  N = 12, L = 13, K = 14
}

Public Member Functions

 CAFunctionMark (CAFunctionType function, bool minor, const CADiatonicKey key, CAFunctionMarkContext *context, int timeStart, int timeLength, CAFunctionType chordArea=Undefined, bool chordAreaMinor=false, CAFunctionType tonicDegree=T, bool tonicDegreeMinor=false, const QString alterations="", bool ellipseSequence=false)
CAFunctionMarkclone (CAContext *context=0)
void clear ()
 ~CAFunctionMark ()
CAFunctionMarkContextfmContext ()
CAFunctionType function ()
CADiatonicKey key ()
CAFunctionType chordArea ()
CAFunctionType tonicDegree ()
QList< int > alteredDegrees ()
QList< int > addedDegrees ()
void setFunction (CAFunctionType function)
void setKey (CADiatonicKey key)
void setChordArea (CAFunctionType chordArea)
void setChordAreaMinor (bool minor)
void setTonicDegree (CAFunctionType tonicDegree)
void setTonicDegreeMinor (bool minor)
void setAlteredDegrees (QList< int > degrees)
void setAddedDegrees (QList< int > degrees)
void setMinor (bool minor)
void setEllipse (bool ellipse)
void setAlterations (const QString alterations)
bool isEmpty ()
bool isSideDegree ()
bool isMinor ()
bool isChordAreaMinor ()
bool isTonicDegreeMinor ()
bool isPartOfEllipse ()
int compare (CAMusElement *function)

Static Public Member Functions

static const QString functionTypeToString (CAFunctionType)
static CAFunctionType functionTypeFromString (const QString)

Private Attributes

CAFunctionType _function
CADiatonicKey _key
CAFunctionType _chordArea
bool _chordAreaMinor
CAFunctionType _tonicDegree
bool _tonicDegreeMinor
QList< int > _alteredDegrees
QList< int > _addedDegrees
bool _minor
bool _ellipseSequence

Detailed Description

Represents a function mark in the score.

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 LICNESE.GPL for details.

    Copyright (c) 2006-2008, 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.



    Function marks are used to describe a harmony flow of the score.
    Current implementation uses a standard European-German nomenclature of harmony.
Todo:
Current translations of terms are mostly done "by heart". An English/Amercian composer or musicologist should translate attributes the best. -Matevz
    \sa CADrawableFunctionMark, CAFunctionMarkContext

Member Enumeration Documentation

Name of the function (tonic, subdominant, etc.), its chord area or the tonic degree. Possible names are:

  • Undefined no degree - extend the previous one
  • I 1st (usually never used)
  • II 2nd
  • III 3rd
  • IV 4th (no subdominant leading tone in minor key)
  • V 5th (no dominant leading tone in minor key)
  • VI 6th
  • VII 7th
  • T Tonic
  • S Subdominant
  • D Dominant
  • F Phrygian (F for Frigio in Italian)
  • N Napolitan
  • L Lidian
  • K Cadenze chord (see http://en.wikipedia.org/wiki/Cadence_%28music%29). K stands for "kadenze" in German. This is standard nomenclature.
Enumerator:
Undefined 
I 
II 
III 
IV 
V 
VI 
VII 
T 
S 
D 
F 
N 
L 
K 

Constructor & Destructor Documentation

CAFunctionMark::CAFunctionMark ( CAFunctionType  function,
bool  minor,
const CADiatonicKey  key,
CAFunctionMarkContext context,
int  timeStart,
int  timeLength,
CAFunctionType  chordArea = Undefined,
bool  chordAreaMinor = false,
CAFunctionType  tonicDegree = T,
bool  tonicDegreeMinor = false,
const QString  alterations = "",
bool  ellipseSequence = false 
)

References _chordArea, _chordAreaMinor, _ellipseSequence, _function, _key, _minor, CAMusElement::_musElementType, _tonicDegree, _tonicDegreeMinor, chordArea(), CAMusElement::FunctionMark, key(), setAlterations(), and tonicDegree().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Function Documentation

QList<int> CAFunctionMark::addedDegrees ( ) [inline]

References _addedDegrees.

Referenced by compare(), CADrawableFunctionMarkSupport::draw(), and isEmpty().

Here is the caller graph for this function:

QList<int> CAFunctionMark::alteredDegrees ( ) [inline]

References _alteredDegrees.

Referenced by compare(), CADrawableFunctionMarkSupport::draw(), and isEmpty().

Here is the caller graph for this function:

References setChordArea(), setFunction(), setKey(), setTonicDegree(), T, and Undefined.

Referenced by CAMainWin::deleteSelection().

Here is the call graph for this function:

Here is the caller graph for this function:

CAFunctionMark * CAFunctionMark::clone ( CAContext context = 0) [virtual]
int CAFunctionMark::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 addedDegrees(), alteredDegrees(), chordArea(), function(), CAMusElement::FunctionMark, key(), CAMusElement::musElementType(), and tonicDegree().

Here is the call graph for this function:

References CAMusElement::context().

Here is the call graph for this function:

References _function.

Referenced by compare(), CADrawableFunctionMarkSupport::draw(), CAEngraver::reposit(), and CAMainWin::updateFMToolBar().

Here is the caller graph for this function:

References D, F, I, II, III, IV, K, L, N, S, T, Undefined, V, VI, and VII.

Referenced by CACanorusMLImport::startElement().

Here is the caller graph for this function:

References D, F, I, II, III, IV, K, L, N, S, T, Undefined, V, VI, and VII.

Referenced by CACanorusMLExport::exportDocumentImpl().

Here is the caller graph for this function:

References _chordAreaMinor.

Referenced by clone(), CADrawableFunctionMarkSupport::draw(), and CAMainWin::updateFMToolBar().

Here is the caller graph for this function:

bool CAFunctionMark::isEmpty ( ) [inline]

References addedDegrees(), alteredDegrees(), chordArea(), T, tonicDegree(), and Undefined.

Here is the call graph for this function:

bool CAFunctionMark::isMinor ( ) [inline]

References _minor.

Referenced by clone(), and CAMainWin::updateFMToolBar().

Here is the caller graph for this function:

References _ellipseSequence.

Referenced by clone(), and CAMainWin::updateFMToolBar().

Here is the caller graph for this function:

References _function, I, II, III, IV, V, VI, and VII.

References _key.

Referenced by CAFunctionMark(), clone(), compare(), CAEngraver::reposit(), setKey(), and CAMainWin::updateFMToolBar().

Here is the caller graph for this function:

void CAFunctionMark::setAddedDegrees ( QList< int >  degrees) [inline]

References _addedDegrees.

Referenced by clone().

Here is the caller graph for this function:

void CAFunctionMark::setAlterations ( const QString  alterations)

Reads alterations and sets alteredDegrees and addedDegrees. Sixte ajoutee and other added degrees have +/- sign after the number. Stable alterations have +/- sign before the number. alterations consists first of added degrees and then altered degrees.

References _addedDegrees, and _alteredDegrees.

Referenced by CAFunctionMark().

Here is the caller graph for this function:

void CAFunctionMark::setAlteredDegrees ( QList< int >  degrees) [inline]

References _alteredDegrees.

Referenced by clone().

Here is the caller graph for this function:

void CAFunctionMark::setChordArea ( CAFunctionType  chordArea) [inline]

References _chordArea, and chordArea().

Referenced by clear(), and CAMainWin::on_uiFMChordArea_toggled().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAFunctionMark::setChordAreaMinor ( bool  minor) [inline]

References _chordAreaMinor.

Referenced by CAMainWin::on_uiFMChordArea_toggled().

Here is the caller graph for this function:

void CAFunctionMark::setEllipse ( bool  ellipse) [inline]

References _ellipseSequence.

Referenced by CAMainWin::on_uiFMEllipse_toggled().

Here is the caller graph for this function:

void CAFunctionMark::setFunction ( CAFunctionType  function) [inline]

References _function.

Referenced by clear(), and CAMainWin::on_uiFMFunction_toggled().

Here is the caller graph for this function:

void CAFunctionMark::setKey ( CADiatonicKey  key) [inline]

References _key, and key().

Referenced by clear(), and CAMainWin::on_uiKeySig_activated().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAFunctionMark::setMinor ( bool  minor) [inline]

References _minor.

Referenced by CAMainWin::on_uiFMFunction_toggled().

Here is the caller graph for this function:

void CAFunctionMark::setTonicDegree ( CAFunctionType  tonicDegree) [inline]

References _tonicDegree, and tonicDegree().

Referenced by clear(), and CAMainWin::on_uiFMTonicDegree_toggled().

Here is the call graph for this function:

Here is the caller graph for this function:

void CAFunctionMark::setTonicDegreeMinor ( bool  minor) [inline]

References _tonicDegreeMinor.

Referenced by CAMainWin::on_uiFMTonicDegree_toggled().

Here is the caller graph for this function:


Member Data Documentation

QList<int> CAFunctionMark::_addedDegrees [private]
QList<int> CAFunctionMark::_alteredDegrees [private]

Referenced by CAFunctionMark(), key(), and setKey().

bool CAFunctionMark::_minor [private]

Referenced by CAFunctionMark(), isMinor(), and setMinor().


The documentation for this class was generated from the following files: