Canorus  0.0
Public Member Functions | Private Attributes | List of all members
CAFiguredBassContext Class Reference

Context for keeping the figured bass marks. More...

#include <figuredbasscontext.h>

Inheritance diagram for CAFiguredBassContext:
Inheritance graph
[legend]

Public Member Functions

 CAFiguredBassContext (QString name, CASheet *sheet)
 
 ~CAFiguredBassContext ()
 
CAContextclone (CASheet *)
 
void clear ()
 
CAMusElementnext (CAMusElement *elt)
 
CAMusElementprevious (CAMusElement *elt)
 
bool remove (CAMusElement *elt)
 
QList< CAFiguredBassMark * > & figuredBassMarkList ()
 
CAFiguredBassMarkfiguredBassMarkAtTimeStart (int timeStart)
 
void repositFiguredBassMarks ()
 
void addFiguredBassMark (CAFiguredBassMark *, bool replace=true)
 
void addEmptyFiguredBassMark (int timeStart, int timeLength)
 
- Public Member Functions inherited from CAContext
 CAContext (const QString name, CASheet *s)
 
virtual ~CAContext ()
 
const QString name ()
 
void setName (const QString name)
 
CAContextType contextType ()
 
CASheetsheet ()
 
void setSheet (CASheet *sheet)
 

Private Attributes

QList< CAFiguredBassMark * > _figuredBassMarkList
 

Additional Inherited Members

- Public Types inherited from CAContext
enum  CAContextType { Staff, LyricsContext, FunctionMarkContext, FiguredBassContext }
 
- Protected Member Functions inherited from CAContext
void setContextType (CAContextType t)
 
- Protected Attributes inherited from CAContext
CASheet_sheet
 
QString _name
 
CAContextType _contextType
 

Detailed Description

Context for keeping the figured bass marks.

Copyright (c) 2009, 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 represents a container for the figured bass (or general bass) marks. It is somehow similar to CALyricsContext in terms of use. The class keeps all figured bass marks in a single list. No specific times are stored. This is because exactly one figured bass mark is assigned to every chord.

Constructor & Destructor Documentation

◆ CAFiguredBassContext()

CAFiguredBassContext::CAFiguredBassContext ( QString  name,
CASheet sheet 
)

References CAContext::FiguredBassContext, repositFiguredBassMarks(), and CAContext::setContextType().

Referenced by clone().

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

◆ ~CAFiguredBassContext()

CAFiguredBassContext::~CAFiguredBassContext ( )

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ addEmptyFiguredBassMark()

void CAFiguredBassContext::addEmptyFiguredBassMark ( int  timeStart,
int  timeLength 
)

Inserts an empty figured bass mark and shifts the marks after. This function is usually called when initializing the context.

References _figuredBassMarkList.

Referenced by repositFiguredBassMarks().

Here is the caller graph for this function:

◆ addFiguredBassMark()

void CAFiguredBassContext::addFiguredBassMark ( CAFiguredBassMark m,
bool  replace = true 
)

Inserts the given figured bass mark m according to its timeStart. Replaces any existing figured bass marks at that time, if replace is True (default).

References _figuredBassMarkList, CAMusElement::timeLength(), and CAMusElement::timeStart().

Referenced by clone().

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

◆ clear()

void CAFiguredBassContext::clear ( )
virtual

Implements CAContext.

References _figuredBassMarkList.

Referenced by ~CAFiguredBassContext().

Here is the caller graph for this function:

◆ clone()

CAContext * CAFiguredBassContext::clone ( CASheet s)
virtual

Clones the current context with the given parent sheet s.

See also
CAMusElement::clone(), CADocument::clone()

Implements CAContext.

References _figuredBassMarkList, addFiguredBassMark(), CAFiguredBassContext(), and CAContext::name().

Here is the call graph for this function:

◆ figuredBassMarkAtTimeStart()

CAFiguredBassMark * CAFiguredBassContext::figuredBassMarkAtTimeStart ( int  time)

Returns figured bass mark at the given time.

References _figuredBassMarkList.

Referenced by CAMainWin::insertMusElementAt().

Here is the caller graph for this function:

◆ figuredBassMarkList()

QList<CAFiguredBassMark*>& CAFiguredBassContext::figuredBassMarkList ( )
inline

References _figuredBassMarkList.

Referenced by CACanorusMLExport::exportFiguredBass().

Here is the caller graph for this function:

◆ next()

CAMusElement * CAFiguredBassContext::next ( CAMusElement elt)
virtual

Implements CAContext.

References _figuredBassMarkList, CAMusElement::FiguredBassMark, and CAMusElement::musElementType().

Here is the call graph for this function:

◆ previous()

CAMusElement * CAFiguredBassContext::previous ( CAMusElement elt)
virtual

Implements CAContext.

References _figuredBassMarkList, CAMusElement::FiguredBassMark, and CAMusElement::musElementType().

Here is the call graph for this function:

◆ remove()

bool CAFiguredBassContext::remove ( CAMusElement elt)
virtual

Implements CAContext.

References _figuredBassMarkList, CAMusElement::FiguredBassMark, and CAMusElement::musElementType().

Referenced by CAMainWin::deleteSelection().

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

◆ repositFiguredBassMarks()

void CAFiguredBassContext::repositFiguredBassMarks ( )

Updates timeStarts and timeLength of all figured bass marks according to the chords they belong. Adds new empty figured bass marks at the end, if needed.

References _figuredBassMarkList, addEmptyFiguredBassMark(), CASheet::getChord(), CAMusElement::Note, CAPlayableLength::Quarter, CAMusElement::setTimeLength(), CAMusElement::setTimeStart(), and CAContext::sheet().

Referenced by CAFiguredBassContext(), and CAMainWin::deleteSelection().

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

Member Data Documentation

◆ _figuredBassMarkList

QList<CAFiguredBassMark*> CAFiguredBassContext::_figuredBassMarkList
private

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