Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Attributes
CADocument Class Reference

Class which represents the current document. More...

#include <document.h>

List of all members.

Public Member Functions

 CADocument ()
virtual ~CADocument ()
CADocumentclone ()
void clear ()
QList< CASheet * > sheetList ()
int sheetCount ()
CASheetsheet (const QString name)
CASheetsheetAt (int i)
void setSheetAt (int i, CASheet *newSheet)
QList< CAResource * > & resourceList ()
void addResource (CAResource *r)
void removeResource (CAResource *r)
CASheetaddSheetByName (const QString name)
void addSheet (CASheet *sheet)
CASheetaddSheet ()
void removeSheet (CASheet *sheet)
const QString title ()
const QString subtitle ()
const QString composer ()
const QString arranger ()
const QString poet ()
const QString textTranslator ()
const QString dedication ()
const QString copyright ()
const QDateTime dateCreated ()
const QDateTime dateLastModified ()
const unsigned int timeEdited ()
const QString comments ()
void setTitle (const QString title)
void setSubtitle (const QString subtitle)
void setComposer (const QString composer)
void setArranger (const QString arranger)
void setPoet (const QString poet)
void setTextTranslator (const QString textTranslator)
void setDedication (const QString dedication)
void setCopyright (const QString copyright)
void setDateCreated (const QDateTime dateCreated)
void setDateLastModified (const QDateTime dateLastModified)
void setTimeEdited (const unsigned int timeEdited)
void setComments (const QString comments)
const QString fileName ()
bool isModified ()
CAArchivearchive ()
void setFileName (const QString fileName)
void setModified (bool m)
void setArchive (CAArchive *a)

Private Attributes

QList< CASheet * > _sheetList
QList< CAResource * > _resourceList
QString _title
QString _subtitle
QString _composer
QString _arranger
QString _poet
QString _textTranslator
QString _dedication
QString _copyright
QDateTime _dateLastModified
QDateTime _dateCreated
unsigned int _timeEdited
QString _comments
QString _fileName
bool _modified
CAArchive_archive

Detailed Description

Class which represents the current 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.

    CADocument is a top-most class in score hierarchy and represents the
    document in the current main window.
    Document consists of multiple sheets.

    \sa CASheet

Constructor & Destructor Documentation

Creates an empty document.

See also:
addSheet()

References setArchive(), setDateCreated(), setDateLastModified(), setModified(), and setTimeEdited().

Referenced by clone().

Here is the call graph for this function:

Here is the caller graph for this function:

CADocument::~CADocument ( ) [virtual]

Clears and destroys the document.

See also:
clear()

References archive(), and clear().

Here is the call graph for this function:


Member Function Documentation

void CADocument::addResource ( CAResource r) [inline]

References _resourceList.

Referenced by clone(), CAResourceCtl::createEmptyResource(), and CAResourceCtl::importResource().

Here is the caller graph for this function:

void CADocument::addSheet ( CASheet sheet)

Adds an already created sheet to the document. Sheet's owner document is set to this document.

See also:
addSheet(const QString name)

References _sheetList, and CASheet::setDocument().

Referenced by clone(), CAPropertiesDialog::createDocumentFromTree(), CAMidiImport::importDocumentImpl(), CAMainWin::on_uiNewSheet_triggered(), CAMusicXmlImport::readPartList(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

Adds and empty sheet to the document.

References sheetCount().

Here is the call graph for this function:

Creates a new sheet with the given name and adds it to the sheets list.

See also:
addSheet(CASheet *sheet), sheet(), sheetAt(), _sheetList

References _sheetList.

References _archive.

Referenced by CACanExport::exportDocumentImpl(), CACanImport::importDocumentImpl(), and ~CADocument().

Here is the caller graph for this function:

const QString CADocument::arranger ( ) [inline]

References _arranger.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), setArranger(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

Clears the document of any sheets and destroys them.

References _arranger, _comments, _composer, _copyright, _dateCreated, _dateLastModified, _poet, _resourceList, _sheetList, _subtitle, _timeEdited, _title, and CAResourceCtl::deleteResource().

Referenced by ~CADocument().

Here is the call graph for this function:

Here is the caller graph for this function:

Clones this document and all its sheets and returns a pointer to its clone.

References addResource(), addSheet(), arranger(), CADocument(), comments(), composer(), copyright(), dateCreated(), dateLastModified(), fileName(), poet(), resourceList(), setArranger(), setComments(), setComposer(), setCopyright(), setDateCreated(), setDateLastModified(), setFileName(), setPoet(), setSubtitle(), setTimeEdited(), setTitle(), sheetAt(), sheetCount(), subtitle(), timeEdited(), and title().

Referenced by CAUndoCommand::CAUndoCommand().

Here is the call graph for this function:

Here is the caller graph for this function:

const QString CADocument::comments ( ) [inline]

References _comments.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), setComments(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

const QString CADocument::composer ( ) [inline]

References _composer.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), setComposer(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

const QString CADocument::copyright ( ) [inline]

References _copyright.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), setCopyright(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

const QDateTime CADocument::dateCreated ( ) [inline]
const QDateTime CADocument::dateLastModified ( ) [inline]

References _dateLastModified.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), CAAutoRecovery::openRecovery(), and setDateLastModified().

Here is the caller graph for this function:

const QString CADocument::dedication ( ) [inline]

References _dedication.

Referenced by CACanorusMLExport::exportDocumentImpl(), setDedication(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

CADocument::fileName ( ) [inline]

Returns the absolute path of the file the document has been saved to or empty string if document hasn't been saved yet. Document's file name property is not saved to a file.

See also:
setFileName()

References _fileName.

Referenced by clone(), CAMainWin::openDocument(), and setFileName().

Here is the caller graph for this function:

bool CADocument::isModified ( ) [inline]

References _modified.

const QString CADocument::poet ( ) [inline]

References _poet.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), setPoet(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

void CADocument::removeResource ( CAResource r) [inline]

References _resourceList.

Referenced by CAResourceCtl::deleteResource(), and CAResource::~CAResource().

Here is the caller graph for this function:

void CADocument::removeSheet ( CASheet sheet) [inline]

References _sheetList.

Referenced by CAPropertiesDialog::createDocumentFromTree(), and CAMainWin::on_uiRemoveSheet_triggered().

Here is the caller graph for this function:

QList<CAResource*>& CADocument::resourceList ( ) [inline]
void CADocument::setArchive ( CAArchive a) [inline]

References _archive.

Referenced by CADocument(), and CACanImport::importDocumentImpl().

Here is the caller graph for this function:

void CADocument::setArranger ( const QString  arranger) [inline]

References _arranger, and arranger().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setComments ( const QString  comments) [inline]

References _comments, and comments().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setComposer ( const QString  composer) [inline]

References _composer, and composer().

Referenced by CAPropertiesDialog::applyProperties(), clone(), CAMusicXmlImport::readIdentification(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setCopyright ( const QString  copyright) [inline]

References _copyright, and copyright().

Referenced by CAPropertiesDialog::applyProperties(), clone(), CAMusicXmlImport::readIdentification(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setDateCreated ( const QDateTime  dateCreated) [inline]

References _dateCreated, and dateCreated().

Referenced by CADocument(), clone(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setDateLastModified ( const QDateTime  dateLastModified) [inline]

References _dateLastModified, and dateLastModified().

Referenced by CADocument(), clone(), CAMainWin::saveDocument(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setDedication ( const QString  dedication) [inline]

References _dedication, and dedication().

Referenced by CAPropertiesDialog::applyProperties(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setFileName ( const QString  fileName) [inline]

References _fileName, and fileName().

Referenced by clone(), CAMainWin::openDocument(), CAUndoCommand::redo(), CAMainWin::saveDocument(), and CAUndoCommand::undo().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setModified ( bool  m) [inline]
void CADocument::setPoet ( const QString  poet) [inline]

References _poet, and poet().

Referenced by CAPropertiesDialog::applyProperties(), clone(), CAMusicXmlImport::readIdentification(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setSheetAt ( int  i,
CASheet newSheet 
) [inline]

References _sheetList.

void CADocument::setSubtitle ( const QString  subtitle) [inline]

References _subtitle, and subtitle().

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

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setTextTranslator ( const QString  textTranslator) [inline]

References _textTranslator, and textTranslator().

Referenced by CAPropertiesDialog::applyProperties(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setTimeEdited ( const unsigned int  timeEdited) [inline]

References _timeEdited, and timeEdited().

Referenced by CADocument(), clone(), CAUndoCommand::redo(), CAMainWin::saveDocument(), CACanorusMLImport::startElement(), and CAUndoCommand::undo().

Here is the call graph for this function:

Here is the caller graph for this function:

void CADocument::setTitle ( const QString  title) [inline]

References _title, and title().

Referenced by CAPropertiesDialog::applyProperties(), clone(), CAMusicXmlImport::readWork(), and CACanorusMLImport::startElement().

Here is the call graph for this function:

Here is the caller graph for this function:

CASheet * CADocument::sheet ( const QString  name)

Returns the first sheet with the given name.

References _sheetList.

CADocument::sheetAt ( int  i) [inline]
CADocument::sheetCount ( ) [inline]
QList<CASheet*> CADocument::sheetList ( ) [inline]

References _sheetList.

const QString CADocument::subtitle ( ) [inline]

References _subtitle.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), setSubtitle(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

const QString CADocument::textTranslator ( ) [inline]

References _textTranslator.

Referenced by CACanorusMLExport::exportDocumentImpl(), setTextTranslator(), and CAPropertiesDialog::updateDocumentProperties().

Here is the caller graph for this function:

const unsigned int CADocument::timeEdited ( ) [inline]

References _timeEdited.

Referenced by clone(), CACanorusMLExport::exportDocumentImpl(), and setTimeEdited().

Here is the caller graph for this function:

const QString CADocument::title ( ) [inline]

Member Data Documentation

Referenced by archive(), and setArchive().

QString CADocument::_arranger [private]

Referenced by arranger(), clear(), and setArranger().

QString CADocument::_comments [private]

Referenced by clear(), comments(), and setComments().

QString CADocument::_composer [private]

Referenced by clear(), composer(), and setComposer().

QString CADocument::_copyright [private]

Referenced by clear(), copyright(), and setCopyright().

QDateTime CADocument::_dateCreated [private]

Referenced by clear(), dateCreated(), and setDateCreated().

QDateTime CADocument::_dateLastModified [private]
QString CADocument::_dedication [private]

Referenced by dedication(), and setDedication().

QString CADocument::_fileName [private]

Referenced by fileName(), and setFileName().

bool CADocument::_modified [private]

Referenced by isModified(), and setModified().

QString CADocument::_poet [private]

Referenced by clear(), poet(), and setPoet().

QString CADocument::_subtitle [private]

Referenced by clear(), setSubtitle(), and subtitle().

QString CADocument::_textTranslator [private]
unsigned int CADocument::_timeEdited [private]

Referenced by clear(), setTimeEdited(), and timeEdited().

QString CADocument::_title [private]

Referenced by clear(), setTitle(), and title().


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