Canorus 0.0
Public Member Functions | Private Attributes | List of all members
CASheet Class Reference

Represents a single sheet of paper in the document. More...

#include <sheet.h>

Public Member Functions

 CASheet (const QString name, CADocument *doc)
 
 ~CASheet ()
 
CASheetclone (CADocument *doc)
 
CASheetclone ()
 
const QList< CAContext * > & contextList ()
 
CAContextfindContext (const QString name)
 
void insertContext (int pos, CAContext *c)
 
void insertContextAfter (CAContext *after, CAContext *c)
 
void addContext (CAContext *c)
 
void removeContext (CAContext *c)
 
CAStaffaddStaff ()
 
QList< CAStaff * > staffList ()
 
QList< CAVoice * > voiceList ()
 
QList< CAPlayable * > getChord (int time)
 
CATempogetTempo (int time)
 
CADocumentdocument ()
 
void setDocument (CADocument *doc)
 
const QString name ()
 
void setName (const QString name)
 
void addNoteCheckerError (CANoteCheckerError *nce)
 
void clearNoteCheckerErrors ()
 
QList< CANoteCheckerError * > & noteCheckerErrorList ()
 
void clear ()
 

Private Attributes

QList< CAContext * > _contextList
 
CADocument_document
 
QList< CANoteCheckerError * > _noteCheckerErrorList
 
QString _name
 

Detailed Description

Represents a single sheet of paper in the document.

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.

CASheet represents a sheet of paper for the composer. The idea was taken out from spreadsheet applications. Each sheet is usually in its own tab.

CASheet parent is CADocument and CASheet includes various contexts CAContext, let it be staffs, lyrics, function marks etc.

See also
CADocument, CAContext

Constructor & Destructor Documentation

◆ CASheet()

CASheet::CASheet ( const QString  name,
CADocument doc 
)

Creats a new sheet named name with parent document doc.

References _document, _name, and name().

Referenced by clone().

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

◆ ~CASheet()

CASheet::~CASheet ( )

Member Function Documentation

◆ addContext()

void CASheet::addContext ( CAContext c)
inline

◆ addNoteCheckerError()

void CASheet::addNoteCheckerError ( CANoteCheckerError nce)
inline

References _noteCheckerErrorList.

Referenced by CANoteChecker::checkSheet().

Here is the caller graph for this function:

◆ addStaff()

CAStaff * CASheet::addStaff ( )

Appends a new staff to the sheet with one empty voice.

References _contextList, CAStaff::addVoice(), and staffList().

Referenced by CASettingsDialog::buildPreviewSheet(), and CAMainWin::newDocument().

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

◆ clear()

void CASheet::clear ( )

References _contextList.

◆ clearNoteCheckerErrors()

void CASheet::clearNoteCheckerErrors ( )

Removes any note checker errors in the current sheet. This function is usually called when changing the score and before re-running the note checker.

References _noteCheckerErrorList.

Referenced by CANoteChecker::checkSheet().

Here is the caller graph for this function:

◆ clone() [1/2]

CASheet * CASheet::clone ( )
inline

References clone(), and document().

Referenced by clone().

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

◆ clone() [2/2]

CASheet * CASheet::clone ( CADocument doc)

Clones the current sheet with all its content. If a new parent document doc is given, it also sets the document.

References addContext(), CASheet(), contextList(), CAContext::contextType(), CAContext::LyricsContext, name(), CAVoice::removeLyricsContext(), CAContext::Staff, and voiceList().

Here is the call graph for this function:

◆ contextList()

const QList< CAContext * > & CASheet::contextList ( )
inline

◆ document()

CADocument * CASheet::document ( )
inline

◆ findContext()

CAContext * CASheet::findContext ( const QString  name)

Returns the first context with the given name.

References _contextList, and name().

Here is the call graph for this function:

◆ getChord()

QList< CAPlayable * > CASheet::getChord ( int  time)

Returns a list of notes and rests (chord) for all the voices in all the staffs in the given time slice time.

This is useful for determination of the harmony at certain point in time.

See also
CAStaff:getChord(), CAVoice::getChord()

References staffList().

Referenced by CAMainWin::insertMusElementAt(), CAFiguredBassContext::repositFiguredBassMarks(), and CAFunctionMarkContext::repositFunctions().

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

◆ getTempo()

CATempo * CASheet::getTempo ( int  time)

Returns the Tempo element active at the given time.

References staffList(), and CAMusElement::timeStart().

Referenced by CAPlayback::initStreams().

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

◆ insertContext()

void CASheet::insertContext ( int  pos,
CAContext c 
)
inline

References _contextList.

◆ insertContextAfter()

void CASheet::insertContextAfter ( CAContext after,
CAContext c 
)

Inserts the given context c after the context after.

References _contextList.

Referenced by CAMainWin::pasteAt(), CAMainWin::scoreViewMousePress(), and CAMainWin::sourceViewCommit().

Here is the caller graph for this function:

◆ name()

const QString CASheet::name ( )
inline

References _name.

Referenced by CAMainWin::addSheet(), CASheet(), clone(), findContext(), setName(), and CAMainWin::updateSheetToolBar().

Here is the caller graph for this function:

◆ noteCheckerErrorList()

QList< CANoteCheckerError * > & CASheet::noteCheckerErrorList ( )
inline

References _noteCheckerErrorList.

Referenced by CANoteCheckerError::~CANoteCheckerError().

Here is the caller graph for this function:

◆ removeContext()

void CASheet::removeContext ( CAContext c)
inline

◆ setDocument()

void CASheet::setDocument ( CADocument doc)
inline

References _document.

Referenced by CADocument::clone().

Here is the caller graph for this function:

◆ setName()

void CASheet::setName ( const QString  name)
inline

References _name, and name().

Referenced by CALilyPondImport::importSheetImpl(), CAMidiImport::importSheetImpl(), and CAMainWin::on_uiSheetName_returnPressed().

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

◆ staffList()

QList< CAStaff * > CASheet::staffList ( )

◆ voiceList()

QList< CAVoice * > CASheet::voiceList ( )

Member Data Documentation

◆ _contextList

QList<CAContext *> CASheet::_contextList
private

◆ _document

CADocument* CASheet::_document
private

Referenced by CASheet(), document(), and setDocument().

◆ _name

QString CASheet::_name
private

Referenced by CASheet(), name(), and setName().

◆ _noteCheckerErrorList

QList<CANoteCheckerError*> CASheet::_noteCheckerErrorList
private

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