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

Context for function marks. More...

#include <functionmarkcontext.h>

Inheritance diagram for CAFunctionMarkContext:
Inheritance graph
[legend]

Public Member Functions

 CAFunctionMarkContext (const QString name, CASheet *sheet)
 
 ~CAFunctionMarkContext ()
 
CAFunctionMarkContextclone (CASheet *s)
 
const QList< CAFunctionMark * > & functionMarkList ()
 
QList< CAFunctionMark * > functionMarkAt (int timeStart)
 
void addFunctionMark (CAFunctionMark *mark, bool replace=true)
 
void addEmptyFunction (int timeStart, int timeLength)
 
void repositFunctions ()
 
void clear ()
 
CAMusElementnext (CAMusElement *elt)
 
CAMusElementprevious (CAMusElement *elt)
 
bool remove (CAMusElement *elt)
 
- 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< CAFunctionMark * > _functionMarkList
 

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 function marks.

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.

This class represents a context which holds various function marks. As CAStaff is a parent context for CANote, CARest and other staff elements, CAFunctionMarkContext is a parent context for CAFunctionMark.

See also
CAContext

Constructor & Destructor Documentation

◆ CAFunctionMarkContext()

CAFunctionMarkContext::CAFunctionMarkContext ( const QString  name,
CASheet sheet 
)

References CAContext::_contextType, CAContext::FunctionMarkContext, and repositFunctions().

Referenced by clone().

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

◆ ~CAFunctionMarkContext()

CAFunctionMarkContext::~CAFunctionMarkContext ( )

References clear().

Here is the call graph for this function:

Member Function Documentation

◆ addEmptyFunction()

void CAFunctionMarkContext::addEmptyFunction ( int  timeStart,
int  timeLength 
)

Adds an undefined function mark (uses for empty function marks when only function mark context exists and no actual functions added).

References addFunctionMark(), and CAFunctionMark::Undefined.

Referenced by CAMainWin::pasteAt(), and repositFunctions().

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

◆ addFunctionMark()

void CAFunctionMarkContext::addFunctionMark ( CAFunctionMark function,
bool  replace = true 
)

Adds an already created function mark to this context.

References _functionMarkList.

Referenced by addEmptyFunction(), clone(), and CAMusElementFactory::configureFunctionMark().

Here is the caller graph for this function:

◆ clear()

void CAFunctionMarkContext::clear ( )
virtual

Implements CAContext.

References _functionMarkList.

Referenced by ~CAFunctionMarkContext().

Here is the caller graph for this function:

◆ clone()

CAFunctionMarkContext * CAFunctionMarkContext::clone ( CASheet s)
virtual

Clones the current context with the given parent sheet s.

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

Implements CAContext.

References _functionMarkList, addFunctionMark(), CAFunctionMarkContext(), and CAContext::name().

Here is the call graph for this function:

◆ functionMarkAt()

QList< CAFunctionMark * > CAFunctionMarkContext::functionMarkAt ( int  timeStart)

Returns the function marks at the exact given timeStart. This function is usually called to determine the number of possible modulations of the same chord at the given time.

References _functionMarkList.

◆ functionMarkList()

const QList<CAFunctionMark*>& CAFunctionMarkContext::functionMarkList ( )
inline

References _functionMarkList.

Referenced by CACanorusMLExport::exportDocumentImpl().

Here is the caller graph for this function:

◆ next()

CAMusElement * CAFunctionMarkContext::next ( CAMusElement elt)
virtual

Implements CAContext.

References _functionMarkList.

◆ previous()

CAMusElement * CAFunctionMarkContext::previous ( CAMusElement elt)
virtual

Implements CAContext.

References _functionMarkList.

◆ remove()

bool CAFunctionMarkContext::remove ( CAMusElement elt)
virtual

Implements CAContext.

References _functionMarkList.

Referenced by CAMainWin::deleteSelection().

Here is the caller graph for this function:

◆ repositFunctions()

void CAFunctionMarkContext::repositFunctions ( )

This method is similar to CALyircsContext::repositFunctions(). It repositions the functions (sets timeStart and timeLength) one by one according to the chords above the context.

If two functions contain the same timeStart, they are treated as modulation and will contain the same timeStart after reposition is done as well!

References _functionMarkList, addEmptyFunction(), CASheet::getChord(), and CAContext::sheet().

Referenced by CAFunctionMarkContext(), CAMainWin::deleteSelection(), and CAMainWin::pasteAt().

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

Member Data Documentation

◆ _functionMarkList

CAFunctionMarkContext::_functionMarkList
private

List of all the function marks sorted by timeStart

Referenced by addFunctionMark(), clear(), clone(), functionMarkAt(), functionMarkList(), next(), previous(), remove(), and repositFunctions().


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