Sort rbutil.ini general section and rename voice_url for clarity.
[kugel-rb.git] / rbutil / rbutilqt / base / systeminfo.h
blob5e5b60770ae0ebfc983dbebf0b1d4ac70d77644e
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
9 * Copyright (C) 2010 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 SYSTEMINFO_H
23 #define SYSTEMINFO_H
25 #include <QtCore>
27 class SystemInfo : public QObject
29 Q_OBJECT
30 public:
31 //! Type of requested usb-id map
32 enum MapType {
33 MapDevice,
34 MapError,
35 MapIncompatible,
38 //! All system settings
39 enum SystemInfos {
40 ManualUrl,
41 BleedingUrl,
42 BootloaderUrl,
43 BootloaderInfoUrl,
44 FontUrl,
45 DailyVoiceUrl,
46 DoomUrl,
47 ReleaseUrl,
48 ReleaseVoiceUrl,
49 DailyUrl,
50 ServerConfUrl,
51 GenlangUrl,
52 ThemesUrl,
53 ThemesInfoUrl,
54 RbutilUrl,
55 BleedingInfo,
56 CurPlatformName,
57 CurManual,
58 CurBootloaderMethod,
59 CurBootloaderName,
60 CurBootloaderFile,
61 CurEncoder,
62 CurBrand,
63 CurName,
64 CurBuildserverModel,
65 CurConfigureModel,
68 enum PlatformType {
69 PlatformAll,
70 PlatformAllDisabled,
71 PlatformBase,
72 PlatformBaseDisabled,
73 PlatformVariant,
74 PlatformVariantDisabled
77 //! return a list of all platforms (rbutil internal names)
78 static QStringList platforms(enum PlatformType type = PlatformAll,
79 QString variant="");
80 //! returns a list of all languages
81 static QStringList languages(void);
82 //! returns a map of usb-ids and their targets
83 static QMap<int, QString> usbIdMap(enum MapType);
84 //! get a value from system settings
85 static QVariant value(enum SystemInfos info);
86 //! get a value from system settings for a named platform.
87 static QVariant platformValue(QString platform, enum SystemInfos info);
89 private:
90 //! you shouldnt call this, its a fully static calls
91 SystemInfo() {}
92 //! create the setting objects if neccessary
93 static void ensureSystemInfoExists();
94 //! pointers to our setting objects
95 static QSettings *systemInfos;
98 #endif