1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation; either version 2
14 * of the License, or (at your option) any later version.
16 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
17 * KIND, either express or implied.
19 ****************************************************************************/
26 class RbSettings
: public QObject
72 //! call this to flush the user Settings
74 //! returns the filename of the usersettings file
75 static QString
userSettingFilename();
76 //! get a value from user settings
77 static QVariant
value(enum UserSettings setting
);
78 //! set a user setting value
79 static void setValue(enum UserSettings setting
, QVariant value
);
80 //! get a user setting from a subvalue (ie for encoders and tts engines)
81 static QVariant
subValue(QString sub
, enum UserSettings setting
);
82 //! set a user setting from a subvalue (ie for encoders and tts engines)
83 static void setSubValue(QString sub
, enum UserSettings setting
, QVariant value
);
86 //! you shouldnt call this, its a fully static calls
88 //! create the setting objects if neccessary
89 static void ensureRbSettingsExists();
90 //! create a settings path, substitute platform, tts and encoder
91 static QString
constructSettingPath(QString path
, QString substitute
= QString());
93 //! pointers to our setting object
94 static QSettings
*userSettings
;