CACanorus Class Reference

#include <canorus.h>

List of all members.

Static Public Member Functions

static void initMain (int argc=0, char *argv[]=0)
static
CASettingsDialog::CASettingsPage 
initSettings ()
static void initCommonGUI ()
static void initPlayback ()
static bool parseSettingsArguments (int argc, char *argv[])
static void initScripting ()
static void initAutoRecovery ()
static void initUndo ()
static void parseOpenFileArguments (int argc, char *argv[])
static void cleanUp ()
static QList< QString > locateResource (const QString fileName)
static QList< QString > locateResourceDir (const QString fileName)
static QApplication * mainApp ()
static int mainWinCount ()
static int mainWinCount (CADocument *)
static QList
< CAMainWin * > 
findMainWin (CADocument *document)
static CAMainWinmainWinAt (int idx)
static void removeMainWin (CAMainWin *w)
static void removeViewPort (CAViewPort *v)
static void addMainWin (CAMainWin *w)
static void restartTimeEditedTimes (CADocument *doc)
static CAUndoundo ()
static void addRecentDocument (QString)
static void insertRecentDocument (QString)
static void removeRecentDocument (QString)
static QList< QString > & recentDocumentList ()
static CASettingssettings ()
static CAAutoRecoveryautoRecovery ()
static QString settingsPath ()
static CAMidiDevicemidiDevice ()
static void setMidiDevice (CAMidiDevice *d)
static void rebuildUI (CADocument *document, CASheet *sheet)
static void rebuildUI (CADocument *document=0)

Static Private Attributes

static QList
< CAMainWin * > 
_mainWinList
static CASettings_settings
static QString _settingsPath
static CAUndo_undo
static QApplication * _mainApp
static QList< QString > _recentDocumentList
static CAMidiDevice_midiDevice
static CAAutoRecovery_autoRecovery


Detailed Description

Definition at line 26 of file canorus.h.


Member Function Documentation

void CACanorus::initMain ( int  argc = 0,
char *  argv[] = 0 
) [static]

Initializes application properties like application name, home page etc.

Definition at line 101 of file canorus.cpp.

References _autoRecovery.

Referenced by main().

Here is the caller graph for this function:

CASettingsDialog::CASettingsPage CACanorus::initSettings (  )  [static]

Opens Canorus config file and loads the settings. Config file is always INI file in user's home directory. No native formats are used (Windows registry etc.) - this is provided for easier transition of settings between the platforms.

See also:
settings()

Definition at line 159 of file canorus.cpp.

References _settings, _settingsPath, CASettings::readSettings(), and settingsPath().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::initCommonGUI (  )  [static]

Definition at line 110 of file canorus.cpp.

References CAFileFormats::CAN_FILTER, CAFileFormats::CANORUSML_FILTER, CAFileFormats::getFilter(), CAFileFormats::LILYPOND_FILTER, CAFileFormats::MIDI_FILTER, settings(), CAMainWin::uiExportDialog, CAMainWin::uiImportDialog, CAMainWin::uiOpenDialog, and CAMainWin::uiSaveDialog.

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::initPlayback (  )  [static]

Initializes playback devices.

Definition at line 147 of file canorus.cpp.

References setMidiDevice().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

bool CACanorus::parseSettingsArguments ( int  argc,
char *  argv[] 
) [static]

Parses the switches and settings command line arguments to application. This function sets any settings passed in command line.

Returns True, if application should resume with loading or False, if such a switch was passed.

See also:
parseOpenFileArguments()

Definition at line 237 of file canorus.cpp.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initScripting (  )  [static]

Initializes scripting and plugins subsystem.

Definition at line 174 of file canorus.cpp.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initAutoRecovery (  )  [static]

Initializes recovery saving.

Definition at line 186 of file canorus.cpp.

References _autoRecovery.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initUndo (  )  [static]

Definition at line 190 of file canorus.cpp.

References _undo.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::parseOpenFileArguments ( int  argc,
char *  argv[] 
) [static]

This function parses any arguments which doesn't look like switch or a setting. It creates a new main window and opens a file if a file is passed in the command line.

Definition at line 254 of file canorus.cpp.

References locateResource(), and CAMainWin::openDocument().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::cleanUp (  )  [static]

Free resources before quitting

Definition at line 215 of file canorus.cpp.

References _autoRecovery, _midiDevice, _settings, _undo, autoRecovery(), CAAutoRecovery::cleanupRecovery(), CAMainWin::uiExportDialog, CAMainWin::uiImportDialog, CAMainWin::uiOpenDialog, and CAMainWin::uiSaveDialog.

Referenced by CAMainWin::~CAMainWin().

Here is the call graph for this function:

Here is the caller graph for this function:

QList< QString > CACanorus::locateResource ( const QString  fileName  )  [static]

Locates a resource named fileName (relative path) and returns its absolute path of the file if found in the following order:

See also:
locateResourceDir()

Todo:
Config file implementation

Application path argument

Definition at line 46 of file canorus.cpp.

Referenced by CADrawableMark::CADrawableMark(), CAMainWin::initViewPort(), locateResourceDir(), main(), CAMainWin::newDocument(), parseOpenFileArguments(), and CAPluginManager::readPlugins().

Here is the caller graph for this function:

QList< QString > CACanorus::locateResourceDir ( const QString  fileName  )  [static]

Finds the resource named fileName and returns its absolute directory.

See also:
locateResource()

Definition at line 89 of file canorus.cpp.

References locateResource().

Referenced by CAPropertiesDialog::buildTree(), CAMainWin::CAMainWin(), CAPropertiesDialog::CAPropertiesDialog(), and CASettingsDialog::CASettingsDialog().

Here is the call graph for this function:

Here is the caller graph for this function:

static QApplication* CACanorus::mainApp (  )  [inline, static]

Definition at line 42 of file canorus.h.

References _mainApp.

int CACanorus::mainWinCount (  )  [inline, static]

Returns the number of all main windows.

Definition at line 43 of file canorus.h.

References _mainWinList.

Referenced by CAPluginManager::disablePlugin(), findMainWin(), main(), CAMainWin::newDocument(), CAMainWin::on_uiCloseDocument_triggered(), CAMainWin::on_uiImportDocument_triggered(), CAMainWin::openDocument(), CAAutoRecovery::openRecovery(), rebuildUI(), removeViewPort(), restartTimeEditedTimes(), CAAutoRecovery::saveRecovery(), CAMainWin::~CAMainWin(), and CAUndoCommand::~CAUndoCommand().

Here is the caller graph for this function:

int CACanorus::mainWinCount ( CADocument doc  )  [static]

Returns number of main windows which have the given document opened.

Definition at line 278 of file canorus.cpp.

References _mainWinList.

QList< CAMainWin * > CACanorus::findMainWin ( CADocument document  )  [static]

Finds and returns a list of main windows containing the given document.

Definition at line 317 of file canorus.cpp.

References CAMainWin::document(), mainWinAt(), and mainWinCount().

Referenced by CAUndoCommand::undoDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

static CAMainWin* CACanorus::mainWinAt ( int  idx  )  [inline, static]

Definition at line 46 of file canorus.h.

References _mainWinList.

Referenced by CAPluginManager::disablePlugin(), findMainWin(), main(), CAAutoRecovery::openRecovery(), rebuildUI(), restartTimeEditedTimes(), and CAAutoRecovery::saveRecovery().

Here is the caller graph for this function:

static void CACanorus::removeMainWin ( CAMainWin w  )  [inline, static]

Definition at line 47 of file canorus.h.

References _mainWinList.

Referenced by CAMainWin::~CAMainWin().

Here is the caller graph for this function:

static void CACanorus::removeViewPort ( CAViewPort v  )  [inline, static]

Definition at line 48 of file canorus.h.

References _mainWinList, and mainWinCount().

Referenced by CAViewPort::~CAViewPort().

Here is the call graph for this function:

Here is the caller graph for this function:

static void CACanorus::addMainWin ( CAMainWin w  )  [inline, static]

Definition at line 49 of file canorus.h.

References _mainWinList.

Referenced by CAMainWin::CAMainWin().

Here is the caller graph for this function:

static void CACanorus::restartTimeEditedTimes ( CADocument doc  )  [inline, static]

Definition at line 50 of file canorus.h.

References CAMainWin::document(), mainWinAt(), mainWinCount(), and CAMainWin::restartTimeEditedTime().

Referenced by CAMainWin::saveDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

static CAUndo* CACanorus::undo (  )  [inline, static]

Definition at line 52 of file canorus.h.

References _undo.

Referenced by CAPropertiesDialog::applyProperties(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), CAMainWin::newDocument(), CAMainWin::on_uiAssociatedVoice_activated(), CAMainWin::on_uiClefOffset_valueChanged(), CAMainWin::on_uiCloseDocument_triggered(), CAMainWin::on_uiContextName_returnPressed(), CAMainWin::on_uiCut_triggered(), CAMainWin::on_uiFermataType_toggled(), CAMainWin::on_uiFinger_toggled(), CAMainWin::on_uiFingeringOriginal_toggled(), CAMainWin::on_uiFMChordArea_toggled(), CAMainWin::on_uiFMEllipse_toggled(), CAMainWin::on_uiFMFunction_toggled(), CAMainWin::on_uiFMTonicDegree_toggled(), CAMainWin::on_uiImportDocument_triggered(), CAMainWin::on_uiInstrumentChange_activated(), CAMainWin::on_uiKeySig_activated(), CAMainWin::on_uiNewSheet_triggered(), CAMainWin::on_uiNewVoice_triggered(), CAMainWin::on_uiNoteStemDirection_toggled(), CAMainWin::on_uiPlayableLength_toggled(), CAMainWin::on_uiRedo_toggled(), CAMainWin::on_uiRemoveContext_triggered(), CAMainWin::on_uiRemoveSheet_triggered(), CAMainWin::on_uiRemoveVoice_triggered(), CAMainWin::on_uiRepeatMarkType_toggled(), CAMainWin::on_uiSheetName_returnPressed(), CAMainWin::on_uiStanzaNumber_valueChanged(), CAMainWin::on_uiTempoBeat_toggled(), CAMainWin::on_uiTempoBpm_returnPressed(), CAMainWin::on_uiUndo_toggled(), CAMainWin::on_uiVoiceName_returnPressed(), CAMainWin::on_uiVoiceStemDirection_toggled(), CAUndoToolButton::onShow(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::openDocument(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), CAMainWin::sourceViewPortCommit(), CAMainWin::updateUndoRedoButtons(), CAMainWin::~CAMainWin(), and CAUndoCommand::~CAUndoCommand().

Here is the caller graph for this function:

void CACanorus::addRecentDocument ( QString  filename  )  [static]

Definition at line 204 of file canorus.cpp.

References recentDocumentList().

Referenced by CASettings::readRecentDocuments().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::insertRecentDocument ( QString  filename  )  [static]

Definition at line 194 of file canorus.cpp.

References recentDocumentList(), removeRecentDocument(), and settings().

Referenced by CAMainWin::openDocument(), and CAMainWin::saveDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::removeRecentDocument ( QString  filename  )  [static]

Definition at line 208 of file canorus.cpp.

References recentDocumentList().

Referenced by insertRecentDocument(), and CAMainWin::onUiOpenRecentDocumentTriggered().

Here is the call graph for this function:

Here is the caller graph for this function:

static QList<QString>& CACanorus::recentDocumentList (  )  [inline, static]

Definition at line 57 of file canorus.h.

References _recentDocumentList.

Referenced by addRecentDocument(), insertRecentDocument(), CAMainWin::on_uiOpenRecent_aboutToShow(), CAMainWin::onUiOpenRecentDocumentTriggered(), removeRecentDocument(), and CASettings::writeRecentDocuments().

Here is the caller graph for this function:

static CASettings* CACanorus::settings (  )  [inline, static]

Definition at line 59 of file canorus.h.

References _settings.

Referenced by CASettingsDialog::applySettings(), initCommonGUI(), CAScoreViewPort::initScoreViewPort(), insertRecentDocument(), CAMainWin::on_uiPlayFromSelection_toggled(), CAMainWin::onTextEditKeyPressEvent(), CASettingsDialog::setupPages(), and CAAutoRecovery::updateTimer().

Here is the caller graph for this function:

static CAAutoRecovery* CACanorus::autoRecovery (  )  [inline, static]

Definition at line 60 of file canorus.h.

References _autoRecovery.

Referenced by CASettingsDialog::applySettings(), cleanUp(), and main().

Here is the caller graph for this function:

static QString CACanorus::settingsPath (  )  [inline, static]

Definition at line 61 of file canorus.h.

References _settingsPath.

Referenced by CAAutoRecovery::cleanupRecovery(), initSettings(), CAAutoRecovery::openRecovery(), and CAAutoRecovery::saveRecovery().

Here is the caller graph for this function:

static CAMidiDevice* CACanorus::midiDevice (  )  [inline, static]

Definition at line 62 of file canorus.h.

References _midiDevice.

Referenced by CADrawableMark::CADrawableMark(), CAMainWin::CAMainWin(), CAMainWin::createCustomActions(), CADrawableMark::draw(), CAMainWin::on_uiPlayFromSelection_toggled(), CAMainWin::playbackFinished(), CASettings::readSettings(), rtMidiInCallback(), CASettings::setMidiInPort(), and CASettingsDialog::setupPages().

Here is the caller graph for this function:

static void CACanorus::setMidiDevice ( CAMidiDevice d  )  [inline, static]

Definition at line 63 of file canorus.h.

References _midiDevice.

Referenced by initPlayback().

Here is the caller graph for this function:

void CACanorus::rebuildUI ( CADocument document,
CASheet sheet 
) [static]

Rebuilds main windows with the given document and its viewports showing the given sheet. Rebuilds all viewports if no sheet is null.

See also:
rebuildUI(CADocument*), CAMainWin::rebuildUI()

Definition at line 293 of file canorus.cpp.

References CAMainWin::document(), mainWinAt(), mainWinCount(), and CAMainWin::rebuildUI().

Referenced by CAPropertiesDialog::applyProperties(), CAPlugin::callAction(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), CAMainWin::on_uiAssociatedVoice_activated(), CAMainWin::on_uiClefOffset_valueChanged(), CAMainWin::on_uiDynamicCustomText_returnPressed(), CAMainWin::on_uiDynamicText_toggled(), CAMainWin::on_uiDynamicVolume_valueChanged(), CAMainWin::on_uiFermataType_toggled(), CAMainWin::on_uiFinger_toggled(), CAMainWin::on_uiFingeringOriginal_toggled(), CAMainWin::on_uiFMChordArea_toggled(), CAMainWin::on_uiFMEllipse_toggled(), CAMainWin::on_uiFMFunction_toggled(), CAMainWin::on_uiFMTonicDegree_toggled(), CAMainWin::on_uiHiddenRest_toggled(), CAMainWin::on_uiInstrumentChange_activated(), CAMainWin::on_uiKeySig_activated(), CAMainWin::on_uiNewSheet_triggered(), CAMainWin::on_uiNewVoice_triggered(), CAMainWin::on_uiNoteStemDirection_toggled(), CAMainWin::on_uiPlayableLength_toggled(), CAMainWin::on_uiRedo_toggled(), CAMainWin::on_uiRemoveContext_triggered(), CAMainWin::on_uiRemoveVoice_triggered(), CAMainWin::on_uiRepeatMarkType_toggled(), CAMainWin::on_uiSettings_triggered(), CAMainWin::on_uiTempoBeat_toggled(), CAMainWin::on_uiTempoBpm_returnPressed(), CAMainWin::on_uiTimeSigBeat_valueChanged(), CAMainWin::on_uiTimeSigBeats_valueChanged(), CAMainWin::on_uiUndo_toggled(), CAMainWin::on_uiVoiceStemDirection_toggled(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), CAMainWin::sourceViewPortCommit(), and CAUndoCommand::undoDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::rebuildUI ( CADocument document = 0  )  [static]

Rebuilds main windows with the given document. Rebuilds all main windows, if document is not given or null.

See also:
rebuildUI(CADocument*, CASheet*), CAMainWin::rebuildUI()

Definition at line 305 of file canorus.cpp.

References CAMainWin::document(), mainWinAt(), mainWinCount(), and CAMainWin::rebuildUI().

Here is the call graph for this function:


Member Data Documentation

QList< CAMainWin * > CACanorus::_mainWinList [static, private]

Definition at line 69 of file canorus.h.

Referenced by addMainWin(), mainWinAt(), mainWinCount(), removeMainWin(), and removeViewPort().

CASettings * CACanorus::_settings [static, private]

Definition at line 70 of file canorus.h.

Referenced by cleanUp(), initSettings(), and settings().

QString CACanorus::_settingsPath [static, private]

Definition at line 71 of file canorus.h.

Referenced by initSettings(), and settingsPath().

CAUndo * CACanorus::_undo [static, private]

Definition at line 72 of file canorus.h.

Referenced by cleanUp(), initUndo(), and undo().

QApplication * CACanorus::_mainApp [static, private]

Copyright (c) 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 COPYING for details.

Definition at line 73 of file canorus.h.

Referenced by mainApp().

QList< QString > CACanorus::_recentDocumentList [static, private]

Definition at line 74 of file canorus.h.

Referenced by recentDocumentList().

CAMidiDevice * CACanorus::_midiDevice [static, private]

Definition at line 77 of file canorus.h.

Referenced by cleanUp(), midiDevice(), and setMidiDevice().

CAAutoRecovery * CACanorus::_autoRecovery [static, private]

Definition at line 80 of file canorus.h.

Referenced by autoRecovery(), cleanUp(), initAutoRecovery(), and initMain().


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