|
Canorus 0.0
|
Class for storing the Canorus settings. More...
#include <settings.h>

Static Public Member Functions | |
| static const QString | defaultSettingsPath () |
Private Member Functions | |
| void | writeRecentDocuments () |
| void | readRecentDocuments () |
Private Attributes | |
| bool | _finaleLyricsBehaviour |
| bool | _shadowNotesInOtherStaffs |
| bool | _playInsertedNotes |
| bool | _autoBar |
| bool | _useNoteChecker |
| QDir | _documentsDirectory |
| CAFileFormats::CAFileFormatType | _defaultSaveFormat |
| int | _autoRecoveryInterval |
| int | _maxRecentDocuments |
| bool | _lockScrollPlayback |
| bool | _animatedScroll |
| bool | _antiAliasing |
| bool | _showRuler |
| QColor | _backgroundColor |
| QColor | _foregroundColor |
| QColor | _selectionColor |
| QColor | _selectionAreaColor |
| QColor | _selectedContextColor |
| QColor | _hiddenElementsColor |
| QColor | _disabledElementsColor |
| int | _midiOutPort |
| int | _midiInPort |
| int | _midiOutNumDevices |
| int | _midiInNumDevices |
| CATypesetter::CATypesetterType | _typesetter |
| QString | _typesetterLocation |
| bool | _useSystemDefaultTypesetter |
| QString | _pdfViewerLocation |
| bool | _useSystemDefaultPdfViewer |
| QDir | _latestShortcutsDirectory |
| QList< CASingleAction * > | _oActionList |
| CASingleAction * | _poEmptyEntry |
Class for storing the Canorus settings.
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.
This class is a model class used for reading and writing the settings in/out of the config file.
The default location of config files are usually $HOME$/.config/Canorus for POSIX systems and HOME%\Application data\Canorus on M$ systems. See
| CASettings::CASettings | ( | QObject * | parent = 0 | ) |
Create a new settings instance using the default config file for a local user.
References initSettings().

Create a new settings instance using the config file fileName.
References initSettings().

|
virtual |
References _oActionList, _poEmptyEntry, and writeSettings().

| void CASettings::addSingleAction | ( | CASingleAction & | oSingleAction | ) |
Adds a single action to the action list Warning: The action will be referenced!
References _oActionList, CASingleAction::getAction(), CASingleAction::getCommandName(), CASingleAction::getDescription(), CASingleAction::getMidiKeySequence(), CASingleAction::getShortCutAsString(), CASingleAction::newAction(), CASingleAction::setCommandName(), CASingleAction::setDescription(), CASingleAction::setMidiKeySequence(), and CASingleAction::setShortCutAsString().
Referenced by CAActionDelegate::addSingleAction(), and setActionList().


|
inline |
References _animatedScroll.
Referenced by CAMainWin::insertMusElementAt(), CAMainWin::on_uiZoomToSelection_triggered(), CAMainWin::onRepaintTimerTimeout(), CAMainWin::onTextEditKeyPressEvent(), CAMainWin::scoreViewKeyPress(), CAMainWin::scoreViewWheel(), and writeSettings().

|
inline |
References _antiAliasing.
Referenced by writeSettings().

|
inline |
|
inline |
References _autoRecoveryInterval.
Referenced by writeSettings().

|
inline |
References _backgroundColor.
Referenced by setBackgroundColor(), and writeSettings().

|
inline |
References _defaultSaveFormat.
Referenced by CASettingsDialog::setupPages(), and writeSettings().

|
static |
Returns the default settings path. This function is static and is used when no config filename is specified or when a plugin wants a settings directory to store its own settings in.
Referenced by CAAutoRecovery::cleanupRecovery(), main(), CAAutoRecovery::openRecovery(), and CAAutoRecovery::saveRecovery().

| bool CASettings::deleteSingleAction | ( | QString | oCommand, |
| CASingleAction *& | poResAction | ||
| ) |
Removes a single action from the action list Return 'true' when succesfull Warning: The action itself is not deleted!
References _oActionList, and getSingleAction().
Referenced by CAActionDelegate::removeMainWinActions().


|
inline |
References _disabledElementsColor.
Referenced by setDisabledElementsColor(), and writeSettings().

|
inline |
References _documentsDirectory.
Referenced by writeSettings().

|
inline |
References _finaleLyricsBehaviour.
Referenced by CAMainWin::onTextEditKeyPressEvent(), and writeSettings().

|
inline |
References _foregroundColor.
Referenced by setForegroundColor(), and writeSettings().

|
inline |
References _oActionList.
Referenced by CASettingsDialog::buildActionsEditorPage(), and CAActionDelegate::removeMainWinActions().

| int CASettings::getSingleAction | ( | const QString & | oCommandName, |
| CASingleAction *& | poResAction | ||
| ) |
References _oActionList, _poEmptyEntry, and CASingleAction::getCommandName().

Search one single action in the list of actions (-1: entry not found) Returns an empty action element when the command was not found
References _oActionList, _poEmptyEntry, CASingleAction::getAction(), and CASingleAction::getCommandName().
Referenced by deleteSingleAction(), setActionList(), and CAActionDelegate::updateMainWinActions().


|
inline |
Re one single action in the list of actions Does not check for the correct position in the list to be fast!
|
inline |
References _hiddenElementsColor.
Referenced by setHiddenElementsColor(), and writeSettings().

| void CASettings::initSettings | ( | ) |
|
inline |
References _latestShortcutsDirectory.
Referenced by CAActionsEditor::CAActionsEditor().

|
inline |
References _lockScrollPlayback.
Referenced by CAMainWin::onRepaintTimerTimeout(), and writeSettings().

|
inline |
References _maxRecentDocuments.
Referenced by writeSettings().

|
inline |
References _midiInNumDevices.
Referenced by writeSettings().

|
inline |
References _midiInPort.
Referenced by setMidiInPort(), and writeSettings().

|
inline |
References _midiOutNumDevices.
Referenced by writeSettings().

|
inline |
|
inline |
References _pdfViewerLocation.
Referenced by writeSettings().

|
inline |
References _playInsertedNotes.
Referenced by writeSettings().

|
private |
References CACanorus::addRecentDocument().
Referenced by readSettings().


| int CASettings::readSettings | ( | ) |
Opens the settings stored in a config file and sets the local values. This function is usually called on application startup to read and validate various settings and show the settings window, if needed (eg. setup the MIDI devices the first time).
References DEFAULT_ANIMATED_SCROLL, DEFAULT_ANTIALIASING, DEFAULT_AUTO_BAR, DEFAULT_AUTO_RECOVERY_INTERVAL, DEFAULT_BACKGROUND_COLOR, DEFAULT_DISABLED_ELEMENTS_COLOR, DEFAULT_DOCUMENTS_DIRECTORY, DEFAULT_FINALE_LYRICS_BEHAVIOUR, DEFAULT_FOREGROUND_COLOR, DEFAULT_HIDDEN_ELEMENTS_COLOR, DEFAULT_LOCK_SCROLL_PLAYBACK, DEFAULT_MAX_RECENT_DOCUMENTS, DEFAULT_MIDI_IN_NUM_DEVICES, DEFAULT_MIDI_IN_PORT, DEFAULT_MIDI_OUT_NUM_DEVICES, DEFAULT_MIDI_OUT_PORT, DEFAULT_PDF_VIEWER_LOCATION, DEFAULT_PLAY_INSERTED_NOTES, DEFAULT_SAVE_FORMAT, DEFAULT_SELECTED_CONTEXT_COLOR, DEFAULT_SELECTION_AREA_COLOR, DEFAULT_SELECTION_COLOR, DEFAULT_SHADOW_NOTES_IN_OTHER_STAFFS, DEFAULT_SHORTCUTS_DIRECTORY, DEFAULT_SHOW_RULER, DEFAULT_TYPESETTER, DEFAULT_TYPESETTER_LOCATION, DEFAULT_USE_NOTE_CHECKER, DEFAULT_USE_SYSTEM_PDF_VIEWER, DEFAULT_USE_SYSTEM_TYPESETTER, CACanorus::midiDevice(), readRecentDocuments(), setAnimatedScroll(), setAntiAliasing(), setAutoBar(), setAutoRecoveryInterval(), setBackgroundColor(), setDefaultSaveFormat(), setDisabledElementsColor(), setDocumentsDirectory(), setFinaleLyricsBehaviour(), setForegroundColor(), setHiddenElementsColor(), setLatestShortcutsDirectory(), setLockScrollPlayback(), setMaxRecentDocuments(), setMidiInNumDevices(), setMidiInPort(), setMidiOutNumDevices(), setMidiOutPort(), setPdfViewerLocation(), setPlayInsertedNotes(), setSelectedContextColor(), setSelectionAreaColor(), setSelectionColor(), setShadowNotesInOtherStaffs(), setShowRuler(), setTypesetter(), setTypesetterLocation(), setUseNoteChecker(), setUseSystemDefaultPdfViewer(), and setUseSystemDefaultTypesetter().
Referenced by CACanorus::initSettings().


|
inline |
References _selectedContextColor.
Referenced by setSelectedContextColor(), and writeSettings().

|
inline |
References _selectionAreaColor.
Referenced by setSelectionAreaColor(), and writeSettings().

|
inline |
References _selectionColor.
Referenced by setSelectionColor(), and writeSettings().

| void CASettings::setActionList | ( | QList< CASingleAction * > & | oActionList | ) |
Takes a complete action list as it's own Manually: Removes all elements and copies every single in the own list Else: According to Qt doc "assigns the other list to this list" Warning: The actions themselves cannot be copied!
References _oActionList, addSingleAction(), and getSingleAction().

|
inline |
References _animatedScroll.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _antiAliasing.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _autoBar.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _autoRecoveryInterval.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _backgroundColor, and backgroundColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _defaultSaveFormat.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _disabledElementsColor, and disabledElementsColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _documentsDirectory.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _finaleLyricsBehaviour.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _foregroundColor, and foregroundColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _hiddenElementsColor, and hiddenElementsColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _latestShortcutsDirectory.
Referenced by readSettings().

|
inline |
References _lockScrollPlayback.
Referenced by CAMainWin::on_uiLockScrollPlayback_toggled(), and readSettings().

|
inline |
References _maxRecentDocuments.
Referenced by readSettings().

|
inline |
References _midiInNumDevices.
Referenced by readSettings().

| void CASettings::setMidiInPort | ( | int | in | ) |
References _midiInPort, CAMidiDevice::closeInputPort(), CACanorus::midiDevice(), midiInPort(), and CAMidiDevice::openInputPort().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _midiOutNumDevices.
Referenced by readSettings().

|
inline |
References _midiOutPort.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _pdfViewerLocation.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _playInsertedNotes.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _selectedContextColor, and selectedContextColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _selectionAreaColor, and selectionAreaColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _selectionColor, and selectionColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


|
inline |
References _shadowNotesInOtherStaffs.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _showRuler.
Referenced by CAMainWin::on_uiShowRuler_toggled(), and readSettings().

| bool CASettings::setSingleAction | ( | QAction | oSingleAction, |
| int | iPos | ||
| ) |
Updates an action in the action list Return 'true' if the update was successfull Warning: 1) The action will not be copied 2) Only shortcut and no midi information is updated 3) Description cannot be updated
References _oActionList.
|
inline |
References _typesetter.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _typesetterLocation.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _useNoteChecker.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _useSystemDefaultPdfViewer.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _useSystemDefaultTypesetter.
Referenced by CASettingsDialog::applySettings(), and readSettings().

|
inline |
References _shadowNotesInOtherStaffs.
Referenced by writeSettings().

|
inline |
|
inline |
|
inline |
References _typesetterLocation.
Referenced by writeSettings().

|
inline |
References _useNoteChecker.
Referenced by CAMainWin::on_uiTimeSigBeats_valueChanged(), and writeSettings().

|
inline |
References _useSystemDefaultPdfViewer.
Referenced by writeSettings().

|
inline |
References _useSystemDefaultTypesetter.
Referenced by writeSettings().

|
private |
References CACanorus::recentDocumentList().
Referenced by writeSettings().


| void CASettings::writeSettings | ( | ) |
Writes the stored settings to a config file.
References animatedScroll(), antiAliasing(), autoBar(), autoRecoveryInterval(), backgroundColor(), defaultSaveFormat(), disabledElementsColor(), documentsDirectory(), finaleLyricsBehaviour(), foregroundColor(), hiddenElementsColor(), lockScrollPlayback(), maxRecentDocuments(), midiInNumDevices(), midiInPort(), midiOutNumDevices(), midiOutPort(), pdfViewerLocation(), playInsertedNotes(), selectedContextColor(), selectionAreaColor(), selectionColor(), shadowNotesInOtherStaffs(), showRuler(), typesetter(), typesetterLocation(), useNoteChecker(), useSystemDefaultPdfViewer(), useSystemDefaultTypesetter(), and writeRecentDocuments().
Referenced by CASettingsDialog::applySettings(), CACanorus::insertRecentDocument(), CAMainWin::on_uiShowRuler_toggled(), and ~CASettings().


|
private |
Referenced by animatedScroll(), and setAnimatedScroll().
|
private |
Referenced by antiAliasing(), and setAntiAliasing().
|
private |
Referenced by autoBar(), and setAutoBar().
|
private |
Referenced by autoRecoveryInterval(), and setAutoRecoveryInterval().
|
private |
Referenced by backgroundColor(), and setBackgroundColor().
|
private |
Referenced by defaultSaveFormat(), and setDefaultSaveFormat().
|
private |
Referenced by disabledElementsColor(), and setDisabledElementsColor().
|
private |
Referenced by documentsDirectory(), and setDocumentsDirectory().
|
private |
Referenced by finaleLyricsBehaviour(), and setFinaleLyricsBehaviour().
|
private |
Referenced by foregroundColor(), and setForegroundColor().
|
private |
Referenced by hiddenElementsColor(), and setHiddenElementsColor().
|
private |
Referenced by latestShortcutsDirectory(), and setLatestShortcutsDirectory().
|
private |
Referenced by lockScrollPlayback(), and setLockScrollPlayback().
|
private |
Referenced by maxRecentDocuments(), and setMaxRecentDocuments().
|
private |
Referenced by midiInNumDevices(), and setMidiInNumDevices().
|
private |
Referenced by midiInPort(), and setMidiInPort().
|
private |
Referenced by midiOutNumDevices(), and setMidiOutNumDevices().
|
private |
Referenced by midiOutPort(), and setMidiOutPort().
|
private |
Referenced by addSingleAction(), deleteSingleAction(), getActionList(), getSingleAction(), setActionList(), setSingleAction(), and ~CASettings().
|
private |
Referenced by pdfViewerLocation(), and setPdfViewerLocation().
|
private |
Referenced by playInsertedNotes(), and setPlayInsertedNotes().
|
private |
Referenced by getSingleAction(), initSettings(), and ~CASettings().
|
private |
Referenced by selectedContextColor(), and setSelectedContextColor().
|
private |
Referenced by selectionAreaColor(), and setSelectionAreaColor().
|
private |
Referenced by selectionColor(), and setSelectionColor().
|
private |
Referenced by setShadowNotesInOtherStaffs(), and shadowNotesInOtherStaffs().
|
private |
Referenced by setShowRuler(), and showRuler().
|
private |
Referenced by setTypesetter(), and typesetter().
|
private |
Referenced by setTypesetterLocation(), and typesetterLocation().
|
private |
Referenced by setUseNoteChecker(), and useNoteChecker().
|
private |
Referenced by setUseSystemDefaultPdfViewer(), and useSystemDefaultPdfViewer().
|
private |
Referenced by setUseSystemDefaultTypesetter(), and useSystemDefaultTypesetter().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by CASettingsDialog::on_uiBackgroundRevert_clicked(), and readSettings().
|
static |
Referenced by CASettingsDialog::on_uiDisabledElementsRevert_clicked(), and readSettings().
|
static |
Referenced by CASettingsDialog::on_uiDocumentsDirectoryRevert_clicked(), and readSettings().
|
static |
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 readSettings().
|
static |
Referenced by CASettingsDialog::on_uiForegroundRevert_clicked(), and readSettings().
|
static |
Referenced by CASettingsDialog::on_uiHiddenElementsRevert_clicked(), and readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by CASettingsDialog::on_uiSelectedContextRevert_clicked(), and readSettings().
|
static |
Referenced by CASettingsDialog::on_uiSelectionAreaRevert_clicked(), and readSettings().
|
static |
Referenced by CASettingsDialog::on_uiSelectionRevert_clicked(), and readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings(), CAPDFExport::startExport(), and CASVGExport::startExport().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().
|
static |
Referenced by readSettings().