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

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% data on M$ systems. See
| CASettings::CASettings | ( | QObject * | parent = 0 | ) |
Create a new settings instance using the default config file for a local user.
| CASettings::CASettings | ( | const QString & | fileName, |
| QObject * | parent = 0 |
||
| ) |
Create a new settings instance using the config file fileName.
| CASettings::~CASettings | ( | ) | [virtual] |
| bool CASettings::antiAliasing | ( | ) | [inline] |
References _antiAliasing.
Referenced by writeSettings().

| bool CASettings::autoBar | ( | ) | [inline] |
References _autoBar.
Referenced by CAMainWin::insertMusElementAt(), and writeSettings().

| int CASettings::autoRecoveryInterval | ( | ) | [inline] |
References _autoRecoveryInterval.
Referenced by writeSettings().

| QColor CASettings::backgroundColor | ( | ) | [inline] |
References _backgroundColor.
Referenced by setBackgroundColor(), and writeSettings().

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

| const QString CASettings::defaultSettingsPath | ( | ) | [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().

| QColor CASettings::disabledElementsColor | ( | ) | [inline] |
References _disabledElementsColor.
Referenced by setDisabledElementsColor(), and writeSettings().

| QDir CASettings::documentsDirectory | ( | ) | [inline] |
References _documentsDirectory.
Referenced by writeSettings().

| bool CASettings::finaleLyricsBehaviour | ( | ) | [inline] |
References _finaleLyricsBehaviour.
Referenced by CAMainWin::onTextEditKeyPressEvent(), and writeSettings().

| QColor CASettings::foregroundColor | ( | ) | [inline] |
References _foregroundColor.
Referenced by setForegroundColor(), and writeSettings().

| QColor CASettings::hiddenElementsColor | ( | ) | [inline] |
References _hiddenElementsColor.
Referenced by setHiddenElementsColor(), and writeSettings().

| int CASettings::maxRecentDocuments | ( | ) | [inline] |
References _maxRecentDocuments.
Referenced by writeSettings().

| int CASettings::midiInPort | ( | ) | [inline] |
References _midiInPort.
Referenced by setMidiInPort(), CASettingsDialog::setupPages(), and writeSettings().

| int CASettings::midiOutPort | ( | ) | [inline] |
References _midiOutPort.
Referenced by CASettingsDialog::setupPages(), and writeSettings().

| QString CASettings::pdfViewerLocation | ( | ) | [inline] |
References _pdfViewerLocation.
Referenced by writeSettings().

| bool CASettings::playInsertedNotes | ( | ) | [inline] |
References _playInsertedNotes.
Referenced by CAMainWin::insertMusElementAt(), and writeSettings().

| void CASettings::readRecentDocuments | ( | ) | [private] |
References CACanorus::addRecentDocument().
Referenced by readSettings().


| int CASettings::readSettings | ( | ) |
Opens the settings stored in a config file and sets the local values. Returns Undefined, if everything went fine or appropriate settings page, if a file or value wasn't set and settings window should be shown (eg. setup the MIDI devices the first time).
References 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_MAX_RECENT_DOCUMENTS, DEFAULT_MIDI_IN_PORT, 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_TYPESETTER, DEFAULT_TYPESETTER_LOCATION, DEFAULT_USE_SYSTEM_PDF_VIEWER, DEFAULT_USE_SYSTEM_TYPESETTER, CACanorus::midiDevice(), readRecentDocuments(), setAntiAliasing(), setAutoBar(), setAutoRecoveryInterval(), setBackgroundColor(), setDefaultSaveFormat(), setDisabledElementsColor(), setDocumentsDirectory(), setFinaleLyricsBehaviour(), setForegroundColor(), setHiddenElementsColor(), setMaxRecentDocuments(), setMidiInPort(), setMidiOutPort(), setPdfViewerLocation(), setPlayInsertedNotes(), setSelectedContextColor(), setSelectionAreaColor(), setSelectionColor(), setShadowNotesInOtherStaffs(), setTypesetter(), setTypesetterLocation(), setUseSystemDefaultPdfViewer(), and setUseSystemDefaultTypesetter().
Referenced by CACanorus::initSettings().


| QColor CASettings::selectedContextColor | ( | ) | [inline] |
References _selectedContextColor.
Referenced by setSelectedContextColor(), and writeSettings().

| QColor CASettings::selectionAreaColor | ( | ) | [inline] |
References _selectionAreaColor.
Referenced by setSelectionAreaColor(), and writeSettings().

| QColor CASettings::selectionColor | ( | ) | [inline] |
References _selectionColor.
Referenced by setSelectionColor(), and writeSettings().

| void CASettings::setAntiAliasing | ( | bool | a | ) | [inline] |
References _antiAliasing.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setAutoBar | ( | bool | b | ) | [inline] |
References _autoBar.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setAutoRecoveryInterval | ( | int | interval | ) | [inline] |
References _autoRecoveryInterval.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setBackgroundColor | ( | QColor | backgroundColor | ) | [inline] |
References _backgroundColor, and backgroundColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setDefaultSaveFormat | ( | CAFileFormats::CAFileFormatType | t | ) | [inline] |
References _defaultSaveFormat.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setDisabledElementsColor | ( | QColor | disabledElementsColor | ) | [inline] |
References _disabledElementsColor, and disabledElementsColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setDocumentsDirectory | ( | QDir | d | ) | [inline] |
References _documentsDirectory.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setFinaleLyricsBehaviour | ( | bool | b | ) | [inline] |
References _finaleLyricsBehaviour.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setForegroundColor | ( | QColor | foregroundColor | ) | [inline] |
References _foregroundColor, and foregroundColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setHiddenElementsColor | ( | QColor | hiddenElementsColor | ) | [inline] |
References _hiddenElementsColor, and hiddenElementsColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setMaxRecentDocuments | ( | int | r | ) | [inline] |
References _maxRecentDocuments.
Referenced by readSettings().

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


| void CASettings::setMidiOutPort | ( | int | out | ) | [inline] |
References _midiOutPort.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setPdfViewerLocation | ( | QString | pl | ) | [inline] |
References _pdfViewerLocation.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setPlayInsertedNotes | ( | bool | b | ) | [inline] |
References _playInsertedNotes.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setSelectedContextColor | ( | QColor | selectedContextColor | ) | [inline] |
References _selectedContextColor, and selectedContextColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setSelectionAreaColor | ( | QColor | selectionAreaColor | ) | [inline] |
References _selectionAreaColor, and selectionAreaColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setSelectionColor | ( | QColor | selectionColor | ) | [inline] |
References _selectionColor, and selectionColor().
Referenced by CASettingsDialog::applySettings(), and readSettings().


| void CASettings::setShadowNotesInOtherStaffs | ( | bool | b | ) | [inline] |
References _shadowNotesInOtherStaffs.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setTypesetter | ( | CATypesetter::CATypesetterType | t | ) | [inline] |
References _typesetter.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setTypesetterLocation | ( | QString | tl | ) | [inline] |
References _typesetterLocation.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setUseSystemDefaultPdfViewer | ( | bool | s | ) | [inline] |
References _useSystemDefaultPdfViewer.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| void CASettings::setUseSystemDefaultTypesetter | ( | bool | s | ) | [inline] |
References _useSystemDefaultTypesetter.
Referenced by CASettingsDialog::applySettings(), and readSettings().

| bool CASettings::shadowNotesInOtherStaffs | ( | ) | [inline] |
References _shadowNotesInOtherStaffs.
Referenced by CAScoreViewPort::paintEvent(), and writeSettings().

| CATypesetter::CATypesetterType CASettings::typesetter | ( | ) | [inline] |
| QString CASettings::typesetterLocation | ( | ) | [inline] |
References _typesetterLocation.
Referenced by writeSettings().

| bool CASettings::useSystemDefaultPdfViewer | ( | ) | [inline] |
References _useSystemDefaultPdfViewer.
Referenced by writeSettings().

| bool CASettings::useSystemDefaultTypesetter | ( | ) | [inline] |
References _useSystemDefaultTypesetter.
Referenced by writeSettings().

| void CASettings::writeRecentDocuments | ( | ) | [private] |
References CACanorus::recentDocumentList().
Referenced by writeSettings().


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


bool CASettings::_antiAliasing [private] |
Referenced by antiAliasing(), and setAntiAliasing().
bool CASettings::_autoBar [private] |
Referenced by autoBar(), and setAutoBar().
int CASettings::_autoRecoveryInterval [private] |
Referenced by autoRecoveryInterval(), and setAutoRecoveryInterval().
QColor CASettings::_backgroundColor [private] |
Referenced by backgroundColor(), and setBackgroundColor().
Referenced by defaultSaveFormat(), and setDefaultSaveFormat().
QColor CASettings::_disabledElementsColor [private] |
Referenced by disabledElementsColor(), and setDisabledElementsColor().
QDir CASettings::_documentsDirectory [private] |
Referenced by documentsDirectory(), and setDocumentsDirectory().
bool CASettings::_finaleLyricsBehaviour [private] |
Referenced by finaleLyricsBehaviour(), and setFinaleLyricsBehaviour().
QColor CASettings::_foregroundColor [private] |
Referenced by foregroundColor(), and setForegroundColor().
QColor CASettings::_hiddenElementsColor [private] |
Referenced by hiddenElementsColor(), and setHiddenElementsColor().
int CASettings::_maxRecentDocuments [private] |
Referenced by maxRecentDocuments(), and setMaxRecentDocuments().
int CASettings::_midiInPort [private] |
Referenced by midiInPort(), and setMidiInPort().
int CASettings::_midiOutPort [private] |
Referenced by midiOutPort(), and setMidiOutPort().
QString CASettings::_pdfViewerLocation [private] |
Referenced by pdfViewerLocation(), and setPdfViewerLocation().
bool CASettings::_playInsertedNotes [private] |
Referenced by playInsertedNotes(), and setPlayInsertedNotes().
QColor CASettings::_selectedContextColor [private] |
Referenced by selectedContextColor(), and setSelectedContextColor().
QColor CASettings::_selectionAreaColor [private] |
Referenced by selectionAreaColor(), and setSelectionAreaColor().
QColor CASettings::_selectionColor [private] |
Referenced by selectionColor(), and setSelectionColor().
bool CASettings::_shadowNotesInOtherStaffs [private] |
Referenced by setShadowNotesInOtherStaffs(), and shadowNotesInOtherStaffs().
Referenced by setTypesetter(), and typesetter().
QString CASettings::_typesetterLocation [private] |
Referenced by setTypesetterLocation(), and typesetterLocation().
bool CASettings::_useSystemDefaultPdfViewer [private] |
Referenced by setUseSystemDefaultPdfViewer(), and useSystemDefaultPdfViewer().
bool CASettings::_useSystemDefaultTypesetter [private] |
Referenced by setUseSystemDefaultTypesetter(), and useSystemDefaultTypesetter().
const bool CASettings::DEFAULT_ANTIALIASING = true [static] |
Referenced by readSettings().
const bool CASettings::DEFAULT_AUTO_BAR = true [static] |
Referenced by readSettings().
const int CASettings::DEFAULT_AUTO_RECOVERY_INTERVAL = 1 [static] |
Referenced by readSettings().
const QColor CASettings::DEFAULT_BACKGROUND_COLOR = QColor(255, 255, 240) [static] |
Referenced by CASettingsDialog::on_uiBackgroundRevert_clicked(), and readSettings().
const QColor CASettings::DEFAULT_DISABLED_ELEMENTS_COLOR = Qt::gray [static] |
Referenced by CASettingsDialog::on_uiDisabledElementsRevert_clicked(), and readSettings().
const QDir CASettings::DEFAULT_DOCUMENTS_DIRECTORY = QDir::home() [static] |
Referenced by CASettingsDialog::on_uiDocumentsDirectoryRevert_clicked(), and readSettings().
const bool CASettings::DEFAULT_FINALE_LYRICS_BEHAVIOUR = false [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().
const QColor CASettings::DEFAULT_FOREGROUND_COLOR = Qt::black [static] |
Referenced by CASettingsDialog::on_uiForegroundRevert_clicked(), and readSettings().
const QColor CASettings::DEFAULT_HIDDEN_ELEMENTS_COLOR = Qt::green [static] |
Referenced by CASettingsDialog::on_uiHiddenElementsRevert_clicked(), and readSettings().
const int CASettings::DEFAULT_MAX_RECENT_DOCUMENTS = 15 [static] |
Referenced by readSettings().
const int CASettings::DEFAULT_MIDI_IN_PORT = -1 [static] |
Referenced by readSettings().
const int CASettings::DEFAULT_MIDI_OUT_PORT = -1 [static] |
Referenced by readSettings().
const QString CASettings::DEFAULT_PDF_VIEWER_LOCATION = "" [static] |
Referenced by readSettings().
const bool CASettings::DEFAULT_PLAY_INSERTED_NOTES = true [static] |
Referenced by readSettings().
Referenced by readSettings().
const QColor CASettings::DEFAULT_SELECTED_CONTEXT_COLOR = Qt::blue [static] |
Referenced by CASettingsDialog::on_uiSelectedContextRevert_clicked(), and readSettings().
const QColor CASettings::DEFAULT_SELECTION_AREA_COLOR = QColor( 255, 0, 80, 70 ) [static] |
Referenced by CASettingsDialog::on_uiSelectionAreaRevert_clicked(), and readSettings().
const QColor CASettings::DEFAULT_SELECTION_COLOR = Qt::red [static] |
Referenced by CASettingsDialog::on_uiSelectionRevert_clicked(), and readSettings().
const bool CASettings::DEFAULT_SHADOW_NOTES_IN_OTHER_STAFFS = false [static] |
Referenced by readSettings().
const CATypesetter::CATypesetterType CASettings::DEFAULT_TYPESETTER = CATypesetter::LilyPond [static] |
Referenced by readSettings().
const QString CASettings::DEFAULT_TYPESETTER_LOCATION [static] |
Referenced by readSettings(), CAPDFExport::startExport(), and CASVGExport::startExport().
const bool CASettings::DEFAULT_USE_SYSTEM_PDF_VIEWER = true [static] |
Referenced by readSettings().
const bool CASettings::DEFAULT_USE_SYSTEM_TYPESETTER = true [static] |
Referenced by readSettings().
1.8.0