1 /***************************************************************************
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id: rbsettings.h 16059 2008-01-11 23:59:12Z domonoky $
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
27 class RbSettings
: public QObject
34 //! open the settings files
36 //! call this to flush the user Settings
39 // returns the filename of the usersettings file
40 QString
userSettingFilename();
42 //! access functions for the settings
47 QString
bleedingUrl();
48 QString
lastRelease();
50 QString
bootloaderUrl();
51 QString
bootloaderInfoUrl();
55 QString
downloadUrl();
57 QString
serverConfUrl();
62 QString
bleedingInfo();
64 QString
lastTalkedFolder();
65 QString
voiceLanguage();
67 QString
ttsPath(QString tts
);
68 QString
ttsOptions(QString tts
);
69 QString
ttsVoice(QString tts
);
70 int ttsSpeed(QString tts
);
71 QString
ttsLang(QString tts
);
73 QString
encoderPath(QString enc
);
74 QString
encoderOptions(QString enc
);
75 double encoderQuality(QString enc
);
76 int encoderComplexity(QString enc
);
77 double encoderVolume(QString enc
);
78 bool encoderNarrowband(QString enc
);
80 QStringList
allPlatforms();
81 QString
name(QString plattform
);
82 QString
brand(QString plattform
);
83 QStringList
allLanguages();
84 QMap
<int, QString
> usbIdMap();
85 QMap
<int, QString
> usbIdErrorMap();
86 QMap
<int, QString
> usbIdIncompatMap();
88 bool curNeedsBootloader();
91 QString
curPlatform();
92 QString
curPlatformName();
95 QString
curBootloaderMethod();
96 QString
curBootloaderName();
97 QString
curVoiceName();
101 QString
curResolution();
105 void setOfPath(QString path
);
106 void setCachePath(QString path
);
107 void setBuild(QString build
);
108 void setLastTalkedDir(QString dir
);
109 void setVoiceLanguage(QString lang
);
110 void setWavtrimTh(int th
);
111 void setProxy(QString proxy
);
112 void setProxyType(QString proxytype
);
113 void setLang(QString lang
);
114 void setMountpoint(QString mp
);
115 void setCurPlatform(QString platt
);
116 void setCacheDisable(bool on
);
117 void setCacheOffline(bool on
);
118 void setCurTTS(QString tts
);
119 void setTTSPath(QString tts
, QString path
);
120 void setTTSOptions(QString tts
, QString options
);
121 void setTTSSpeed(QString tts
, int speed
);
122 void setTTSVoice(QString tts
, QString voice
);
123 void setTTSLang(QString tts
, QString lang
);
124 void setTTSUseSapi4(bool value
);
125 void setEncoderPath(QString enc
, QString path
);
126 void setEncoderOptions(QString enc
, QString options
);
127 void setEncoderQuality(QString enc
, double q
);
128 void setEncoderComplexity(QString enc
, int c
);
129 void setEncoderVolume(QString enc
,double v
);
130 void setEncoderNarrowband(QString enc
,bool nb
);
134 //! helper function to get an entry in the current platform section
135 QVariant
deviceSettingCurGet(QString entry
,QString def
="");
136 //! helper function to get an entry out of a group in the userSettings
137 QVariant
userSettingsGroupGet(QString group
,QString entry
,QVariant def
="");
138 //! helper function to set an entry in a group in the userSettings
139 void userSettingsGroupSet(QString group
,QString entry
,QVariant value
);
142 //! private copy constructors to prvent copying
143 RbSettings
& operator= (const RbSettings
& other
)
144 { (void)other
; return *this; }
145 RbSettings(const RbSettings
& other
) :QObject()
148 //! pointers to our setting objects
150 QSettings
*userSettings
;