.TH "KGlobal" 3 "28 Jan 2004" "kdecore Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KGlobal \- Access to the \fBKDE\fP global objects.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kglobal.h>\fP
.PP
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKInstance\fP * \fBinstance\fP ()"
.br
.RI "\fIReturns the global instance. \fP"
.ti -1c
.RI "\fBKStandardDirs\fP * \fBdirs\fP ()"
.br
.RI "\fIReturns the application standard dirs object. \fP"
.ti -1c
.RI "\fBKConfig\fP * \fBconfig\fP ()"
.br
.RI "\fIReturns the general config object. \fP"
.ti -1c
.RI "\fBKIconLoader\fP * \fBiconLoader\fP ()"
.br
.RI "\fIReturns an iconloader object. \fP"
.ti -1c
.RI "\fBKLocale\fP * \fBlocale\fP ()"
.br
.RI "\fIReturns the global locale object. \fP"
.ti -1c
.RI "\fBKCharsets\fP * \fBcharsets\fP ()"
.br
.RI "\fIThe global charset manager. \fP"
.ti -1c
.RI "const  \fBQString\fP & \fBstaticQString\fP (const  char *str)"
.br
.RI "\fICreates a static \fBQString\fP. \fP"
.ti -1c
.RI "const  \fBQString\fP & \fBstaticQString\fP (const  \fBQString\fP &str)"
.br
.RI "\fICreates a static \fBQString\fP. \fP"
.ti -1c
.RI "void \fBregisterStaticDeleter\fP (\fBKStaticDeleterBase\fP *d)"
.br
.RI "\fIRegisters a static deleter. \fP"
.ti -1c
.RI "void \fBunregisterStaticDeleter\fP (\fBKStaticDeleterBase\fP *d)"
.br
.RI "\fIUnregisters a static deleter. \fP"
.ti -1c
.RI "void \fBdeleteStaticDeleters\fP ()"
.br
.RI "\fICalls \fBKStaticDeleterBase::destructObject()\fP on all registered static deleters and unregisters them all. \fP"
.ti -1c
.RI "void \fBsetActiveInstance\fP (\fBKInstance\fP *d)"
.br
.RI "\fIThe instance currently active (useful in a multi-instance application, such as a KParts application). \fP"
.ti -1c
.RI "\fBKInstance\fP * \fBactiveInstance\fP ()"
.br
.in -1c
.SS "Static Public Attributes"

.in +1c
.ti -1c
.RI "KStringDict * \fB_stringDict\fP = 0"
.br
.ti -1c
.RI "\fBKInstance\fP * \fB_instance\fP = 0"
.br
.ti -1c
.RI "\fBKLocale\fP * \fB_locale\fP = 0"
.br
.ti -1c
.RI "\fBKCharsets\fP * \fB_charsets\fP = 0"
.br
.ti -1c
.RI "KStaticDeleterList * \fB_staticDeleters\fP = 0"
.br
.ti -1c
.RI "\fBKInstance\fP * \fB_activeInstance\fP = 0"
.br
.in -1c
.SH "Detailed Description"
.PP 
Access to the \fBKDE\fP 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 \fBKStaticDeleterBase\fP.
.PP
\fBSee also:\fP
.RS 4
\fBKStaticDeleterBase\fP 
.RE
.PP
\fBAuthor:\fP
.RS 4
Sirtaj Singh Kang (taj@kde.org) 
.RE
.PP
\fBVersion:\fP
.RS 4
\fBId\fP.RS 4
\fBkglobal.h\fP,v 1.44.2.2 2003/09/02 02:27:45 raabe Exp 
.RE
.PP
.RE
.PP

.PP
Definition at line 45 of file kglobal.h.
.SH "Member Function Documentation"
.PP 
.SS "\fBKInstance\fP * KGlobal::instance ()\fC [static]\fP"
.PP
Returns the global instance. There is always at least one instance of a component in one application (in most cases the application itself). 
.PP
\fBReturns:\fP
.RS 4
the global instance 
.RE
.PP
Definition at line 74 of file kglobal.cpp.
.PP
Referenced by KApplication::caption(), KWin::icon(), KLocale::KLocale(), and KTempFile::KTempFile().
.SS "\fBKStandardDirs\fP * KGlobal::dirs ()\fC [static]\fP"
.PP
Returns the application standard dirs object. \fBReturns:\fP
.RS 4
the global standard dir object 
.RE
.PP
Definition at line 53 of file kglobal.cpp.
.PP
References KInstance::dirs().
.PP
Referenced by KIconLoader::addExtraDesktopThemes(), KLocale::allCountriesTwoAlpha(), KConfigBackEnd::changeFileName(), KApplication::checkRecoverFile(), KPalette::getPaletteList(), KDesktopFile::isAuthorizedDesktopFile(), KConfig::KConfig(), KIconTheme::KIconTheme(), KSimpleConfig::KSimpleConfig(), KLocale::langLookup(), KIconTheme::list(), KConfigINIBackEnd::parseConfigFiles(), and KApplication::tempSaveName().
.SS "\fBKConfig\fP * KGlobal::config ()\fC [static]\fP"
.PP
Returns the general config object. \fBReturns:\fP
.RS 4
the global configuration object. 
.RE
.PP
Definition at line 60 of file kglobal.cpp.
.PP
References KInstance::config().
.PP
Referenced by KGlobalSettings::activeTextColor(), KGlobalSettings::activeTitleColor(), KGlobalSettings::alternateBackgroundColor(), KApplication::authorize(), KGlobalSettings::autoSelectDelay(), KGlobalSettings::baseColor(), KGlobalSettings::changeCursorOverIcon(), KCharsets::codecForName(), KGlobalSettings::completionMode(), KGlobalSettings::contextMenuKey(), KGlobalSettings::contrast(), KApplication::createApplicationPalette(), KIconTheme::current(), KGlobalSettings::dndEventDelay(), KGlobalSettings::fixedFont(), KGlobalSettings::generalFont(), KGlobalSettings::highlightColor(), KGlobalSettings::highlightedTextColor(), KGlobalSettings::inactiveTextColor(), KGlobalSettings::inactiveTitleColor(), KIconEffect::init(), KGlobalSettings::insertTearOffHandle(), KGlobalSettings::linkColor(), KGlobalSettings::menuFont(), KGlobalSettings::mouseSettings(), KShortcutList::readSettings(), KGlobalSettings::showContextMenusOnPress(), KGlobalSettings::singleClick(), KGlobalSettings::taskbarFont(), KGlobalSettings::textColor(), KGlobalSettings::toolBarFont(), KGlobalSettings::toolBarHighlightColor(), KGlobalSettings::visitedLinkColor(), KGlobalSettings::visualActivate(), KGlobalSettings::visualActivateSpeed(), KGlobalSettings::wheelMouseZooms(), KGlobalSettings::windowTitleFont(), and KShortcutList::writeSettings().
.SS "\fBKIconLoader\fP * KGlobal::iconLoader ()\fC [static]\fP"
.PP
Returns an iconloader object. \fBReturns:\fP
.RS 4
the global iconloader object 
.RE
.PP
Definition at line 67 of file kglobal.cpp.
.PP
References KInstance::iconLoader().
.PP
Referenced by KIconLoader::unknown().
.SS "\fBKLocale\fP * KGlobal::locale ()\fC [static]\fP"
.PP
Returns the global locale object. \fBReturns:\fP
.RS 4
the global locale object 
.RE
.PP
Definition at line 80 of file kglobal.cpp.
.PP
Referenced by KCharsets::codecForName(), KConfigBase::deleteEntry(), KLocale::langLookup(), KConfigBase::setLocale(), and KConfigBase::writeEntry().
.SS "\fBKCharsets\fP * KGlobal::charsets ()\fC [static]\fP"
.PP
The global charset manager. \fBReturns:\fP
.RS 4
the global charset manager 
.RE
.PP
Definition at line 94 of file kglobal.cpp.
.PP
Referenced by KCharsets::descriptiveEncodingNames().
.SS "const  \fBQString\fP & KGlobal::staticQString (const char * str)\fC [static]\fP"
.PP
Creates a static \fBQString\fP. To be used inside functions(!) like: 
.PP
.nf

 static const \fBQString\fP &myString = \fBKGlobal::staticQString\fP('myText');
 
.PP
.PP
!!! Do _NOT_ use: !!! 
.PP
.nf

 static \fBQString\fP myString = \fBKGlobal::staticQString\fP('myText');
 
.PP
 This creates a static object (instead of a static reference) and as you know static objects are EVIL. 
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP the string to create 
.RE
.PP
\fBReturns:\fP
.RS 4
the static string 
.RE
.PP
Definition at line 118 of file kglobal.cpp.
.PP
References QString::fromLatin1().
.PP
Referenced by KApplication::authorizeKAction(), KIconLoader::iconPath(), KURL::isLocalFile(), KIconLoader::loadIcon(), KConfigBase::readEntry(), and KURL::setEncodedPath().
.SS "const  \fBQString\fP & KGlobal::staticQString (const \fBQString\fP & str)\fC [static]\fP"
.PP
Creates a static \fBQString\fP. To be used inside functions(!) like: 
.PP
.nf

 static const \fBQString\fP &myString = \fBKGlobal::staticQString\fP(i18n('My Text'));
 
.PP
.PP
!!! Do _NOT_ use: !!! 
.PP
.nf

 static \fBQString\fP myString = \fBKGlobal::staticQString\fP(i18n('myText'));
 
.PP
 This creates a static object (instead of a static reference) and as you know static objects are EVIL. 
.PP
\fBParameters:\fP
.RS 4
\fIstr\fP the string to create 
.RE
.PP
\fBReturns:\fP
.RS 4
the static string 
.RE
.PP
Definition at line 136 of file kglobal.cpp.
.SS "void KGlobal::registerStaticDeleter (\fBKStaticDeleterBase\fP * d)\fC [static]\fP"
.PP
Registers a static deleter. \fBParameters:\fP
.RS 4
\fId\fP the static deleter to register 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKStaticDeleterBase\fP 
.PP
\fBKStaticDeleter\fP 
.RE
.PP
Definition at line 159 of file kglobal.cpp.
.PP
Referenced by KStaticDeleter< type >::setObject().
.SS "void KGlobal::unregisterStaticDeleter (\fBKStaticDeleterBase\fP * d)\fC [static]\fP"
.PP
Unregisters a static deleter. \fBParameters:\fP
.RS 4
\fId\fP the static deleter to unregister 
.RE
.PP
\fBSee also:\fP
.RS 4
\fBKStaticDeleterBase\fP 
.PP
\fBKStaticDeleter\fP 
.RE
.PP
Definition at line 168 of file kglobal.cpp.
.PP
Referenced by KStaticDeleter< type >::setObject().
.SS "void KGlobal::deleteStaticDeleters ()\fC [static]\fP"
.PP
Calls \fBKStaticDeleterBase::destructObject()\fP on all registered static deleters and unregisters them all. \fBSee also:\fP
.RS 4
\fBKStaticDeleterBase\fP 
.PP
\fBKStaticDeleter\fP 
.RE
.PP
Definition at line 175 of file kglobal.cpp.
.SS "void KGlobal::setActiveInstance (\fBKInstance\fP * d)\fC [static]\fP"
.PP
The instance currently active (useful in a multi-instance application, such as a KParts application). Don't use this - it's mainly for \fBKAboutDialog\fP and \fBKBugReport\fP. Definition at line 104 of file kglobal.cpp.
.PP
References QString::fromUtf8(), and KLocale::setActiveCatalogue().
.PP
Referenced by KInstance::KInstance(), and KInstance::~KInstance().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdecore Library from the source code.
