• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

  • tdecore
tdeglobal.h
1 /* This file is part of the KDE libraries
2  Copyright (C) 1999 Sirtaj Singh Kanq <taj@kde.org>
3 
4  This library is free software; you can redistribute it and/or
5  modify it under the terms of the GNU Library General Public
6  License version 2 as published by the Free Software Foundation.
7 
8  This library is distributed in the hope that it will be useful,
9  but WITHOUT ANY WARRANTY; without even the implied warranty of
10  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  Library General Public License for more details.
12 
13  You should have received a copy of the GNU Library General Public License
14  along with this library; see the file COPYING.LIB. If not, write to
15  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  Boston, MA 02110-1301, USA.
17 */
18 #ifndef _TDEGLOBAL_H
19 #define _TDEGLOBAL_H
20 
21 #include "tdelibs_export.h"
22 #include <kinstance.h> // KDE4: class TDEInstance is enough here
23 
24 class KCharsets;
25 class TDEConfig;
26 class TDESharedConfig;
27 class TDEIconLoader;
28 #ifdef __TDE_HAVE_TDEHWLIB
29 class TDEHardwareDevices;
30 class TDEGlobalNetworkManager;
31 #endif
32 class TDELocale;
33 class TDEStandardDirs;
34 class KStaticDeleterBase;
35 class KStaticDeleterList;
36 class KStringDict;
37 class TQString;
38 
48 class TDECORE_EXPORT TDEGlobal
49 {
50 public:
51 
58  static TDEInstance *instance();
59 
64  static TDEStandardDirs *dirs();
65 
70  static TDEConfig *config();
71 
76  static TDESharedConfig *sharedConfig();
77 
82  static TDEIconLoader *iconLoader();
83 
84 #ifdef __TDE_HAVE_TDEHWLIB
85 
89  static TDEHardwareDevices *hardwareDevices();
90 
95  static TDEGlobalNetworkManager *networkManager();
96 #endif
97 
102  static TDELocale *locale();
103 
108  static KCharsets *charsets();
109 
127  static const TQString &staticQString(const char *str);
128 
146  static const TQString &staticQString(const TQString &str);
147 
154  static void registerStaticDeleter(KStaticDeleterBase *d);
155 
162  static void unregisterStaticDeleter(KStaticDeleterBase *d);
163 
170  static void deleteStaticDeleters();
171 
172  //private:
173  static KStringDict *_stringDict;
174  static TDEInstance *_instance;
175  static TDELocale *_locale;
176  static KCharsets *_charsets;
177  static KStaticDeleterList *_staticDeleters;
178 
185  static void setActiveInstance(TDEInstance *d);
186  static TDEInstance *activeInstance() { return _activeInstance; }
187 
188  static TDEInstance *_activeInstance;
189 };
190 
195 #define KMIN(a,b) kMin(a,b)
196 
200 #define KMAX(a,b) kMax(a,b)
201 
205 #define KABS(a) kAbs(a)
206 
211 #define KCLAMP(x,low,high) kClamp(x,low,high)
212 
213 // XXX KDE4: Make kMin, kMax and kClamp return "T" instead of "const T &"!
214 template<class T>
215 inline const T& kMin (const T& a, const T& b) { return a < b ? a : b; }
216 
217 template<class T>
218 inline const T& kMax (const T& a, const T& b) { return b < a ? a : b; }
219 
220 template<class T>
221 inline T kAbs (const T& a) { return a < 0 ? -a : a; }
222 
223 template<class T>
224 inline const T& kClamp( const T& x, const T& low, const T& high )
225 {
226  if ( x < low ) return low;
227  else if ( high < x ) return high;
228  else return x;
229 }
230 
237 int TDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );
238 
239 
254 #endif // _TDEGLOBAL_H
255 
TDEConfig
Access KDE Configuration entries.
Definition: tdeconfig.h:43
KCharsets
Charset font and encoder/decoder handling.
Definition: kcharsets.h:43
TDEGlobal
Access to the KDE global objects.
Definition: tdeglobal.h:48
TDEStandardDirs
Site-independent access to standard KDE directories.
Definition: kstandarddirs.h:125
TDELocale
TDELocale provides support for country specific stuff like the national language. ...
Definition: tdelocale.h:123
TDEIconLoader
Iconloader for KDE.
Definition: kiconloader.h:77
TDESharedConfig
TDEConfig variant using shared memory.
Definition: tdeconfig.h:273
KStaticDeleterBase
Static deleters are used to manage static resources.
Definition: kstaticdeleter.h:39
TDEInstance
Access to KDE global objects for use in shared libraries.
Definition: kinstance.h:47

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  •     tdecore
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  • tdeioslave
  •   http
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.8
This website is maintained by Timothy Pearson.