\section{KGlobal Class Reference}
\label{classKGlobal}\index{KGlobal@{KGlobal}}
Access to the {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} global objects.  


{\tt \#include $<$kglobal.h$>$}

Collaboration diagram for KGlobal:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=162pt]{classKGlobal__coll__graph}
\end{center}
\end{figure}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KInstance} $\ast$ {\bf instance} ()
\begin{CompactList}\small\item\em Returns the global instance. \item\end{CompactList}\item 
{\bf KStandard\-Dirs} $\ast$ {\bf dirs} ()
\begin{CompactList}\small\item\em Returns the application standard dirs object. \item\end{CompactList}\item 
{\bf KConfig} $\ast$ {\bf config} ()
\begin{CompactList}\small\item\em Returns the general config object. \item\end{CompactList}\item 
{\bf KIcon\-Loader} $\ast$ {\bf icon\-Loader} ()
\begin{CompactList}\small\item\em Returns an iconloader object. \item\end{CompactList}\item 
{\bf KLocale} $\ast$ {\bf locale} ()
\begin{CompactList}\small\item\em Returns the global locale object. \item\end{CompactList}\item 
{\bf KCharsets} $\ast$ {\bf charsets} ()
\begin{CompactList}\small\item\em The global charset manager. \item\end{CompactList}\item 
const  {\bf QString} \& {\bf static\-QString} (const  char $\ast$str)
\begin{CompactList}\small\item\em Creates a static {\bf QString}. \item\end{CompactList}\item 
const  {\bf QString} \& {\bf static\-QString} (const  {\bf QString} \&str)
\begin{CompactList}\small\item\em Creates a static {\bf QString}. \item\end{CompactList}\item 
void {\bf register\-Static\-Deleter} ({\bf KStatic\-Deleter\-Base} $\ast$d)
\begin{CompactList}\small\item\em Registers a static deleter. \item\end{CompactList}\item 
void {\bf unregister\-Static\-Deleter} ({\bf KStatic\-Deleter\-Base} $\ast$d)
\begin{CompactList}\small\item\em Unregisters a static deleter. \item\end{CompactList}\item 
void {\bf delete\-Static\-Deleters} ()
\begin{CompactList}\small\item\em Calls {\bf KStatic\-Deleter\-Base::destruct\-Object()}{\rm (p.\,\pageref{classKStaticDeleterBase_a1})} on all registered static deleters and unregisters them all. \item\end{CompactList}\item 
void {\bf set\-Active\-Instance} ({\bf KInstance} $\ast$d)
\begin{CompactList}\small\item\em The instance currently active (useful in a multi-instance application, such as a KParts application). \item\end{CompactList}\item 
{\bf KInstance} $\ast$ {\bf active\-Instance} ()\label{classKGlobal_e12}

\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
KString\-Dict $\ast$ {\bf \_\-string\-Dict} = 0\label{classKGlobal_s0}

\item 
{\bf KInstance} $\ast$ {\bf \_\-instance} = 0\label{classKGlobal_s1}

\item 
{\bf KLocale} $\ast$ {\bf \_\-locale} = 0\label{classKGlobal_s2}

\item 
{\bf KCharsets} $\ast$ {\bf \_\-charsets} = 0\label{classKGlobal_s3}

\item 
KStatic\-Deleter\-List $\ast$ {\bf \_\-static\-Deleters} = 0\label{classKGlobal_s4}

\item 
{\bf KInstance} $\ast$ {\bf \_\-active\-Instance} = 0\label{classKGlobal_s5}

\end{CompactItemize}


\subsection{Detailed Description}
Access to the {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} 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 {\bf KStatic\-Deleter\-Base}{\rm (p.\,\pageref{classKStaticDeleterBase})}.

\begin{Desc}
\item[See also:]{\bf KStatic\-Deleter\-Base}{\rm (p.\,\pageref{classKStaticDeleterBase})} \end{Desc}
\begin{Desc}
\item[Author:]Sirtaj Singh Kang ({\tt taj@kde.org}) \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kglobal.h}{\rm (p.\,\pageref{kglobal_8h})},v 1.44.2.2 2003/09/02 02:27:45 raabe Exp \end{Desc}
\end{Desc}




Definition at line 45 of file kglobal.h.

\subsection{Member Function Documentation}
\index{KGlobal@{KGlobal}!instance@{instance}}
\index{instance@{instance}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KInstance} $\ast$ KGlobal::instance ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e0}


Returns the global instance. 

There is always at least one instance of a component in one application (in most cases the application itself). \begin{Desc}
\item[Returns:]the global instance \end{Desc}


Definition at line 74 of file kglobal.cpp.

Referenced by KApplication::caption(), KWin::icon(), KLocale::KLocale(), and KTemp\-File::KTemp\-File().\index{KGlobal@{KGlobal}!dirs@{dirs}}
\index{dirs@{dirs}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KStandard\-Dirs} $\ast$ KGlobal::dirs ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e1}


Returns the application standard dirs object. 

\begin{Desc}
\item[Returns:]the global standard dir object \end{Desc}


Definition at line 53 of file kglobal.cpp.

References KInstance::dirs().

Referenced by KIcon\-Loader::add\-Extra\-Desktop\-Themes(), KLocale::all\-Countries\-Two\-Alpha(), KConfig\-Back\-End::change\-File\-Name(), KApplication::check\-Recover\-File(), KPalette::get\-Palette\-List(), KDesktop\-File::is\-Authorized\-Desktop\-File(), KConfig::KConfig(), KIcon\-Theme::KIcon\-Theme(), KSimple\-Config::KSimple\-Config(), KLocale::lang\-Lookup(), KIcon\-Theme::list(), KConfig\-INIBack\-End::parse\-Config\-Files(), and KApplication::temp\-Save\-Name().\index{KGlobal@{KGlobal}!config@{config}}
\index{config@{config}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KConfig} $\ast$ KGlobal::config ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e2}


Returns the general config object. 

\begin{Desc}
\item[Returns:]the global configuration object. \end{Desc}


Definition at line 60 of file kglobal.cpp.

References KInstance::config().

Referenced by KGlobal\-Settings::active\-Text\-Color(), KGlobal\-Settings::active\-Title\-Color(), KGlobal\-Settings::alternate\-Background\-Color(), KApplication::authorize(), KGlobal\-Settings::auto\-Select\-Delay(), KGlobal\-Settings::base\-Color(), KGlobal\-Settings::change\-Cursor\-Over\-Icon(), KCharsets::codec\-For\-Name(), KGlobal\-Settings::completion\-Mode(), KGlobal\-Settings::context\-Menu\-Key(), KGlobal\-Settings::contrast(), KApplication::create\-Application\-Palette(), KIcon\-Theme::current(), KGlobal\-Settings::dnd\-Event\-Delay(), KGlobal\-Settings::fixed\-Font(), KGlobal\-Settings::general\-Font(), KGlobal\-Settings::highlight\-Color(), KGlobal\-Settings::highlighted\-Text\-Color(), KGlobal\-Settings::inactive\-Text\-Color(), KGlobal\-Settings::inactive\-Title\-Color(), KIcon\-Effect::init(), KGlobal\-Settings::insert\-Tear\-Off\-Handle(), KGlobal\-Settings::link\-Color(), KGlobal\-Settings::menu\-Font(), KGlobal\-Settings::mouse\-Settings(), KShortcut\-List::read\-Settings(), KGlobal\-Settings::show\-Context\-Menus\-On\-Press(), KGlobal\-Settings::single\-Click(), KGlobal\-Settings::taskbar\-Font(), KGlobal\-Settings::text\-Color(), KGlobal\-Settings::tool\-Bar\-Font(), KGlobal\-Settings::tool\-Bar\-Highlight\-Color(), KGlobal\-Settings::visited\-Link\-Color(), KGlobal\-Settings::visual\-Activate(), KGlobal\-Settings::visual\-Activate\-Speed(), KGlobal\-Settings::wheel\-Mouse\-Zooms(), KGlobal\-Settings::window\-Title\-Font(), and KShortcut\-List::write\-Settings().\index{KGlobal@{KGlobal}!iconLoader@{iconLoader}}
\index{iconLoader@{iconLoader}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIcon\-Loader} $\ast$ KGlobal::icon\-Loader ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e3}


Returns an iconloader object. 

\begin{Desc}
\item[Returns:]the global iconloader object \end{Desc}


Definition at line 67 of file kglobal.cpp.

References KInstance::icon\-Loader().

Referenced by KIcon\-Loader::unknown().\index{KGlobal@{KGlobal}!locale@{locale}}
\index{locale@{locale}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KLocale} $\ast$ KGlobal::locale ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e4}


Returns the global locale object. 

\begin{Desc}
\item[Returns:]the global locale object \end{Desc}


Definition at line 80 of file kglobal.cpp.

Referenced by KCharsets::codec\-For\-Name(), KConfig\-Base::delete\-Entry(), KLocale::lang\-Lookup(), KConfig\-Base::set\-Locale(), and KConfig\-Base::write\-Entry().\index{KGlobal@{KGlobal}!charsets@{charsets}}
\index{charsets@{charsets}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KCharsets} $\ast$ KGlobal::charsets ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e5}


The global charset manager. 

\begin{Desc}
\item[Returns:]the global charset manager \end{Desc}


Definition at line 94 of file kglobal.cpp.

Referenced by KCharsets::descriptive\-Encoding\-Names().\index{KGlobal@{KGlobal}!staticQString@{staticQString}}
\index{staticQString@{staticQString}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  {\bf QString} \& KGlobal::static\-QString (const char $\ast$ {\em str})\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e6}


Creates a static {\bf QString}. 

To be used inside functions(!) like: \small\begin{alltt}
 static const {\bf QString} \&myString = {\bf KGlobal::staticQString}{\rm (p.\,\pageref{classKGlobal_e6})}("myText");
 \end{alltt}\normalsize 


!!! Do \_\-NOT\_\- use: !!! \small\begin{alltt}
 static {\bf QString} myString = {\bf KGlobal::staticQString}{\rm (p.\,\pageref{classKGlobal_e6})}("myText");
 \end{alltt}\normalsize 
 This creates a static object (instead of a static reference) and as you know static objects are EVIL. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]the string to create \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the static string \end{Desc}


Definition at line 118 of file kglobal.cpp.

References QString::from\-Latin1().

Referenced by KApplication::authorize\-KAction(), KIcon\-Loader::icon\-Path(), KURL::is\-Local\-File(), KIcon\-Loader::load\-Icon(), KConfig\-Base::read\-Entry(), and KURL::set\-Encoded\-Path().\index{KGlobal@{KGlobal}!staticQString@{staticQString}}
\index{staticQString@{staticQString}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  {\bf QString} \& KGlobal::static\-QString (const {\bf QString} \& {\em str})\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e7}


Creates a static {\bf QString}. 

To be used inside functions(!) like: \small\begin{alltt}
 static const {\bf QString} \&myString = {\bf KGlobal::staticQString}{\rm (p.\,\pageref{classKGlobal_e6})}(i18n("My Text"));
 \end{alltt}\normalsize 


!!! Do \_\-NOT\_\- use: !!! \small\begin{alltt}
 static {\bf QString} myString = {\bf KGlobal::staticQString}{\rm (p.\,\pageref{classKGlobal_e6})}(i18n("myText"));
 \end{alltt}\normalsize 
 This creates a static object (instead of a static reference) and as you know static objects are EVIL. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em str}]the string to create \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the static string \end{Desc}


Definition at line 136 of file kglobal.cpp.\index{KGlobal@{KGlobal}!registerStaticDeleter@{registerStaticDeleter}}
\index{registerStaticDeleter@{registerStaticDeleter}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGlobal::register\-Static\-Deleter ({\bf KStatic\-Deleter\-Base} $\ast$ {\em d})\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e8}


Registers a static deleter. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em d}]the static deleter to register \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KStatic\-Deleter\-Base}{\rm (p.\,\pageref{classKStaticDeleterBase})} 

{\bf KStatic\-Deleter}{\rm (p.\,\pageref{classKStaticDeleter})} \end{Desc}


Definition at line 159 of file kglobal.cpp.

Referenced by KStatic\-Deleter$<$ type $>$::set\-Object().\index{KGlobal@{KGlobal}!unregisterStaticDeleter@{unregisterStaticDeleter}}
\index{unregisterStaticDeleter@{unregisterStaticDeleter}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGlobal::unregister\-Static\-Deleter ({\bf KStatic\-Deleter\-Base} $\ast$ {\em d})\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e9}


Unregisters a static deleter. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em d}]the static deleter to unregister \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KStatic\-Deleter\-Base}{\rm (p.\,\pageref{classKStaticDeleterBase})} 

{\bf KStatic\-Deleter}{\rm (p.\,\pageref{classKStaticDeleter})} \end{Desc}


Definition at line 168 of file kglobal.cpp.

Referenced by KStatic\-Deleter$<$ type $>$::set\-Object().\index{KGlobal@{KGlobal}!deleteStaticDeleters@{deleteStaticDeleters}}
\index{deleteStaticDeleters@{deleteStaticDeleters}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGlobal::delete\-Static\-Deleters ()\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e10}


Calls {\bf KStatic\-Deleter\-Base::destruct\-Object()}{\rm (p.\,\pageref{classKStaticDeleterBase_a1})} on all registered static deleters and unregisters them all. 

\begin{Desc}
\item[See also:]{\bf KStatic\-Deleter\-Base}{\rm (p.\,\pageref{classKStaticDeleterBase})} 

{\bf KStatic\-Deleter}{\rm (p.\,\pageref{classKStaticDeleter})} \end{Desc}


Definition at line 175 of file kglobal.cpp.\index{KGlobal@{KGlobal}!setActiveInstance@{setActiveInstance}}
\index{setActiveInstance@{setActiveInstance}!KGlobal@{KGlobal}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KGlobal::set\-Active\-Instance ({\bf KInstance} $\ast$ {\em d})\hspace{0.3cm}{\tt  [static]}}\label{classKGlobal_e11}


The instance currently active (useful in a multi-instance application, such as a KParts application). 

Don't use this - it's mainly for {\bf KAbout\-Dialog} and {\bf KBug\-Report}. 

Definition at line 104 of file kglobal.cpp.

References QString::from\-Utf8(), and KLocale::set\-Active\-Catalogue().

Referenced by KInstance::KInstance(), and KInstance::$\sim$KInstance().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
kglobal.h\item 
kglobal.cpp\end{CompactItemize}
