• 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 class TDEHardwareDevices;
29 class TDEGlobalNetworkManager;
30 class TDELocale;
31 class TDEStandardDirs;
32 class KStaticDeleterBase;
33 class KStaticDeleterList;
34 class KStringDict;
35 class TQString;
36 
46 class TDECORE_EXPORT TDEGlobal
47 {
48 public:
49 
56  static TDEInstance *instance();
57 
62  static TDEStandardDirs *dirs();
63 
68  static TDEConfig *config();
69 
74  static TDESharedConfig *sharedConfig();
75 
80  static TDEIconLoader *iconLoader();
81 
86  static TDEHardwareDevices *hardwareDevices();
87 
92  static TDEGlobalNetworkManager *networkManager();
93 
98  static TDELocale *locale();
99 
104  static KCharsets *charsets();
105 
123  static const TQString &staticQString(const char *str);
124 
142  static const TQString &staticQString(const TQString &str);
143 
150  static void registerStaticDeleter(KStaticDeleterBase *d);
151 
158  static void unregisterStaticDeleter(KStaticDeleterBase *d);
159 
166  static void deleteStaticDeleters();
167 
168  //private:
169  static KStringDict *_stringDict;
170  static TDEInstance *_instance;
171  static TDELocale *_locale;
172  static KCharsets *_charsets;
173  static KStaticDeleterList *_staticDeleters;
174 
181  static void setActiveInstance(TDEInstance *d);
182  static TDEInstance *activeInstance() { return _activeInstance; }
183 
184  static TDEInstance *_activeInstance;
185 };
186 
191 #define KMIN(a,b) kMin(a,b)
192 
196 #define KMAX(a,b) kMax(a,b)
197 
201 #define KABS(a) kAbs(a)
202 
207 #define KCLAMP(x,low,high) kClamp(x,low,high)
208 
209 // XXX KDE4: Make kMin, kMax and kClamp return "T" instead of "const T &"!
210 template<class T>
211 inline const T& kMin (const T& a, const T& b) { return a < b ? a : b; }
212 
213 template<class T>
214 inline const T& kMax (const T& a, const T& b) { return b < a ? a : b; }
215 
216 template<class T>
217 inline T kAbs (const T& a) { return a < 0 ? -a : a; }
218 
219 template<class T>
220 inline const T& kClamp( const T& x, const T& low, const T& high )
221 {
222  if ( x < low ) return low;
223  else if ( high < x ) return high;
224  else return x;
225 }
226 
233 int TDECORE_EXPORT kasciistricmp( const char *str1, const char *str2 );
234 
235 
250 #endif // _TDEGLOBAL_H
251 

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
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.8.1.2
This website is maintained by Timothy Pearson.