Add more simulator stubs. This should get rid of the last reds
[kugel-rb.git] / rbutil / rbutilqt / rbsettings.h
blob97a54fcf5d13c2157f72ce1a5125b5ee4e2316e9
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2007 by Dominik Wenger
10 * $Id$
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef RBSETTINGS_H
23 #define RBSETTINGS_H
25 #include <QtCore>
27 class QSettings;
29 class RbSettings : public QObject
31 Q_OBJECT
33 public:
34 RbSettings() {}
36 //! open the settings files
37 void open();
38 //! call this to flush the user Settings
39 void sync();
41 // returns the filename of the usersettings file
42 QString userSettingFilename();
44 //! access functions for the settings
45 QString curVersion();
46 bool cacheOffline();
47 bool cacheDisabled();
48 QString mountpoint();
49 QString manualUrl();
50 QString bleedingUrl();
51 QString lastRelease(QString platform);
52 QString cachePath();
53 QString bootloaderUrl();
54 QString bootloaderInfoUrl();
55 QString fontUrl();
56 QString voiceUrl();
57 QString doomUrl();
58 QString releaseUrl();
59 QString dailyUrl();
60 QString serverConfUrl();
61 QString themeUrl();
62 QString genlangUrl();
63 QString proxyType();
64 QString proxy();
65 QString bleedingInfo();
66 QString ofPath();
67 QString lastTalkedFolder();
68 QString voiceLanguage();
69 int wavtrimTh();
70 QString ttsPath(QString tts);
71 QString ttsOptions(QString tts);
72 QString ttsVoice(QString tts);
73 int ttsSpeed(QString tts);
74 QString ttsLang(QString tts);
75 bool ttsUseSapi4();
76 QString encoderPath(QString enc);
77 QString encoderOptions(QString enc);
78 double encoderQuality(QString enc);
79 int encoderComplexity(QString enc);
80 double encoderVolume(QString enc);
81 bool encoderNarrowband(QString enc);
83 QStringList allPlatforms();
84 QString name(QString plattform);
85 QString brand(QString plattform);
86 QStringList allLanguages();
87 QString nameOfTargetId(int id);
88 QMap<int, QString> usbIdMap();
89 QMap<int, QString> usbIdErrorMap();
90 QMap<int, QString> usbIdIncompatMap();
92 bool curNeedsBootloader();
93 QString curBrand();
94 QString curName();
95 QString curPlatform();
96 QString curPlatformName();
97 QString curManual();
98 bool curReleased();
99 QString curBootloaderMethod();
100 QString curBootloaderName();
101 QString curVoiceName();
102 QString curLang();
103 QString curEncoder();
104 QString curTTS();
105 QString curResolution();
106 QString curBootloaderFile();
107 int curTargetId();
109 //! Set Functions
110 void setCurVersion(QString version);
111 void setOfPath(QString path);
112 void setCachePath(QString path);
113 void setBuild(QString build);
114 void setLastTalkedDir(QString dir);
115 void setVoiceLanguage(QString lang);
116 void setWavtrimTh(int th);
117 void setProxy(QString proxy);
118 void setProxyType(QString proxytype);
119 void setLang(QString lang);
120 void setMountpoint(QString mp);
121 void setCurPlatform(QString platt);
122 void setCacheDisable(bool on);
123 void setCacheOffline(bool on);
124 void setCurTTS(QString tts);
125 void setTTSPath(QString tts, QString path);
126 void setTTSOptions(QString tts, QString options);
127 void setTTSSpeed(QString tts, int speed);
128 void setTTSVoice(QString tts, QString voice);
129 void setTTSLang(QString tts, QString lang);
130 void setTTSUseSapi4(bool value);
131 void setEncoderPath(QString enc, QString path);
132 void setEncoderOptions(QString enc, QString options);
133 void setEncoderQuality(QString enc, double q);
134 void setEncoderComplexity(QString enc, int c);
135 void setEncoderVolume(QString enc,double v);
136 void setEncoderNarrowband(QString enc,bool nb);
138 private:
140 //! helper function to get an entry in the current platform section
141 QVariant deviceSettingCurGet(QString entry,QString def="");
142 //! helper function to get an entry out of a group in the userSettings
143 QVariant userSettingsGroupGet(QString group,QString entry,QVariant def="");
144 //! helper function to set an entry in a group in the userSettings
145 void userSettingsGroupSet(QString group,QString entry,QVariant value);
148 //! private copy constructors to prvent copying
149 RbSettings& operator= (const RbSettings& other)
150 { (void)other; return *this; }
151 RbSettings(const RbSettings& other) :QObject()
152 { (void)other; }
154 //! pointers to our setting objects
155 QSettings *devices;
156 QSettings *userSettings;
160 #endif