summaryrefslogtreecommitdiffstats
path: root/kcontrol/kcontrol/global.h
blob: 71fbb55c3d32ada5079c192b570b344be7d4d3e9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
  Copyright (c) 2000 Matthias Elter <elter@kde.org>

  This program is free software; you can redistribute it and/or modify
  it under the terms of the GNU General Public License as published by
  the Free Software Foundation; either version 2 of the License, or
  (at your option) any later version.

  This program is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  GNU General Public License for more details.

  You should have received a copy of the GNU General Public License
  along with this program; if not, write to the Free Software
  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.

*/

#ifndef __global_h__
#define __global_h__

#include <kicontheme.h>

#include <qstring.h>
#include <qstringlist.h>
#include <qcstring.h>

enum IndexViewMode {Icon, Tree};

class KCGlobal
{
public:

  static void init();

  static bool isInfoCenter() { return _infocenter; }
  static bool root() { return _root; }
  static QStringList types() { return _types; }
  static QString userName() { return _uname; }
  static QString hostName() { return _hname; }
  static QString kdeVersion() { return _kdeversion; }
  static QString systemName() { return _isystem; }
  static QString systemRelease() { return _irelease; }
  static QString systemVersion() { return _iversion; }
  static QString systemMachine() { return _imachine; }
  static IndexViewMode viewMode() { return _viewmode; }
  static KIcon::StdSizes iconSize() { return _iconsize; }
  static QString baseGroup();

  static void setIsInfoCenter(bool b) { _infocenter = b; }
  static void setRoot(bool r) { _root = r; }
  static void setType(const QCString& s);
  static void setUserName(const QString& n){ _uname = n; }
  static void setHostName(const QString& n){ _hname = n; }
  static void setKDEVersion(const QString& n){ _kdeversion = n; }
  static void setSystemName(const QString& n){ _isystem = n; }
  static void setSystemRelease(const QString& n){ _irelease = n; }
  static void setSystemVersion(const QString& n){ _iversion = n; }
  static void setSystemMachine(const QString& n){ _imachine = n; }
  static void setViewMode(IndexViewMode m) { _viewmode = m; }
  static void setIconSize(KIcon::StdSizes s) { _iconsize = s; }

  static void repairAccels( QWidget * tw );

private:
  static bool _root;
  static bool _infocenter;
  static QStringList _types;
  static QString _uname, _hname, _isystem, _irelease, _iversion, _imachine, _kdeversion;
  static IndexViewMode _viewmode;
  static KIcon::StdSizes _iconsize;
  static QString _baseGroup;
};

#endif