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

#include <canorus.h>

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 const QList< CAMainWin * > & mainWinList ()
 
static void addMainWin (CAMainWin *w)
 
static void removeMainWin (CAMainWin *w)
 
static int mainWinCount (CADocument *)
 
static QList< CAMainWin * > findMainWin (CADocument *document)
 
static void removeView (CAView *v)
 
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 const char * propCommand ()
 
static const char * propContext ()
 
static const char * propDescription ()
 
static const char * propShortCut ()
 
static const char * propMidiCommand ()
 
static const char * propConflicts ()
 
static QList< CAMainWin * > & mainWinList ()
 

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

◆ addMainWin()

static void CACanorus::addMainWin ( CAMainWin w)
inlinestatic

References _mainWinList.

Referenced by CAMainWin::CAMainWin().

Here is the caller graph for this function:

◆ addRecentDocument()

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:

◆ autoRecovery()

static CAAutoRecovery* CACanorus::autoRecovery ( )
inlinestatic

References _autoRecovery.

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

Here is the caller graph for this function:

◆ cleanUp()

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:

◆ connectSlotsByName()

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

\function 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.

See also
QObject::setObjectName()
QMetaObject::connectSlotsByName(QObject *o)

Referenced by CADummyCtl::CADummyCtl(), CAPreviewCtl::CAPreviewCtl(), CAPrintCtl::CAPrintCtl(), and CAKeySignatureCtl::setupActions().

Here is the caller graph for this function:

◆ fetaCodepoint()

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(), CADrawableMark::draw(), CADrawableNote::draw(), CADrawableRest::draw(), CADrawableTimeSignature::draw(), CADrawableFiguredBassNumber::draw(), and CADrawableMark::fingerListToString().

Here is the caller graph for this function:

◆ findMainWin()

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

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

References mainWinList().

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:

◆ help()

static CAHelpCtl* CACanorus::help ( )
inlinestatic

References _help.

Referenced by CAMainWin::on_uiUsersGuide_triggered().

Here is the caller graph for this function:

◆ initAutoRecovery()

void CACanorus::initAutoRecovery ( )
static

Initializes recovery saving.

References _autoRecovery.

Referenced by main().

Here is the caller graph for this function:

◆ initCommonGUI()

void CACanorus::initCommonGUI ( )
static

◆ initFonts()

void CACanorus::initFonts ( )
static

Referenced by main().

Here is the caller graph for this function:

◆ initHelp()

void CACanorus::initHelp ( )
static

References _help.

Referenced by main().

Here is the caller graph for this function:

◆ initMain()

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:

◆ initPlayback()

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:

◆ initScripting()

void CACanorus::initScripting ( )
static

Initializes scripting and plugins subsystem.

Referenced by main().

Here is the caller graph for this function:

◆ initSearchPaths()

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:

◆ initSettings()

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

References _settings, CASettingsDialog::PlaybackSettings, CASettings::readSettings(), and CASettingsDialog::UndefinedSettings.

Referenced by main().

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

◆ initTranslations()

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:

◆ initUndo()

void CACanorus::initUndo ( )
static

References _undo.

Referenced by main().

Here is the caller graph for this function:

◆ insertRecentDocument()

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:

◆ mainWinCount()

int CACanorus::mainWinCount ( CADocument doc)
static

Returns the number of all main windows.

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

References _mainWinList.

Referenced by CAMainWin::newDocument(), CAMainWin::on_uiCloseDocument_triggered(), CAMainWin::openDocument(), CAMainWin::~CAMainWin(), and CAUndoCommand::~CAUndoCommand().

Here is the caller graph for this function:

◆ mainWinList() [1/2]

static const QList<CAMainWin*>& CACanorus::mainWinList ( )
inlinestatic

◆ mainWinList() [2/2]

static QList<CAMainWin*>& CACanorus::mainWinList ( )
inlinestatic

References _mainWinList.

◆ midiDevice()

static CAMidiDevice* CACanorus::midiDevice ( )
inlinestatic

◆ parseOpenFileArguments()

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:

◆ parseSettingsArguments()

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:

◆ propCommand()

static const char* CACanorus::propCommand ( )
inlinestatic

◆ propConflicts()

static const char* CACanorus::propConflicts ( )
inlinestatic

◆ propContext()

static const char* CACanorus::propContext ( )
inlinestatic

◆ propDescription()

static const char* CACanorus::propDescription ( )
inlinestatic

◆ propMidiCommand()

static const char* CACanorus::propMidiCommand ( )
inlinestatic

◆ propShortCut()

static const char* CACanorus::propShortCut ( )
inlinestatic

◆ rebuildUI() [1/2]

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

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

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

References mainWinList().

Referenced by CAPropertiesDialog::applyProperties(), CAPlugin::callAction(), CAMainWin::confirmTextEdit(), CAResourceView::contextMenuEvent(), CAMainWin::deleteSelection(), CAMainWin::insertMusElementAt(), CAKeybdInput::midiInEventToScore(), CATransposeView::on_uiApply_clicked(), CAMainWin::on_uiAssociatedVoice_activated(), CAMainWin::on_uiClefOffset_valueChanged(), CAMainWin::on_uiContextName_returnPressed(), CAMainWin::on_uiDynamicCustomText_returnPressed(), CAMainWin::on_uiDynamicText_toggled(), CAMainWin::on_uiDynamicVolume_valueChanged(), CAMainWin::on_uiFBMAccs_toggled(), CAMainWin::on_uiFBMNumber_toggled(), 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(), CAKeySignatureCtl::on_uiKeySig_activated(), CAMainWin::on_uiMidiRecorder_triggered(), 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_uiSettings_triggered(), CAMainWin::on_uiSheetName_returnPressed(), CAMainWin::on_uiTabWidget_CAMoveTab(), CAMainWin::on_uiTempoBeat_toggled(), CAMainWin::on_uiTempoBpm_returnPressed(), CAMainWin::on_uiTimeSigBeat_valueChanged(), CAMainWin::on_uiTimeSigBeats_valueChanged(), CAMainWin::on_uiTupletType_toggled(), CAMainWin::on_uiUndo_toggled(), CAMainWin::on_uiVoiceInstrument_activated(), CAMainWin::on_uiVoiceName_returnPressed(), CAMainWin::on_uiVoiceStemDirection_toggled(), CAMainWin::onImportDone(), CAMainWin::pasteAt(), CAMainWin::scoreViewKeyPress(), CAMainWin::scoreViewMousePress(), CAMainWin::scoreViewMouseRelease(), CAMainWin::sourceViewCommit(), and CAUndoCommand::undoDocument().

Here is the call graph for this function:

◆ rebuildUI() [2/2]

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

Here is the call graph for this function:

◆ recentDocumentList()

static QList<QString>& CACanorus::recentDocumentList ( )
inlinestatic

◆ removeMainWin()

static void CACanorus::removeMainWin ( CAMainWin w)
inlinestatic

References _mainWinList.

Referenced by CAMainWin::~CAMainWin().

Here is the caller graph for this function:

◆ removeRecentDocument()

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:

◆ removeView()

static void CACanorus::removeView ( CAView v)
inlinestatic

References _mainWinList, mainWinList(), and removeView().

Referenced by removeView(), and CAView::~CAView().

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

◆ repaintUI()

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

Here is the call graph for this function:

◆ restartTimeEditedTimes()

static void CACanorus::restartTimeEditedTimes ( CADocument doc)
inlinestatic

References mainWinList().

Referenced by CAMainWin::saveDocument().

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

◆ setMidiDevice()

static void CACanorus::setMidiDevice ( CAMidiDevice d)
inlinestatic

References _midiDevice.

Referenced by initPlayback().

Here is the caller graph for this function:

◆ settings()

static CASettings* CACanorus::settings ( )
inlinestatic

◆ undo()

static CAUndo* CACanorus::undo ( )
inlinestatic

References _undo.

Referenced by CAPropertiesDialog::applyProperties(), CAMainWin::confirmTextEdit(), 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_uiFBMAccs_toggled(), CAMainWin::on_uiFBMNumber_toggled(), 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(), CAKeySignatureCtl::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_uiTabWidget_CAMoveTab(), 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::openDocument(), CAMainWin::pasteAt(), CAMainWin::scoreViewKeyPress(), CAMainWin::scoreViewMousePress(), CAMainWin::scoreViewMouseRelease(), CAUndoToolButton::showButtons(), CAMainWin::sourceViewCommit(), CAMainWin::updateUndoRedoButtons(), CAMainWin::~CAMainWin(), and CAUndoCommand::~CAUndoCommand().

Member Data Documentation

◆ _autoRecovery

CAAutoRecovery * CACanorus::_autoRecovery
staticprivate

◆ _fetaMap

QHash< QString, int > CACanorus::_fetaMap
staticprivate

Referenced by fetaCodepoint().

◆ _help

CAHelpCtl * CACanorus::_help
staticprivate

Referenced by help(), and initHelp().

◆ _mainWinList

static QList< CAMainWin * > CACanorus::_mainWinList
staticprivate

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(), mainWinCount(), mainWinList(), removeMainWin(), and removeView().

◆ _midiDevice

CAMidiDevice * CACanorus::_midiDevice
staticprivate

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

◆ _recentDocumentList

QList< QString > CACanorus::_recentDocumentList
staticprivate

Referenced by recentDocumentList().

◆ _settings

CASettings * CACanorus::_settings
staticprivate

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

◆ _undo

CAUndo * CACanorus::_undo
staticprivate

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


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