|
Canorus 0.0
|
Context for function marks. More...
#include <functionmarkcontext.h>

Public Member Functions | |
| CAFunctionMarkContext (const QString name, CASheet *sheet) | |
| ~CAFunctionMarkContext () | |
| CAFunctionMarkContext * | clone (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 () |
| CAMusElement * | next (CAMusElement *elt) |
| CAMusElement * | previous (CAMusElement *elt) |
| bool | remove (CAMusElement *elt) |
Public Member Functions inherited from CAContext | |
| CAContext (const QString name, CASheet *s) | |
| virtual | ~CAContext () |
| virtual CAContext * | clone (CASheet *)=0 |
| const QString | name () |
| void | setName (const QString name) |
| CAContextType | contextType () |
| CASheet * | sheet () |
| void | setSheet (CASheet *sheet) |
| virtual void | clear ()=0 |
| virtual CAMusElement * | next (CAMusElement *elt)=0 |
| virtual CAMusElement * | previous (CAMusElement *elt)=0 |
| virtual bool | remove (CAMusElement *elt)=0 |
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 |
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.
References CAContext::_contextType, CAContext::FunctionMarkContext, and repositFunctions().
Referenced by clone().


| CAFunctionMarkContext::~CAFunctionMarkContext | ( | ) |
| 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().


| void CAFunctionMarkContext::addFunctionMark | ( | CAFunctionMark * | function, |
| bool | replace = true |
||
| ) |
Adds an already created function mark to this context.
References _functionMarkList, CAMusElement::timeLength(), and CAMusElement::timeStart().
Referenced by addEmptyFunction(), clone(), and CAMusElementFactory::configureFunctionMark().


|
virtual |
Implements CAContext.
References _functionMarkList.
Referenced by ~CAFunctionMarkContext().

|
virtual |
Clones the current context with the given parent sheet s.
Implements CAContext.
References _functionMarkList, addFunctionMark(), CAFunctionMarkContext(), and CAContext::name().

| 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.
|
inline |
References _functionMarkList.
Referenced by CACanorusMLExport::exportDocumentImpl(), and CALayoutEngine::reposit().

|
virtual |
Implements CAContext.
References _functionMarkList.
|
virtual |
Implements CAContext.
References _functionMarkList.
|
virtual |
Implements CAContext.
References _functionMarkList.
Referenced by CAMainWin::deleteSelection().

| 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().


|
private |
List of all the function marks sorted by timeStart
Referenced by addFunctionMark(), clear(), clone(), functionMarkAt(), functionMarkList(), next(), previous(), remove(), and repositFunctions().