Fix crash if key bindings specified in profile cannot be found. Improve
[personal-kdebase.git] / apps / kinfocenter / global.h
blob78513be55a3c565b39cdf92ff1f5123122ba00d7
1 /*
2 Copyright (c) 2000 Matthias Elter <elter@kde.org>
4 This program is free software; you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program; if not, write to the Free Software
16 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
20 #ifndef _GLOBAL_H_
21 #define _GLOBAL_H_
23 #define KINFOCENTER_ICON_NAME "hwinfo"
25 #include <QString>
26 #include <QStringList>
28 class KCGlobal {
29 public:
31 static void init();
33 static bool root() {
34 return _root;
36 static QStringList types() {
37 return _types;
39 static QString userName() {
40 return _uname;
42 static QString hostName() {
43 return _hname;
45 static QString kdeVersion() {
46 return _kdeversion;
48 static QString systemName() {
49 return _isystem;
51 static QString systemRelease() {
52 return _irelease;
54 static QString systemVersion() {
55 return _iversion;
57 static QString systemMachine() {
58 return _imachine;
60 static QString baseGroup();
62 static void setRoot(bool r) {
63 _root = r;
65 static void setType(const QByteArray& s);
66 static void setUserName(const QString& n) {
67 _uname = n;
69 static void setHostName(const QString& n) {
70 _hname = n;
72 static void setKDEVersion(const QString& n) {
73 _kdeversion = n;
75 static void setSystemName(const QString& n) {
76 _isystem = n;
78 static void setSystemRelease(const QString& n) {
79 _irelease = n;
81 static void setSystemVersion(const QString& n) {
82 _iversion = n;
84 static void setSystemMachine(const QString& n) {
85 _imachine = n;
88 private:
89 static bool _root;
90 static QStringList _types;
91 static QString _uname, _hname, _isystem, _irelease, _iversion, _imachine, _kdeversion;
92 static QString _baseGroup;
95 #endif