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

tdecore

Static Public Member Functions | Static Public Attributes | Related Functions | List of all members
TDEGlobal Class Reference

#include <tdeglobal.h>

Static Public Member Functions

static TDEInstance * instance ()
 
static TDEStandardDirs * dirs ()
 
static TDEConfig * config ()
 
static TDESharedConfig * sharedConfig ()
 
static TDEIconLoader * iconLoader ()
 
static TDELocale * locale ()
 
static KCharsets * charsets ()
 
static const TQString & staticQString (const char *str)
 
static const TQString & staticQString (const TQString &str)
 
static void registerStaticDeleter (KStaticDeleterBase *d)
 
static void unregisterStaticDeleter (KStaticDeleterBase *d)
 
static void deleteStaticDeleters ()
 
static void setActiveInstance (TDEInstance *d)
 
static TDEInstance * activeInstance ()
 

Static Public Attributes

static KStringDict * _stringDict = 0
 
static TDEInstance * _instance = 0
 
static TDELocale * _locale = 0
 
static KCharsets * _charsets = 0
 
static KStaticDeleterList * _staticDeleters = 0
 
static TDEInstance * _activeInstance = 0
 

Related Functions

(Note that these are not member functions.)

kdbgstream & endl (kdbgstream &s)
 
kdbgstream & flush (kdbgstream &s)
 
kdbgstream kdDebug (int area=0)
 
TQString kdBacktrace (int levels=-1)
 
void kdBacktraceFD (int fd=2)
 
kdbgstream kdWarning (int area=0)
 
kdbgstream kdError (int area=0)
 
kdbgstream kdFatal (int area=0)
 
void kdClearDebugConfig ()
 
bool checkAccess (const TQString &pathname, int mode)
 
#define KMIN(a, b)   kMin(a,b)
 
#define KMAX(a, b)   kMax(a,b)
 
#define KABS(a)   kAbs(a)
 
#define KCLAMP(x, low, high)   kClamp(x,low,high)
 

Detailed Description

Access to the KDE global objects.

TDEGlobal provides you with pointers of many central objects that exist only once in the process. It is also responsible for managing instances of KStaticDeleterBase.

See also
KStaticDeleterBase
Author
Sirtaj Singh Kang (taj@k.nosp@m.de.o.nosp@m.rg)

Definition at line 48 of file tdeglobal.h.

Member Function Documentation

◆ activeInstance()

static TDEInstance * TDEGlobal::activeInstance ( )
inlinestatic

Definition at line 186 of file tdeglobal.h.

◆ charsets()

KCharsets * TDEGlobal::charsets ( )
static

The global charset manager.

Returns
the global charset manager

Definition at line 124 of file tdeglobal.cpp.

◆ config()

TDEConfig * TDEGlobal::config ( )
static

Returns the general config object.

Returns
the global configuration object.

Definition at line 65 of file tdeglobal.cpp.

◆ deleteStaticDeleters()

void TDEGlobal::deleteStaticDeleters ( )
static

Calls KStaticDeleterBase::destructObject() on all registered static deleters and unregisters them all.

See also
KStaticDeleterBase
KStaticDeleter

Definition at line 205 of file tdeglobal.cpp.

◆ dirs()

TDEStandardDirs * TDEGlobal::dirs ( )
static

Returns the application standard dirs object.

Returns
the global standard dir object

Definition at line 58 of file tdeglobal.cpp.

◆ iconLoader()

TDEIconLoader * TDEGlobal::iconLoader ( )
static

Returns an iconloader object.

Returns
the global iconloader object

Definition at line 79 of file tdeglobal.cpp.

◆ instance()

TDEInstance * TDEGlobal::instance ( )
static

Returns the global instance.

There is always at least one instance of a component in one application (in most cases the application itself).

Returns
the global instance

Definition at line 102 of file tdeglobal.cpp.

◆ locale()

TDELocale * TDEGlobal::locale ( )
static

Returns the global locale object.

Returns
the global locale object

Definition at line 108 of file tdeglobal.cpp.

◆ registerStaticDeleter()

void TDEGlobal::registerStaticDeleter ( KStaticDeleterBase *  d)
static

Registers a static deleter.

Parameters
dthe static deleter to register
See also
KStaticDeleterBase
KStaticDeleter

Definition at line 189 of file tdeglobal.cpp.

◆ setActiveInstance()

void TDEGlobal::setActiveInstance ( TDEInstance *  d)
static

The instance currently active (useful in a multi-instance application, such as a KParts application).

Don't use this - it's mainly for TDEAboutDialog and KBugReport.

Definition at line 134 of file tdeglobal.cpp.

◆ sharedConfig()

TDESharedConfig * TDEGlobal::sharedConfig ( )
static

Returns the general config object.

Returns
the global configuration object.

Definition at line 72 of file tdeglobal.cpp.

◆ staticQString() [1/2]

const TQString & TDEGlobal::staticQString ( const char *  str)
static

Creates a static TQString.

Create a static TQString.

To be used inside functions(!) like:

static const TQString &myString = TDEGlobal::staticQString("myText");
TDEGlobal::staticQString
static const TQString & staticQString(const char *str)
Creates a static TQString.
Definition: tdeglobal.cpp:148

!!! Do NOT use: !!!

static TQString myString = TDEGlobal::staticQString("myText");

This creates a static object (instead of a static reference) and as you know static objects are EVIL.

Parameters
strthe string to create
Returns
the static string

To be used inside functions(!) like: static const TQString &myString = TDEGlobal::staticQString("myText");

Definition at line 148 of file tdeglobal.cpp.

◆ staticQString() [2/2]

const TQString & TDEGlobal::staticQString ( const TQString &  str)
static

Creates a static TQString.

Create a static TQString.

To be used inside functions(!) like:

static const TQString &myString = TDEGlobal::staticQString(i18n("My Text"));

!!! Do NOT use: !!!

static TQString myString = TDEGlobal::staticQString(i18n("myText"));

This creates a static object (instead of a static reference) and as you know static objects are EVIL.

Parameters
strthe string to create
Returns
the static string

To be used inside functions(!) like: static const TQString &myString = TDEGlobal::staticQString(i18n("My Text"));

Definition at line 166 of file tdeglobal.cpp.

◆ unregisterStaticDeleter()

void TDEGlobal::unregisterStaticDeleter ( KStaticDeleterBase *  d)
static

Unregisters a static deleter.

Parameters
dthe static deleter to unregister
See also
KStaticDeleterBase
KStaticDeleter

Definition at line 198 of file tdeglobal.cpp.

Friends And Related Function Documentation

◆ checkAccess()

bool checkAccess ( const TQString &  pathname,
int  mode 
)
related

Check, if a file may be accessed in a given mode.

This is a wrapper around the access() system call. checkAccess() calls access() with the given parameters. If this is OK, checkAccess() returns true. If not, and W_OK is part of mode, it is checked if there is write access to the directory. If yes, checkAccess() returns true. In all other cases checkAccess() returns false.

Other than access() this function EXPLICITLY ignores non-existant files if checking for write access.

Parameters
pathnameThe full path of the file you want to test
modeThe access mode, as in the access() system call.
Returns
Whether the access is allowed, true = Access allowed

Definition at line 3300 of file tdeapplication.cpp.

◆ KABS

#define KABS (   a)    kAbs(a)
related

A typesafe function to determine the absolute value of the argument.

Definition at line 205 of file tdeglobal.h.

◆ KCLAMP

#define KCLAMP (   x,
  low,
  high 
)    kClamp(x,low,high)
related

A typesafe function that returns x if it's between low and high values.

low if x is smaller than then low and high if x is bigger than high.

Definition at line 211 of file tdeglobal.h.

◆ KMAX

#define KMAX (   a,
  b 
)    kMax(a,b)
related

A typesafe function to find the maximum of the two arguments.

Definition at line 200 of file tdeglobal.h.

◆ KMIN

#define KMIN (   a,
  b 
)    kMin(a,b)
related

A typesafe function to find the minimum of the two arguments.

Definition at line 195 of file tdeglobal.h.

Member Data Documentation

◆ _activeInstance

TDEInstance * TDEGlobal::_activeInstance = 0
static

Definition at line 188 of file tdeglobal.h.

◆ _charsets

KCharsets * TDEGlobal::_charsets = 0
static

Definition at line 176 of file tdeglobal.h.

◆ _instance

TDEInstance * TDEGlobal::_instance = 0
static

Definition at line 174 of file tdeglobal.h.

◆ _locale

TDELocale * TDEGlobal::_locale = 0
static

Definition at line 175 of file tdeglobal.h.

◆ _staticDeleters

KStaticDeleterList * TDEGlobal::_staticDeleters = 0
static

Definition at line 177 of file tdeglobal.h.

◆ _stringDict

KStringDict * TDEGlobal::_stringDict = 0
static

Definition at line 173 of file tdeglobal.h.


The documentation for this class was generated from the following files:
  • tdeglobal.h
  • kdebug.h
  • tdeapplication.h
  • tdeglobal.cpp

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.9.4
This website is maintained by Timothy Pearson.