Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes
CAContext Class Reference

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

#include <context.h>

Inheritance diagram for CAContext:
Inheritance graph
[legend]

List of all members.

Public Types

enum  CAContextType { Staff, FunctionMarkContext, LyricsContext }

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.

    \sa CAStaff, CAFunctionMarkContext

Member Enumeration Documentation

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 
FunctionMarkContext 
LyricsContext 

Constructor & Destructor Documentation

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 ( ) [virtual]

Member Function Documentation

virtual void CAContext::clear ( ) [pure virtual]
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, and CAFunctionMarkContext.

Referenced by CASheet::clone().

Here is the caller graph for this function:

CAContext::name ( ) [inline]
virtual CAMusElement* CAContext::next ( CAMusElement elt) [pure virtual]

Implemented in CAStaff, CAFunctionMarkContext, and CALyricsContext.

Referenced by CAScoreViewPort::selectNextMusElement().

Here is the caller graph for this function:

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

Implemented in CAStaff, CAFunctionMarkContext, and CALyricsContext.

Referenced by CAEngraver::reposit(), and CAScoreViewPort::selectPrevMusElement().

Here is the caller graph for this function:

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

Implemented in CAStaff, CAFunctionMarkContext, and CALyricsContext.

Referenced by CAMusElement::~CAMusElement().

Here is the caller graph for this function:

void CAContext::setContextType ( CAContextType  t) [inline, protected]

References _contextType.

Referenced by CALyricsContext::CALyricsContext().

Here is the caller graph for this function:

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:

CAContext::setSheet ( CASheet sheet) [inline]

Sets the context's parent sheet to sheet.

See also:
sheet(), _sheet

References _sheet, and sheet().

Referenced by CASheet::addContext(), and CALyricsContext::cloneLyricsContextProperties().

Here is the call graph for this function:

Here is the caller graph for this function:

CAContext::sheet ( ) [inline]

Member Data Documentation

QString CAContext::_name [protected]
CASheet* CAContext::_sheet [protected]

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


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