|
|
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
KInstance * instance ()
| 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
KStandardDirs * dirs ()
| dirs |
[static]
Returns the application standard dirs object.
Returns: the global standard dir object
KConfig * config ()
| config |
[static]
Returns the general config object.
Returns: the global configuration object.
KIconLoader * iconLoader ()
| iconLoader |
[static]
Returns an iconloader object.
Returns: the global iconloader object
KLocale * locale ()
| locale |
[static]
Returns the global locale object.
Returns: the global locale object
KCharsets * charsets ()
| charsets |
[static]
The global charset manager.
Returns: the global charset manager
const QString & staticQString (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:
str | the string to create |
Returns: the static string
const QString & staticQString (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:
str | the string to create |
Returns: the static string
void registerStaticDeleter (KStaticDeleterBase *d)
| registerStaticDeleter |
[static]
Registers a static deleter.
Parameters:
d | the static deleter to register |
See also: KStaticDeleterBase, KStaticDeleter
void unregisterStaticDeleter (KStaticDeleterBase *d)
| unregisterStaticDeleter |
[static]
Unregisters a static deleter.
Parameters:
d | the 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.
KInstance * activeInstance ()
| activeInstance |
[static]
static KInstance * _activeInstance | _activeInstance |