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

Class which represents the current document. More...

#include <document.h>

Public Member Functions

 CADocument ()
 
virtual ~CADocument ()
 
CADocumentclone ()
 
void clear ()
 
const QList< CASheet * > & sheetList ()
 
CASheetaddSheetByName (const QString name)
 
void addSheet (CASheet *sheet)
 
CASheetaddSheet ()
 
void removeSheet (CASheet *sheet)
 
CASheetfindSheet (const QString name)
 
const QList< CAResource * > & resourceList ()
 
void addResource (CAResource *r)
 
void removeResource (CAResource *r)
 
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.

See also
CASheet

Constructor & Destructor Documentation

◆ CADocument()

CADocument::CADocument ( )

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::~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

◆ addResource()

void CADocument::addResource ( CAResource r)
inline

References _resourceList.

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

Here is the caller graph for this function:

◆ addSheet() [1/2]

CASheet * CADocument::addSheet ( )

Adds and empty sheet to the document.

References sheetList().

Here is the call graph for this function:

◆ addSheet() [2/2]

void CADocument::addSheet ( CASheet sheet)
inline

◆ addSheetByName()

CASheet * CADocument::addSheetByName ( const QString  name)

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.

◆ archive()

CAArchive* CADocument::archive ( )
inline

References _archive.

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

Here is the caller graph for this function:

◆ arranger()

const QString CADocument::arranger ( )
inline

References _arranger.

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

Here is the caller graph for this function:

◆ clear()

void CADocument::clear ( )

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:

◆ clone()

CADocument * CADocument::clone ( )

◆ comments()

const QString CADocument::comments ( )
inline

References _comments.

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

Here is the caller graph for this function:

◆ composer()

const QString CADocument::composer ( )
inline

References _composer.

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

Here is the caller graph for this function:

◆ copyright()

const QString CADocument::copyright ( )
inline

References _copyright.

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

Here is the caller graph for this function:

◆ dateCreated()

const QDateTime CADocument::dateCreated ( )
inline

◆ dateLastModified()

const QDateTime CADocument::dateLastModified ( )
inline

References _dateLastModified.

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

Here is the caller graph for this function:

◆ dedication()

const QString CADocument::dedication ( )
inline

References _dedication.

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

Here is the caller graph for this function:

◆ fileName()

const QString CADocument::fileName ( )
inline

References _fileName.

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

Here is the caller graph for this function:

◆ findSheet()

CASheet * CADocument::findSheet ( const QString  name)

Returns the first sheet with the given name.

References _sheetList.

◆ isModified()

bool CADocument::isModified ( )
inline

References _modified.

◆ poet()

const QString CADocument::poet ( )
inline

References _poet.

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

Here is the caller graph for this function:

◆ removeResource()

void CADocument::removeResource ( CAResource r)
inline

References _resourceList.

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

Here is the caller graph for this function:

◆ removeSheet()

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:

◆ resourceList()

const QList<CAResource*>& CADocument::resourceList ( )
inline

◆ setArchive()

void CADocument::setArchive ( CAArchive a)
inline

References _archive.

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

Here is the caller graph for this function:

◆ setArranger()

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:

◆ setComments()

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:

◆ setComposer()

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:

◆ setCopyright()

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:

◆ setDateCreated()

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:

◆ setDateLastModified()

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:

◆ setDedication()

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:

◆ setFileName()

void CADocument::setFileName ( const QString  fileName)
inline

References _fileName, and fileName().

Referenced by clone(), CACanImport::importDocumentImpl(), CACanorusMLImport::importDocumentImpl(), CAAutoRecovery::openRecovery(), CAUndoCommand::redo(), CAMainWin::saveDocument(), and CAUndoCommand::undo().

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

◆ setModified()

void CADocument::setModified ( bool  m)
inline

◆ setPoet()

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:

◆ setSubtitle()

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:

◆ setTextTranslator()

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:

◆ setTimeEdited()

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:

◆ setTitle()

void CADocument::setTitle ( const QString  title)
inline

References _title, and title().

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

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

◆ sheetList()

const QList<CASheet*>& CADocument::sheetList ( )
inline

◆ subtitle()

const QString CADocument::subtitle ( )
inline

References _subtitle.

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

Here is the caller graph for this function:

◆ textTranslator()

const QString CADocument::textTranslator ( )
inline

References _textTranslator.

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

Here is the caller graph for this function:

◆ timeEdited()

const unsigned int CADocument::timeEdited ( )
inline

References _timeEdited.

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

Here is the caller graph for this function:

◆ title()

const QString CADocument::title ( )
inline

Member Data Documentation

◆ _archive

CAArchive* CADocument::_archive
private

Referenced by archive(), and setArchive().

◆ _arranger

QString CADocument::_arranger
private

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

◆ _comments

QString CADocument::_comments
private

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

◆ _composer

QString CADocument::_composer
private

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

◆ _copyright

QString CADocument::_copyright
private

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

◆ _dateCreated

QDateTime CADocument::_dateCreated
private

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

◆ _dateLastModified

QDateTime CADocument::_dateLastModified
private

◆ _dedication

QString CADocument::_dedication
private

Referenced by dedication(), and setDedication().

◆ _fileName

QString CADocument::_fileName
private

Referenced by fileName(), and setFileName().

◆ _modified

bool CADocument::_modified
private

Referenced by isModified(), and setModified().

◆ _poet

QString CADocument::_poet
private

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

◆ _resourceList

QList<CAResource*> CADocument::_resourceList
private

◆ _sheetList

QList<CASheet*> CADocument::_sheetList
private

◆ _subtitle

QString CADocument::_subtitle
private

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

◆ _textTranslator

QString CADocument::_textTranslator
private

◆ _timeEdited

unsigned int CADocument::_timeEdited
private

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

◆ _title

QString CADocument::_title
private

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


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