class KGlobal

Access to the KDE global objects. More...

Definition#include <kglobal.h>
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Static Methods

Public Members


Detailed Description

Access to the KDE global objects. KGlobal 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

KInstanceinstance ()

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

KStandardDirsdirs ()

dirs

[static]

Returns the application standard dirs object.

Returns: the global standard dir object

KConfigconfig ()

config

[static]

Returns the general config object.

Returns: the global configuration object.

KIconLoadericonLoader ()

iconLoader

[static]

Returns an iconloader object.

Returns: the global iconloader object

KLocalelocale ()

locale

[static]

Returns the global locale object.

Returns: the global locale object

KCharsetscharsets ()

charsets

[static]

The global charset manager.

Returns: the global charset manager

const QStringstaticQString (const char *str)

staticQString

[static]

Creates a static QString.

To be used inside functions(!) like:


 static const QString &myString = KGlobal::staticQString("myText");

!!! Do _NOT_ use: !!!


 static QString myString = KGlobal::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

const QStringstaticQString (const QString &str)

staticQString

[static]

Creates a static QString.

To be used inside functions(!) like:


 static const QString &myString = KGlobal::staticQString(i18n("My Text"));

!!! Do _NOT_ use: !!!


 static QString myString = KGlobal::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

void  registerStaticDeleter (KStaticDeleterBase *d)

registerStaticDeleter

[static]

Registers a static deleter.

Parameters:
dthe static deleter to register

See also: KStaticDeleterBase, KStaticDeleter

void  unregisterStaticDeleter (KStaticDeleterBase *d)

unregisterStaticDeleter

[static]

Unregisters a static deleter.

Parameters:
dthe static deleter to unregister

See also: KStaticDeleterBase, KStaticDeleter

void  deleteStaticDeleters ()

deleteStaticDeleters

[static]

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

See also: KStaticDeleterBase, KStaticDeleter

static KStringDict * _stringDict

_stringDict

static KInstance * _instance

_instance

static KLocale * _locale

_locale

static KCharsets * _charsets

_charsets

static KStaticDeleterList * _staticDeleters

_staticDeleters

void  setActiveInstance (KInstance *d)

setActiveInstance

[static]

The instance currently active (useful in a multi-instance application, such as a KParts application). Don't use this - it's mainly for KAboutDialog and KBugReport.

KInstanceactiveInstance ()

activeInstance

[static]

static KInstance * _activeInstance

_activeInstance