Upon autodetection tell the user if an incompatible player model (newer Sansa / Nano...
[Rockbox.git] / rbutil / rbutilqt / rbsettings.h
blob89064aa899a06e030d0472e092620866c097b726
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
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 ****************************************************************************/
20 #ifndef RBSETTINGS_H
21 #define RBSETTINGS_H
23 #include <QtCore>
25 class QSettings;
27 class RbSettings : public QObject
29 Q_OBJECT
31 public:
32 RbSettings() {}
34 //! open the settings files
35 void open();
36 //! call this to flush the user Settings
37 void sync();
39 // returns the filename of the usersettings file
40 QString userSettingFilename();
42 //! access functions for the settings
43 bool cacheOffline();
44 bool cacheDisabled();
45 QString mountpoint();
46 QString manualUrl();
47 QString bleedingUrl();
48 QString lastRelease();
49 QString cachePath();
50 QString bootloaderUrl();
51 QString bootloaderInfoUrl();
52 QString fontUrl();
53 QString voiceUrl();
54 QString doomUrl();
55 QString downloadUrl();
56 QString dailyUrl();
57 QString serverConfUrl();
58 QString themeUrl();
59 QString genlangUrl();
60 QString proxyType();
61 QString proxy();
62 QString bleedingInfo();
63 QString ofPath();
64 QString lastTalkedFolder();
65 QString voiceLanguage();
66 int wavtrimTh();
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);
72 bool ttsUseSapi4();
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();
89 QString curBrand();
90 QString curName();
91 QString curPlatform();
92 QString curPlatformName();
93 QString curManual();
94 bool curReleased();
95 QString curBootloaderMethod();
96 QString curBootloaderName();
97 QString curVoiceName();
98 QString curLang();
99 QString curEncoder();
100 QString curTTS();
101 QString curResolution();
102 int curTargetId();
104 void setOfPath(QString path);
105 void setCachePath(QString path);
106 void setBuild(QString build);
107 void setLastTalkedDir(QString dir);
108 void setVoiceLanguage(QString lang);
109 void setWavtrimTh(int th);
110 void setProxy(QString proxy);
111 void setProxyType(QString proxytype);
112 void setLang(QString lang);
113 void setMountpoint(QString mp);
114 void setCurPlatform(QString platt);
115 void setCacheDisable(bool on);
116 void setCacheOffline(bool on);
117 void setCurTTS(QString tts);
118 void setCurEncoder(QString enc);
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);
132 private:
133 QSettings *devices;
134 QSettings *userSettings;
138 #endif