KGlobal Class Reference
Access to the KDE global objects. More...
#include <kglobal.h>
Collaboration diagram for KGlobal:

Static Public Member Functions | |
KInstance * | instance () |
KStandardDirs * | dirs () |
KConfig * | config () |
KSharedConfig * | sharedConfig () |
KIconLoader * | iconLoader () |
KLocale * | locale () |
KCharsets * | charsets () |
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) |
KInstance * | activeInstance () |
Static Public Attributes | |
KStringDict * | _stringDict = 0 |
KInstance * | _instance = 0 |
KLocale * | _locale = 0 |
KCharsets * | _charsets = 0 |
KStaticDeleterList * | _staticDeleters = 0 |
KInstance * | _activeInstance = 0 |
Related Functions | |
(Note that these are not member functions.) | |
KDECORE_EXPORT bool | checkAccess (const QString &pathname, int mode) |
kdbgstream & | endl (kdbgstream &s) |
kdbgstream & | flush (kdbgstream &s) |
KDECORE_EXPORT kdbgstream | kdDebug (int area=0) |
KDECORE_EXPORT QString | kdBacktrace () |
KDECORE_EXPORT QString | kdBacktrace (int levels) |
KDECORE_EXPORT kdbgstream | kdWarning (int area=0) |
KDECORE_EXPORT kdbgstream | kdError (int area=0) |
KDECORE_EXPORT kdbgstream | kdFatal (int area=0) |
KDECORE_EXPORT void | kdClearDebugConfig () |
KMIN(a, b) | |
KMAX(a, b) | |
KABS(a) | |
KCLAMP(x, low, high) |
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)
Definition at line 44 of file kglobal.h.
Member Function Documentation
|
Returns the global instance. There is always at least one instance of a component in one application (in most cases the application itself).
Definition at line 81 of file kglobal.cpp. Referenced by KApplication::caption(), KLocale::KLocale(), and KApplication::x11EventFilter(). |
|
Returns the application standard dirs object.
Definition at line 53 of file kglobal.cpp. References KInstance::dirs(). Referenced by KIconLoader::addExtraDesktopThemes(), KLocale::allCountriesTwoAlpha(), KConfigBackEnd::changeFileName(), KPalette::getPaletteList(), KDesktopFile::isAuthorizedDesktopFile(), KConfig::KConfig(), KIconTheme::KIconTheme(), KLocale::langLookup(), KIconTheme::list(), KDesktopFile::locateLocal(), and KConfigINIBackEnd::parseConfigFiles(). |
|
Returns the general config object.
Definition at line 60 of file kglobal.cpp. References KInstance::config(). Referenced by KApplication::authorize(), KApplication::authorizeControlModule(), KApplication::authorizeControlModules(), KCharsets::codecForName(), KApplication::createApplicationPalette(), KIconTheme::current(), KIconEffect::init(), KShortcutList::readSettings(), KShortcutList::writeSettings(), and KApplication::x11EventFilter(). |
|
Returns the general config object.
Definition at line 67 of file kglobal.cpp. References KInstance::sharedConfig(). Referenced by KConfigSkeleton::KConfigSkeleton(). |
|
Returns an iconloader object.
Definition at line 74 of file kglobal.cpp. References KInstance::iconLoader(). Referenced by KIconLoader::unknown(). |
|
Returns the global locale object.
Definition at line 87 of file kglobal.cpp. Referenced by KCharsets::codecForName(), KConfigBase::deleteEntry(), KLocale::i18n(), KLocale::langLookup(), KConfigBase::setLocale(), and KConfigBase::writeEntry(). |
|
The global charset manager.
Definition at line 101 of file kglobal.cpp. Referenced by KCharsets::descriptiveEncodingNames(). |
|
Creates a static QString. To be used inside functions(!) like: !!! Do _NOT_ use: !!! This creates a static object (instead of a static reference) and as you know static objects are EVIL.
Definition at line 125 of file kglobal.cpp. References staticQString(). Referenced by staticQString(). |
|
Creates a static QString. To be used inside functions(!) like: !!! Do _NOT_ use: !!! This creates a static object (instead of a static reference) and as you know static objects are EVIL.
Definition at line 143 of file kglobal.cpp. References staticQString(). |
|
Registers a static deleter.
Definition at line 166 of file kglobal.cpp. References registerStaticDeleter(). Referenced by registerStaticDeleter(). |
|
Unregisters a static deleter.
Definition at line 175 of file kglobal.cpp. References unregisterStaticDeleter(). Referenced by unregisterStaticDeleter(). |
|
Calls KStaticDeleterBase::destructObject() on all registered static deleters and unregisters them all.
Definition at line 182 of file kglobal.cpp. |
|
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. Definition at line 111 of file kglobal.cpp. References KLocale::setActiveCatalogue(), and setActiveInstance(). Referenced by setActiveInstance(). |
Friends And Related Function Documentation
|
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.
Definition at line 2823 of file kapplication.cpp. References QString::findRev(), and QString::truncate(). |
|
A typesafe function to find the minimum of the two arguments.
|
|
A typesafe function to find the maximum of the two arguments.
|
|
A typesafe function to determine the absolute value of the argument.
|
|
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. |
The documentation for this class was generated from the following files: