Canorus  0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
CAContext Class Referenceabstract

Line of music elements in the sheet. More...

#include <context.h>

Inheritance diagram for CAContext:
Inheritance graph
[legend]

Public Types

enum  CAContextType { Staff, LyricsContext, FunctionMarkContext, FiguredBassContext }
 

Public Member Functions

 CAContext (const QString name, CASheet *s)
 
virtual ~CAContext ()
 
virtual CAContextclone (CASheet *)=0
 
const QString name ()
 
void setName (const QString name)
 
CAContextType contextType ()
 
CASheetsheet ()
 
void setSheet (CASheet *sheet)
 
virtual void clear ()=0
 
virtual CAMusElementnext (CAMusElement *elt)=0
 
virtual CAMusElementprevious (CAMusElement *elt)=0
 
virtual bool remove (CAMusElement *elt)=0
 

Protected Member Functions

void setContextType (CAContextType t)
 

Protected Attributes

CASheet_sheet
 
QString _name
 
CAContextType _contextType
 

Detailed Description

Line of music elements in the sheet.

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.

CAContext represents usually an infinite graphical space on the sheet where music elements are placed in. This idea was introduced by LilyPond and it turned out to be quite useful.

Contexts can be staffs, lyrics, figured bass context, function mark context, dynamics etc.

CAContext is an abstract class and different solutions should be done based on it.

See also
CAStaff, CAFunctionMarkContext

Member Enumeration Documentation

◆ CAContextType

This enum holds different CAContext types:

  • Staff Every context with lines which includes various music elements.
  • Tablature Context similar to Staff, but specialized for guitar.
  • Lyrics Holds words (syllables) for choir music. Every syllable is assigned to certain CANote.
  • Dynamics Sometimes we want to have a separate context for the crescendo, rit., mf and other marks
Enumerator
Staff 
LyricsContext 
FunctionMarkContext 
FiguredBassContext 

Constructor & Destructor Documentation

◆ CAContext()

CAContext::CAContext ( const QString  name,
CASheet s 
)

Creates a context named name and with parent sheet s.

References _name, _sheet, and name().

Here is the call graph for this function:

◆ ~CAContext()

CAContext::~CAContext ( )
virtual

Member Function Documentation

◆ clear()

virtual void CAContext::clear ( )
pure virtual

◆ clone()

CAContext::clone ( CASheet s)
pure virtual

Clones the current context with the given parent sheet s.

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

Implemented in CAStaff, CALyricsContext, CAFunctionMarkContext, and CAFiguredBassContext.

◆ contextType()

CAContextType CAContext::contextType ( )
inline

◆ name()

CAContext::name ( )
inline

◆ next()

virtual CAMusElement* CAContext::next ( CAMusElement elt)
pure virtual

Implemented in CAStaff, CAFunctionMarkContext, CAFiguredBassContext, and CALyricsContext.

Referenced by CAScoreView::selectNextMusElement().

Here is the caller graph for this function:

◆ previous()

virtual CAMusElement* CAContext::previous ( CAMusElement elt)
pure virtual

Implemented in CAStaff, CAFunctionMarkContext, CAFiguredBassContext, and CALyricsContext.

Referenced by CALayoutEngine::reposit(), and CAScoreView::selectPrevMusElement().

Here is the caller graph for this function:

◆ remove()

virtual bool CAContext::remove ( CAMusElement elt)
pure virtual

Implemented in CAStaff, CAFunctionMarkContext, CAFiguredBassContext, and CALyricsContext.

Referenced by CAFiguredBassMark::~CAFiguredBassMark(), and CAMusElement::~CAMusElement().

Here is the caller graph for this function:

◆ setContextType()

void CAContext::setContextType ( CAContextType  t)
inlineprotected

References _contextType.

Referenced by CAFiguredBassContext::CAFiguredBassContext(), and CALyricsContext::CALyricsContext().

Here is the caller graph for this function:

◆ setName()

CAContext::setName ( const QString  name)
inline

Sets the Context's name to name.

See also
name(), _name

References _name, and name().

Referenced by CALyricsContext::cloneLyricsContextProperties(), and CAMainWin::on_uiContextName_returnPressed().

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

◆ setSheet()

CAContext::setSheet ( CASheet sheet)
inline

Sets the context's parent sheet to sheet.

See also
sheet(), _sheet

References _sheet, and sheet().

Referenced by CALyricsContext::cloneLyricsContextProperties().

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

◆ sheet()

CAContext::sheet ( )
inline

Member Data Documentation

◆ _contextType

CAContextType CAContext::_contextType
protected

◆ _name

QString CAContext::_name
protected

◆ _sheet

CASheet* CAContext::_sheet
protected

Referenced by CAContext(), setSheet(), and sheet().


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