CAFunctionMarkingContext Class Reference

Context for function markings. More...

#include <functionmarkingcontext.h>

Inheritance diagram for CAFunctionMarkingContext:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CAFunctionMarkingContext (const QString name, CASheet *sheet)
 ~CAFunctionMarkingContext ()
CAFunctionMarkingContextclone (CASheet *s)
int functionMarkingCount (int timeStart=0)
CAFunctionMarkingfunctionMarkingAt (int idx)
void addFunctionMarking (CAFunctionMarking *marking, bool replace=true)
void addEmptyFunction (int timeStart, int timeLength)
QList
< CAFunctionMarking * > 
functionMarkingList ()
void repositFunctions ()
void clear ()
CAMusElementnext (CAMusElement *elt)
CAMusElementprevious (CAMusElement *elt)
bool remove (CAMusElement *elt)

Private Attributes

QList
< CAFunctionMarking * > 
_functionMarkingList


Detailed Description

Context for function markings.

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 markings. As CAStaff is a parent context for CANote, CARest and other staff elements, CAFunctionMarkingContext is a parent context for CAFunctionMarking.

See also:
CAContext

Definition at line 19 of file functionmarkingcontext.h.


Constructor & Destructor Documentation

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

Definition at line 24 of file functionmarkingcontext.cpp.

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

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CAFunctionMarkingContext::~CAFunctionMarkingContext (  ) 

Definition at line 31 of file functionmarkingcontext.cpp.

References clear().

Here is the call graph for this function:


Member Function Documentation

CAFunctionMarkingContext * CAFunctionMarkingContext::clone ( CASheet s  )  [virtual]

Clones the current context with the given parent sheet s.

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

Implements CAContext.

Definition at line 35 of file functionmarkingcontext.cpp.

References _functionMarkingList, addFunctionMarking(), CAFunctionMarkingContext(), CAContext::name(), and CAMusElement::setContext().

Here is the call graph for this function:

int CAFunctionMarkingContext::functionMarkingCount ( int  timeStart = 0  ) 

Returns number of function markings with the given timeStart.

Definition at line 138 of file functionmarkingcontext.cpp.

References _functionMarkingList.

CAFunctionMarking* CAFunctionMarkingContext::functionMarkingAt ( int  idx  )  [inline]

Definition at line 26 of file functionmarkingcontext.h.

References _functionMarkingList.

void CAFunctionMarkingContext::addFunctionMarking ( CAFunctionMarking function,
bool  replace = true 
)

Adds an already created function marking to this context.

Definition at line 57 of file functionmarkingcontext.cpp.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

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

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

Definition at line 131 of file functionmarkingcontext.cpp.

References addFunctionMarking(), and CAFunctionMarking::Undefined.

Referenced by repositFunctions().

Here is the call graph for this function:

Here is the caller graph for this function:

QList<CAFunctionMarking*> CAFunctionMarkingContext::functionMarkingList (  )  [inline]

Definition at line 29 of file functionmarkingcontext.h.

References _functionMarkingList.

Referenced by CACanorusMLExport::exportDocumentImpl().

Here is the caller graph for this function:

void CAFunctionMarkingContext::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!

Definition at line 104 of file functionmarkingcontext.cpp.

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

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CAFunctionMarkingContext::clear (  )  [virtual]

Implements CAContext.

Definition at line 47 of file functionmarkingcontext.cpp.

References _functionMarkingList.

Referenced by ~CAFunctionMarkingContext().

Here is the caller graph for this function:

CAMusElement * CAFunctionMarkingContext::next ( CAMusElement elt  )  [virtual]

Implements CAContext.

Definition at line 70 of file functionmarkingcontext.cpp.

References _functionMarkingList.

CAMusElement * CAFunctionMarkingContext::previous ( CAMusElement elt  )  [virtual]

Implements CAContext.

Definition at line 81 of file functionmarkingcontext.cpp.

References _functionMarkingList.

bool CAFunctionMarkingContext::remove ( CAMusElement elt  )  [virtual]

Implements CAContext.

Definition at line 92 of file functionmarkingcontext.cpp.

References _functionMarkingList.


Member Data Documentation

CAFunctionMarkingContext::_functionMarkingList [private]

List of all the function markings sorted by timeStart

Definition at line 38 of file functionmarkingcontext.h.

Referenced by addFunctionMarking(), clear(), clone(), functionMarkingAt(), functionMarkingCount(), functionMarkingList(), next(), previous(), remove(), and repositFunctions().


The documentation for this class was generated from the following files:
Generated on Sat Feb 9 13:14:29 2008 for Canorus by  doxygen 1.5.3