Fix wpsbuild to properly generate "-" for theme related settings (to get the default...
[kugel-rb.git] / rbutil / rbutilqt / base / systeminfo.h
blob76d00d4949a3e3774a652c1a95117c6218016ff3
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 VoiceUrl,
46 DoomUrl,
47 ReleaseUrl,
48 DailyUrl,
49 ServerConfUrl,
50 GenlangUrl,
51 ThemesUrl,
52 RbutilUrl,
53 BleedingInfo,
54 CurPlatformName,
55 CurManual,
56 CurBootloaderMethod,
57 CurBootloaderName,
58 CurBootloaderFile,
59 CurEncoder,
60 CurBrand,
61 CurName,
62 CurBuildserverModel,
63 CurConfigureModel,
66 enum PlatformType {
67 PlatformAll,
68 PlatformAllDisabled,
69 PlatformBase,
70 PlatformBaseDisabled,
71 PlatformVariant,
72 PlatformVariantDisabled
75 //! return a list of all platforms (rbutil internal names)
76 static QStringList platforms(enum PlatformType type = PlatformAll,
77 QString variant="");
78 //! returns a list of all languages
79 static QStringList languages(void);
80 //! maps a platform to its name
81 static QString name(QString platform);
82 //! maps a platform to its brand
83 static QString brand(QString platform);
84 //! returns a map of usb-ids and their targets
85 static QMap<int, QString> usbIdMap(enum MapType);
86 //! get a value from system settings
87 static QVariant value(enum SystemInfos info);
88 //! get a value from system settings for a named platform.
89 static QVariant platformValue(QString platform, enum SystemInfos info);
91 private:
92 //! you shouldnt call this, its a fully static calls
93 SystemInfo() {}
94 //! create the setting objects if neccessary
95 static void ensureSystemInfoExists();
96 //! pointers to our setting objects
97 static QSettings *systemInfos;
100 #endif