Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 ()
 
CAContextcontextAt (int i)
 
CAContextcontext (const QString name)
 
QList< CAContext * > & contextList ()
 
int contextIndex (CAContext *context)
 
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
 
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 marks etc.

See Also
CADocument, CAContext

Constructor & Destructor Documentation

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

Member Function Documentation

void CASheet::addContext ( CAContext c)
CAStaff * CASheet::addStaff ( )

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

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

Referenced by CASettingsDialog::buildPreviewSheet().

Here is the call graph for this function:

Here is the caller graph for this function:

void CASheet::clear ( )

References _contextList.

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

References clone(), and document().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CASheet::context ( const QString  name)

Returns the first context with the given name.

Looks up for the context with the given name.

See Also
contextAt(), _contextList

References _contextList, and name().

Here is the call graph for this function:

CASheet::contextAt ( int  i)
inline
int CASheet::contextCount ( )
inline
int CASheet::contextIndex ( CAContext context)
inline

References _contextList.

Referenced by CAMainWin::pasteAt().

Here is the caller graph for this function:

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

References _contextList.

Referenced by CATranspose::addSheet(), CATranspose::CATranspose(), CAMainWin::copySelection(), and CAMainWin::pasteAt().

Here is the caller graph for this function:

CADocument* CASheet::document ( )
inline
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 CAStaff::getChord(), staffAt(), and staffCount().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CASheet::insertContextAfter ( CAContext after,
CAContext c 
)
const QString CASheet::name ( )
inline
void CASheet::removeContext ( CAContext c)
inline
void CASheet::setDocument ( CADocument doc)
inline

References _document.

Referenced by CADocument::addSheet().

Here is the caller graph for this function:

void CASheet::setName ( const QString  name)
inline

References _name, and name().

Referenced by CAMainWin::on_uiSheetName_returnPressed().

Here is the call graph for this function:

Here is the caller graph for this function:

CAStaff * CASheet::staffAt ( int  i)
int CASheet::staffCount ( )
QList< CAStaff * > CASheet::staffList ( )

References _contextList, and CAContext::Staff.

Referenced by CATransposeView::show(), and CAMidiImport::writeMidiFileEventsToScore().

Here is the caller graph for this function:

CAVoice* CASheet::voiceAt ( int  i)
inline

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

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< CAVoice * > CASheet::voiceList ( )

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

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:

Member Data Documentation

CASheet::_contextList
private

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

See Also
context(), contextAt(), contextCount(), _staffList

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

CADocument* CASheet::_document
private

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

QString CASheet::_name
private

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


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