#include <sheet.h>

Public Member Functions | |
| CASheet (const QString name, CADocument *doc) | |
| CASheet * | clone (CADocument *doc) |
| CASheet * | clone () |
| CAContext * | contextAt (int i) |
| CAContext * | context (const QString name) |
| QList< CAContext * > | contextList () |
| void | insertContextAfter (CAContext *after, CAContext *c) |
| void | addContext (CAContext *) |
| void | removeContext (CAContext *c) |
| int | contextCount () |
| CAStaff * | addStaff () |
| int | staffCount () |
| CAStaff * | staffAt (int i) |
| QList< CAStaff * > | staffList () |
| QList< CAVoice * > | voiceList () |
| CAVoice * | voiceAt (int i) |
| int | voiceCount () |
| QList< CAPlayable * > | getChord (int time) |
| CADocument * | document () |
| 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 |
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.
Definition at line 21 of file sheet.h.
| CASheet::CASheet | ( | const QString | name, | |
| CADocument * | doc | |||
| ) |
| 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().

| CASheet* CASheet::clone | ( | ) | [inline] |
Definition at line 25 of file sheet.h.
References document().

| CASheet::contextAt | ( | int | i | ) | [inline] |
Return the context with index i counting from 0.
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().

| CASheet::context | ( | const QString | name | ) |
Looks up for the context with the given name.
Definition at line 111 of file sheet.cpp.
References _contextList, and name().
Referenced by CACanorusMLImport::startElement().


| QList<CAContext*> CASheet::contextList | ( | ) | [inline] |
Definition at line 80 of file sheet.cpp.
References _contextList, _staffList, CAContext::contextType(), and CAContext::Staff.
Referenced by CAMainWin::scoreViewPortMousePress(), and CAMainWin::sourceViewPortCommit().

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


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

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

| CAStaff * CASheet::addStaff | ( | ) |
Definition at line 94 of file sheet.cpp.
References _contextList, _staffList, and staffCount().
Referenced by CASettingsDialog::buildPreviewSheet().


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

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

| QList<CAStaff*> CASheet::staffList | ( | ) | [inline] |
| 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().


| CAVoice* CASheet::voiceAt | ( | int | i | ) | [inline] |
Definition at line 41 of file sheet.h.
References voiceList().
Referenced by clone(), and CAUndoCommand::undoDocument().


| int CASheet::voiceCount | ( | ) | [inline] |
Definition at line 42 of file sheet.h.
References voiceList().
Referenced by clone(), and CAUndoCommand::undoDocument().


| 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.
Definition at line 127 of file sheet.cpp.
References _staffList.
Referenced by CAMainWin::insertMusElementAt(), and CAFunctionMarkingContext::repositFunctions().

| CADocument* CASheet::document | ( | ) | [inline] |
Definition at line 46 of file sheet.h.
References _document.
Referenced by clone(), CAPropertiesDialog::contextProperties(), CAPropertiesDialog::sheetProperties(), and CAPropertiesDialog::voiceProperties().

| void CASheet::setDocument | ( | CADocument * | doc | ) | [inline] |
Definition at line 47 of file sheet.h.
References _document.
Referenced by CADocument::addSheet().

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

| 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 | ( | ) |
CASheet::_contextList [private] |
List of all the contexts in the sheet (lyrics, staffs, tablatures, general-bas markings etc.).
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!
Definition at line 56 of file sheet.h.
Referenced by addContext(), addStaff(), getChord(), insertContextAfter(), removeContext(), staffAt(), staffCount(), and staffList().
CADocument* CASheet::_document [private] |
QString CASheet::_name [private] |
1.5.3