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

Public Member Functions | |
| CAFunctionMarkContext (const QString name, CASheet *sheet) | |
| ~CAFunctionMarkContext () | |
| CAFunctionMarkContext * | clone (CASheet *s) |
| int | functionMarkCount (int timeStart=0) |
| CAFunctionMark * | functionMarkAt (int idx) |
| void | addFunctionMark (CAFunctionMark *mark, bool replace=true) |
| void | addEmptyFunction (int timeStart, int timeLength) |
| QList< CAFunctionMark * > | functionMarkList () |
| void | repositFunctions () |
| void | clear () |
| CAMusElement * | next (CAMusElement *elt) |
| CAMusElement * | previous (CAMusElement *elt) |
| bool | remove (CAMusElement *elt) |
Private Attributes | |
| QList< CAFunctionMark * > | _functionMarkList |
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.
\sa CAContext| CAFunctionMarkContext::CAFunctionMarkContext | ( | const QString | name, |
| CASheet * | sheet | ||
| ) |
References CAContext::_contextType, CAContext::FunctionMarkContext, and repositFunctions().
Referenced by clone().


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


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

| void CAFunctionMarkContext::clear | ( | ) | [virtual] |
Implements CAContext.
References _functionMarkList.
Referenced by ~CAFunctionMarkContext().

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

| CAFunctionMark* CAFunctionMarkContext::functionMarkAt | ( | int | idx | ) | [inline] |
References _functionMarkList.
| int CAFunctionMarkContext::functionMarkCount | ( | int | timeStart = 0 | ) |
Returns number of function marks with the given timeStart.
References _functionMarkList.
| QList<CAFunctionMark*> CAFunctionMarkContext::functionMarkList | ( | ) | [inline] |
References _functionMarkList.
Referenced by CACanorusMLExport::exportDocumentImpl().

| CAMusElement * CAFunctionMarkContext::next | ( | CAMusElement * | elt | ) | [virtual] |
Implements CAContext.
References _functionMarkList.
| CAMusElement * CAFunctionMarkContext::previous | ( | CAMusElement * | elt | ) | [virtual] |
Implements CAContext.
References _functionMarkList.
| bool CAFunctionMarkContext::remove | ( | CAMusElement * | elt | ) | [virtual] |
Implements CAContext.
References _functionMarkList.
Referenced by CAMainWin::deleteSelection().

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(), and CAMainWin::deleteSelection().


CAFunctionMarkContext::_functionMarkList [private] |
List of all the function marks sorted by timeStart
Referenced by addFunctionMark(), clear(), clone(), functionMarkAt(), functionMarkCount(), functionMarkList(), next(), previous(), remove(), and repositFunctions().
1.8.0