CASheet Class Reference

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

#include <sheet.h>

Inheritance diagram for CASheet:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 CASheet (const QString name, CADocument *doc)
CASheetclone (CADocument *doc)
CASheetclone ()
CAContextcontextAt (int i)
CAContextcontext (const QString name)
QList< CAContext * > contextList ()
void insertContextAfter (CAContext *after, CAContext *c)
void addContext (CAContext *)
void removeContext (CAContext *c)
int contextCount ()
CAStaffaddStaff ()
int staffCount ()
CAStaffstaffAt (int i)
QList< CAStaff * > staffList ()
QList< CAVoice * > voiceList ()
CAVoicevoiceAt (int i)
int voiceCount ()
QList< CAPlayable * > getChord (int time)
CADocumentdocument ()
void setDocument (CADocument *doc)
const QString name ()
void setName (const QString name)
void clear ()

Private Attributes

QList< CAContext * > _contextList
QList< CAStaff * > _staffList
CADocument_document
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 markings etc.

See also:
CADocument, CAContext

Definition at line 21 of file sheet.h.


Constructor & Destructor Documentation

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

Creats a new sheet named name with parent document doc.

Definition at line 34 of file sheet.cpp.

References _document, and _name.

Referenced by clone().

Here is the caller graph for this function:


Member Function Documentation

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.

Definition at line 44 of file sheet.cpp.

References addContext(), CASheet(), CAContext::clone(), contextAt(), contextCount(), CAContext::contextType(), CAContext::LyricsContext, name(), CAVoice::removeLyricsContext(), CAContext::Staff, voiceAt(), and voiceCount().

Here is the call graph for this function:

CASheet* CASheet::clone (  )  [inline]

Definition at line 25 of file sheet.h.

References document().

Here is the call graph for this function:

CASheet::contextAt ( int  i  )  [inline]

Return the context with index i counting from 0.

See also:
context(), _contextList

Definition at line 27 of file sheet.h.

References _contextList.

Referenced by CAPropertiesDialog::buildTree(), clone(), CAMusElementFactory::configureNote(), CAPropertiesDialog::createDocumentFromTree(), CAMidiExport::exportDocumentImpl(), CACanorusMLExport::exportDocumentImpl(), CALilyPondExport::exportScoreBlock(), CALilyPondExport::exportSheetImpl(), CAPlayback::initStreams(), CAEngraver::reposit(), and CAUndoCommand::undoDocument().

Here is the caller graph for this function:

CASheet::context ( const QString  name  ) 

Looks up for the context with the given name.

See also:
contextAt(), _contextList

Definition at line 111 of file sheet.cpp.

References _contextList, and name().

Referenced by CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

QList<CAContext*> CASheet::contextList (  )  [inline]

Definition at line 29 of file sheet.h.

References _contextList.

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

Definition at line 80 of file sheet.cpp.

References _contextList, _staffList, CAContext::contextType(), and CAContext::Staff.

Referenced by CAMainWin::scoreViewPortMousePress(), and CAMainWin::sourceViewPortCommit().

Here is the call graph for this function:

void CASheet::addContext ( CAContext c  ) 

Definition at line 74 of file sheet.cpp.

References _contextList, _staffList, CAContext::contextType(), and CAContext::Staff.

Referenced by clone(), CAPropertiesDialog::createDocumentFromTree(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CASheet::removeContext ( CAContext c  )  [inline]

Definition at line 32 of file sheet.h.

References _contextList, and _staffList.

Referenced by CAPropertiesDialog::createDocumentFromTree(), CAMainWin::on_uiRemoveContext_triggered(), and CAMainWin::sourceViewPortCommit().

Here is the caller graph for this function:

int CASheet::contextCount (  )  [inline]

Definition at line 33 of file sheet.h.

References _contextList.

Referenced by CAPropertiesDialog::buildTree(), clone(), CAMusElementFactory::configureNote(), CAPropertiesDialog::createDocumentFromTree(), CAMidiExport::exportDocumentImpl(), CACanorusMLExport::exportDocumentImpl(), CALilyPondExport::exportScoreBlock(), CALilyPondExport::exportSheetImpl(), CAPlayback::initStreams(), CAEngraver::reposit(), CAMainWin::scoreViewPortMousePress(), CACanorusMLImport::startElement(), and CAUndoCommand::undoDocument().

Here is the caller graph for this function:

CAStaff * CASheet::addStaff (  ) 

Definition at line 94 of file sheet.cpp.

References _contextList, _staffList, and staffCount().

Referenced by CASettingsDialog::buildPreviewSheet().

Here is the call graph for this function:

Here is the caller graph for this function:

int CASheet::staffCount (  )  [inline]

Definition at line 36 of file sheet.h.

References _staffList.

Referenced by addStaff(), CACanorusMLImport::endElement(), CAMainWin::scoreViewPortMousePress(), CACanorusMLImport::startElement(), and voiceList().

Here is the caller graph for this function:

CAStaff* CASheet::staffAt ( int  i  )  [inline]

Definition at line 37 of file sheet.h.

References _staffList.

Referenced by CASettingsDialog::buildPreviewSheet(), CACanorusMLImport::endElement(), CASettingsDialog::setupPages(), and voiceList().

Here is the caller graph for this function:

QList<CAStaff*> CASheet::staffList (  )  [inline]

Definition at line 38 of file sheet.h.

References _staffList.

QList< CAVoice * > CASheet::voiceList (  ) 

Returns the list of all the voices in the sheets staffs.

Definition at line 139 of file sheet.cpp.

References staffAt(), staffCount(), and CAStaff::voiceList().

Referenced by CACanorusMLImport::endElement(), CACanorusMLExport::exportDocumentImpl(), CAMidiDevice::freeMidiChannel(), CAMainWin::on_uiAssociatedVoice_activated(), CAMainWin::scoreViewPortMousePress(), CAMainWin::updateContextToolBar(), voiceAt(), and voiceCount().

Here is the call graph for this function:

Here is the caller graph for this function:

CAVoice* CASheet::voiceAt ( int  i  )  [inline]

Definition at line 41 of file sheet.h.

References voiceList().

Referenced by clone(), and CAUndoCommand::undoDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

int CASheet::voiceCount (  )  [inline]

Definition at line 42 of file sheet.h.

References voiceList().

Referenced by clone(), and CAUndoCommand::undoDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

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

Definition at line 127 of file sheet.cpp.

References _staffList.

Referenced by CAMainWin::insertMusElementAt(), and CAFunctionMarkingContext::repositFunctions().

Here is the caller graph for this function:

CADocument* CASheet::document (  )  [inline]

Definition at line 46 of file sheet.h.

References _document.

Referenced by clone(), CAPropertiesDialog::contextProperties(), CAPropertiesDialog::sheetProperties(), and CAPropertiesDialog::voiceProperties().

Here is the caller graph for this function:

void CASheet::setDocument ( CADocument doc  )  [inline]

Definition at line 47 of file sheet.h.

References _document.

Referenced by CADocument::addSheet().

Here is the caller graph for this function:

const QString CASheet::name (  )  [inline]

Definition at line 49 of file sheet.h.

References _name.

Referenced by CAMainWin::addSheet(), CAPropertiesDialog::buildTree(), clone(), context(), CACanorusMLExport::exportDocumentImpl(), CAMainWin::on_uiSheetName_returnPressed(), and CAMainWin::updateSheetToolBar().

Here is the caller graph for this function:

void CASheet::setName ( const QString  name  )  [inline]

Definition at line 50 of file sheet.h.

References _name.

Referenced by CAMainWin::on_uiSheetName_returnPressed().

void CASheet::clear (  ) 

Definition at line 102 of file sheet.cpp.

References _contextList.


Member Data Documentation

CASheet::_contextList [private]

List of all the contexts in the sheet (lyrics, staffs, tablatures, general-bas markings etc.).

See also:
context(), contextAt(), contextCount(), _staffList

Definition at line 55 of file sheet.h.

Referenced by addContext(), addStaff(), clear(), context(), contextAt(), contextCount(), contextList(), insertContextAfter(), and removeContext().

CASheet::_staffList [private]

List of all the staffs in the sheet. Staff lookups are usually much more often than other contexts.

All the staffs are contexts and are part of _contextList as well!

See also:
addStaff(), staffCount(), staffAt(), _contextList

Definition at line 56 of file sheet.h.

Referenced by addContext(), addStaff(), getChord(), insertContextAfter(), removeContext(), staffAt(), staffCount(), and staffList().

CADocument* CASheet::_document [private]

Definition at line 57 of file sheet.h.

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

QString CASheet::_name [private]

Definition at line 59 of file sheet.h.

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


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