Canorus 0.0
Public Types | Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
CAFunctionMark Class Reference

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

#include <functionmark.h>

Inheritance diagram for CAFunctionMark:
Inheritance graph
[legend]

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 Types inherited from CAMusElement
enum  CAMusElementType {
  Undefined = 0 , Note , Rest , MidiNote ,
  Barline , Clef , TimeSignature , KeySignature ,
  Slur , Tuplet , Syllable , FunctionMark ,
  FiguredBassMark , Mark
}
 

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)
 
- Public Member Functions inherited from CAMusElement
 CAMusElement (CAContext *context, int timeStart, int timeLength=0)
 
virtual ~CAMusElement ()
 
virtual CAMusElementclone (CAContext *context=0)=0
 
virtual int compare (CAMusElement *elt)=0
 
CAMusElementType musElementType ()
 
CAContextcontext ()
 
void setContext (CAContext *context)
 
virtual int timeStart () const
 
void setTimeStart (int time)
 
virtual int timeLength () const
 
void setTimeLength (int length)
 
int timeEnd ()
 
virtual int realTimeStart ()
 
virtual int realTimeLength ()
 
int realTimeEnd ()
 
const QString name ()
 
void setName (const QString name)
 
const bool isVisible ()
 
void setVisible (const bool v)
 
const QColor color ()
 
void setColor (const QColor c)
 
const QList< CAMark * > markList ()
 
void addMark (CAMark *mark)
 
void addMarks (QList< CAMark * > marks)
 
void removeMark (CAMark *mark)
 
const QList< CANoteCheckerError * > & noteCheckerErrorList ()
 
void addNoteCheckerError (CANoteCheckerError *nce)
 
void removeNoteCheckerError (CANoteCheckerError *nce)
 
bool isPlayable ()
 

Static Public Member Functions

static const QString functionTypeToString (CAFunctionType)
 
static CAFunctionType functionTypeFromString (const QString)
 
- Static Public Member Functions inherited from CAMusElement
static const QString musElementTypeToString (CAMusElementType)
 
static CAMusElementType musElementTypeFromString (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
 

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
 

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
See also
CADrawableFunctionMark, CAFunctionMarkContext

Member Enumeration Documentation

◆ CAFunctionType

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 
II 
III 
IV 
VI 
VII 

Constructor & Destructor Documentation

◆ CAFunctionMark()

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(), function(), 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:

◆ ~CAFunctionMark()

CAFunctionMark::~CAFunctionMark ( )

Member Function Documentation

◆ addedDegrees()

QList< int > CAFunctionMark::addedDegrees ( )
inline

◆ alteredDegrees()

QList< int > CAFunctionMark::alteredDegrees ( )
inline

◆ chordArea()

CAFunctionType CAFunctionMark::chordArea ( )
inline

◆ clear()

void CAFunctionMark::clear ( )

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:

◆ clone()

CAFunctionMark * CAFunctionMark::clone ( CAContext context = 0)
virtual

◆ compare()

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:

◆ fmContext()

CAFunctionMarkContext * CAFunctionMark::fmContext ( )
inline

References CAMusElement::context().

Here is the call graph for this function:

◆ function()

CAFunctionType CAFunctionMark::function ( )
inline

◆ functionTypeFromString()

CAFunctionMark::CAFunctionType CAFunctionMark::functionTypeFromString ( const QString  type)
static

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:

◆ functionTypeToString()

const QString CAFunctionMark::functionTypeToString ( CAFunctionMark::CAFunctionType  type)
static

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:

◆ isChordAreaMinor()

bool CAFunctionMark::isChordAreaMinor ( )
inline

References _chordAreaMinor.

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

Here is the caller graph for this function:

◆ isEmpty()

bool CAFunctionMark::isEmpty ( )
inline

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

Here is the call graph for this function:

◆ isMinor()

bool CAFunctionMark::isMinor ( )
inline

References _minor.

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

Here is the caller graph for this function:

◆ isPartOfEllipse()

bool CAFunctionMark::isPartOfEllipse ( )
inline

References _ellipseSequence.

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

Here is the caller graph for this function:

◆ isSideDegree()

bool CAFunctionMark::isSideDegree ( )

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

◆ isTonicDegreeMinor()

bool CAFunctionMark::isTonicDegreeMinor ( )
inline

◆ key()

CADiatonicKey CAFunctionMark::key ( )
inline

References _key.

Referenced by CAFunctionMark(), clone(), compare(), CALayoutEngine::reposit(), setKey(), CATranspose::transposeByInterval(), and CAMainWin::updateFMToolBar().

Here is the caller graph for this function:

◆ setAddedDegrees()

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

References _addedDegrees.

Referenced by clone().

Here is the caller graph for this function:

◆ setAlterations()

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:

◆ setAlteredDegrees()

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

References _alteredDegrees.

Referenced by clone().

Here is the caller graph for this function:

◆ setChordArea()

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:

◆ setChordAreaMinor()

void CAFunctionMark::setChordAreaMinor ( bool  minor)
inline

References _chordAreaMinor.

Referenced by CAMainWin::on_uiFMChordArea_toggled().

Here is the caller graph for this function:

◆ setEllipse()

void CAFunctionMark::setEllipse ( bool  ellipse)
inline

References _ellipseSequence.

Referenced by CAMainWin::on_uiFMEllipse_toggled().

Here is the caller graph for this function:

◆ setFunction()

void CAFunctionMark::setFunction ( CAFunctionType  function)
inline

References _function, and function().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setKey()

void CAFunctionMark::setKey ( CADiatonicKey  key)
inline

References _key, and key().

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setMinor()

void CAFunctionMark::setMinor ( bool  minor)
inline

References _minor.

Referenced by CAMainWin::on_uiFMFunction_toggled().

Here is the caller graph for this function:

◆ setTonicDegree()

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:

◆ setTonicDegreeMinor()

void CAFunctionMark::setTonicDegreeMinor ( bool  minor)
inline

References _tonicDegreeMinor.

Referenced by CAMainWin::on_uiFMTonicDegree_toggled().

Here is the caller graph for this function:

◆ tonicDegree()

CAFunctionType CAFunctionMark::tonicDegree ( )
inline

Member Data Documentation

◆ _addedDegrees

QList<int> CAFunctionMark::_addedDegrees
private

◆ _alteredDegrees

QList<int> CAFunctionMark::_alteredDegrees
private

◆ _chordArea

CAFunctionType CAFunctionMark::_chordArea
private

◆ _chordAreaMinor

bool CAFunctionMark::_chordAreaMinor
private

◆ _ellipseSequence

bool CAFunctionMark::_ellipseSequence
private

◆ _function

CAFunctionType CAFunctionMark::_function
private

◆ _key

CADiatonicKey CAFunctionMark::_key
private

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

◆ _minor

bool CAFunctionMark::_minor
private

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

◆ _tonicDegree

CAFunctionType CAFunctionMark::_tonicDegree
private

◆ _tonicDegreeMinor

bool CAFunctionMark::_tonicDegreeMinor
private

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