Canorus  0.7
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Static Public Member Functions | Static Private Attributes
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 initTranslations ()
static void initCommonGUI ()
static void initPlayback ()
static bool parseSettingsArguments (int argc, char *argv[])
static void initScripting ()
static void initAutoRecovery ()
static void initUndo ()
static void initSearchPaths ()
static void initFonts ()
static void initHelp ()
static void parseOpenFileArguments (int argc, char *argv[])
static void cleanUp ()
static int fetaCodepoint (const QString &name)
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 CAMidiDevicemidiDevice ()
static void setMidiDevice (CAMidiDevice *d)
static CAHelpCtlhelp ()
static void rebuildUI (CADocument *document, CASheet *sheet)
static void rebuildUI (CADocument *document=0)
static void repaintUI ()
static void connectSlotsByName (QObject *pOS, const QObject *pOR)
static int mainWinCount ()
static CAMainWinmainWinAt (int i)

Static Private Attributes

static QList< CAMainWin * > _mainWinList
static CASettings_settings
static CAUndo_undo
static QList< QString > _recentDocumentList
static QHash< QString, int > _fetaMap
static CAMidiDevice_midiDevice
static CAAutoRecovery_autoRecovery
static CAHelpCtl_help

Member Function Documentation

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

References _mainWinList.

Referenced by CAMainWin::CAMainWin().

Here is the caller graph for this function:

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

References recentDocumentList().

Referenced by CASettings::readRecentDocuments().

Here is the call graph for this function:

Here is the caller graph for this function:

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

References _autoRecovery.

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

Here is the caller graph for this function:

void CACanorus::cleanUp ( ) [static]

Free resources before quitting

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:

void CACanorus::connectSlotsByName ( QObject pOS,
const QObject pOR 
) [static]

void CACanorus::addMainWin( CAMainWin *w ) Adds an already created main window to the global main window list.

See also:
removeMainWin(), mainWinAt()
    Searches recursively for all child objects of the given object, and connects matching signals from them to slots of object that follow the following form:
    void on_<widget name>_<signal name>(<signal parameters>);
    Let's assume our object has a child object of type QPushButton with the object name     button1. The slot to catch the button's clicked() signal would be:
    void on_button1_clicked();

    This enhanced function allows to precisely define in which object the signal (pOS)
    is defined and in which object the slot (poR) is defined.

    \sa QObject::setObjectName()
    \sa QMetaObject::connectSlotsByName(QObject *o)

Referenced by CAPreviewCtl::CAPreviewCtl(), and CAPrintCtl::CAPrintCtl().

Here is the caller graph for this function:

int CACanorus::fetaCodepoint ( const QString &  name) [static]

Returns codepoint for an Feta (Emmentaler) glyph by its name.

References _fetaMap.

Referenced by CADrawableAccidental::draw(), CADrawableClef::draw(), CADrawableRest::draw(), CADrawableTimeSignature::draw(), CADrawableNote::draw(), CADrawableMark::draw(), and CADrawableMark::fingerListToString().

Here is the caller graph for this function:

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

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

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

Referenced by CAResourceView::closeEvent(), CAResourceView::showEvent(), and CAUndoCommand::undoDocument().

Here is the call graph for this function:

Here is the caller graph for this function:

static CAHelpCtl* CACanorus::help ( ) [inline, static]

References _help.

Referenced by CAMainWin::on_uiUsersGuide_triggered().

Here is the caller graph for this function:

void CACanorus::initAutoRecovery ( ) [static]

Initializes recovery saving.

References _autoRecovery.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initCommonGUI ( ) [static]
void CACanorus::initFonts ( ) [static]

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initHelp ( ) [static]

References _help.

Referenced by main().

Here is the caller graph for this function:

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

Initializes application properties like application name, home page etc.

References _autoRecovery.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initPlayback ( ) [static]

Initializes playback devices.

References setMidiDevice().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::initScripting ( ) [static]

Initializes scripting and plugins subsystem.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initSearchPaths ( ) [static]

Add all search paths. The search order is the following:

  • TODO passed path as an argument to exe
  • TODO path in user's config file
  • current dir
  • exe dir
  • DEFAULT_DATA_DIR set by compiler

Referenced by main().

Here is the caller graph for this function:

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

References _settings, and CASettings::readSettings().

Referenced by main().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::initTranslations ( ) [static]

Initializes language specific settings like the translation file for the GUI, text flow (left-to-right or right-to-left), default string encoding etc.

Referenced by main().

Here is the caller graph for this function:

void CACanorus::initUndo ( ) [static]

References _undo.

Referenced by main().

Here is the caller graph for this function:

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

References recentDocumentList(), removeRecentDocument(), settings(), and CASettings::writeSettings().

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

Here is the call graph for this function:

Here is the caller graph for this function:

static CAMainWin* CACanorus::mainWinAt ( int  i) [inline, static]
static CAMainWin* CACanorus::mainWinAt ( int  idx) [inline, static]
static int CACanorus::mainWinCount ( ) [inline, static]
int CACanorus::mainWinCount ( ) [inline, static]
int CACanorus::mainWinCount ( CADocument doc) [static]

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

References _mainWinList.

static CAMidiDevice* CACanorus::midiDevice ( ) [inline, static]
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.

References CAMainWin::openDocument().

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

Referenced by main().

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

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

Referenced by CAPropertiesDialog::applyProperties(), CAPlugin::callAction(), CAResourceView::contextMenuEvent(), CAKeybdInput::midiInEventToScore(), CATransposeView::on_uiApply_clicked(), 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()

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

Here is the call graph for this function:

static QList<QString>& CACanorus::recentDocumentList ( ) [inline, static]
static void CACanorus::removeMainWin ( CAMainWin w) [inline, static]

References _mainWinList.

Referenced by CAMainWin::~CAMainWin().

Here is the caller graph for this function:

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

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 void CACanorus::removeViewPort ( CAViewPort v) [inline, static]

References _mainWinList, mainWinCount(), and removeViewPort().

Referenced by removeViewPort(), and CAViewPort::~CAViewPort().

Here is the call graph for this function:

Here is the caller graph for this function:

void CACanorus::repaintUI ( ) [static]

Repaints all main window. This is useful for example if only selection was changed by external event (eg. plugin) and the GUI should be repainted, but not rebuilt.

References mainWinAt(), and mainWinCount().

Here is the call graph for this function:

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

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 void CACanorus::setMidiDevice ( CAMidiDevice d) [inline, static]

References _midiDevice.

Referenced by initPlayback().

Here is the caller graph for this function:

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

References _undo.

Referenced by CAPropertiesDialog::applyProperties(), CAResourceCtl::createEmptyResource(), CAResourceCtl::deleteResource(), CAMainWin::deleteSelection(), CAResourceCtl::importResource(), CAMainWin::insertMusElementAt(), CAKeybdInput::midiInEventToScore(), CAMainWin::newDocument(), CATransposeView::on_uiApply_clicked(), 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_uiHiddenRest_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_uiTupletType_toggled(), CAMainWin::on_uiUndo_toggled(), CAMainWin::on_uiVoiceInstrument_activated(), CAMainWin::on_uiVoiceName_returnPressed(), CAMainWin::on_uiVoiceStemDirection_toggled(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::openDocument(), CAMainWin::pasteAt(), CAMainWin::scoreViewPortKeyPress(), CAMainWin::scoreViewPortMousePress(), CAMainWin::scoreViewPortMouseRelease(), CAUndoToolButton::showButtons(), CAMainWin::sourceViewPortCommit(), CAMainWin::updateUndoRedoButtons(), CAMainWin::~CAMainWin(), and CAUndoCommand::~CAUndoCommand().


Member Data Documentation

QHash< QString, int > CACanorus::_fetaMap [static, private]

Referenced by fetaCodepoint().

CAHelpCtl * CACanorus::_help [static, private]

Referenced by help(), and initHelp().

QList< CAMainWin * > CACanorus::_mainWinList [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.

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

CAMidiDevice * CACanorus::_midiDevice [static, private]

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

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

Referenced by recentDocumentList().

CASettings * CACanorus::_settings [static, private]

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

CAUndo * CACanorus::_undo [static, private]

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


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