Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KGlobal Class Reference

#include <kglobal.h>

List of all members.

Static Public Methods

KInstanceinstance ()
KStandardDirsdirs ()
KConfigconfig ()
KIconLoadericonLoader ()
KLocalelocale ()
KCharsetscharsets ()
const QString & staticQString (const char *str)
const QString & staticQString (const QString &str)
void registerStaticDeleter (KStaticDeleterBase *d)
void unregisterStaticDeleter (KStaticDeleterBase *d)
void deleteStaticDeleters ()
void setActiveInstance (KInstance *d)


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
Author:
Sirtaj Singh Kang (taj@kde.org)
Version:
Id:
kglobal.h,v 1.44 2002/09/19 19:41:42 tjansen Exp

Definition at line 45 of file kglobal.h.


Member Function Documentation

KCharsets* KGlobal::charsets   [static]
 

The global charset manager.

Returns:
the global charset manager

KConfig* KGlobal::config   [static]
 

Returns the general config object.

Returns:
the global configuration object.

void KGlobal::deleteStaticDeleters   [static]
 

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

See also:
KStaticDeleterBase , KStaticDeleter

KStandardDirs* KGlobal::dirs   [static]
 

Returns the application standard dirs object.

Returns:
the global standard dir object

KIconLoader* KGlobal::iconLoader   [static]
 

Returns an iconloader object.

Returns:
the global iconloader object

KInstance* KGlobal::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

KLocale* KGlobal::locale   [static]
 

Returns the global locale object.

Returns:
the global locale object

void KGlobal::registerStaticDeleter KStaticDeleterBase   d [static]
 

Registers a static deleter.

Parameters:
d  the static deleter to register
See also:
KStaticDeleterBase , KStaticDeleter

Referenced by KStaticDeleter< type >::setObject().

void KGlobal::setActiveInstance KInstance   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 KAboutDialog and KBugReport.

const QString& KGlobal::staticQString const QString &    str [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:
str  the string to create
Returns:
the static string

const QString& KGlobal::staticQString const char *    str [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:
str  the string to create
Returns:
the static string

void KGlobal::unregisterStaticDeleter KStaticDeleterBase   d [static]
 

Unregisters a static deleter.

Parameters:
d  the static deleter to unregister
See also:
KStaticDeleterBase , KStaticDeleter

Referenced by KStaticDeleter< type >::setObject().


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:14 2003 for kdelibs by doxygen1.2.18