\section{KInstance Class Reference}
\label{classKInstance}\index{KInstance@{KInstance}}
Access to {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} global objects for use in shared libraries.  


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

Inheritance diagram for KInstance:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=75pt]{classKInstance__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KInstance:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=251pt]{classKInstance__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KInstance} (const  {\bf QCString} \&instance\-Name)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf KInstance} (const  {\bf KAbout\-Data} $\ast$about\-Data)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf KInstance} ({\bf KInstance} $\ast$src)\label{classKInstance_a2}

\item 
virtual {\bf $\sim$KInstance} ()
\begin{CompactList}\small\item\em Destructor. \item\end{CompactList}\item 
{\bf KStandard\-Dirs} $\ast$ {\bf dirs} () const 
\begin{CompactList}\small\item\em Returns the application standard dirs object. \item\end{CompactList}\item 
{\bf KConfig} $\ast$ {\bf config} () const 
\begin{CompactList}\small\item\em Returns the general config object (\char`\"{}appnamerc\char`\"{}). \item\end{CompactList}\item 
{\bf KIcon\-Loader} $\ast$ {\bf icon\-Loader} () const 
\begin{CompactList}\small\item\em Returns an iconloader object. \item\end{CompactList}\item 
void {\bf new\-Icon\-Loader} () const 
\begin{CompactList}\small\item\em Re-allocate the global iconloader. \item\end{CompactList}\item 
{\bf KCharsets} $\ast$ {\bf charsets} () const \label{classKInstance_a8}

\item 
const  {\bf KAbout\-Data} $\ast$ {\bf about\-Data} () const 
\begin{CompactList}\small\item\em Returns the about data of this instance Warning, can be 0L. \item\end{CompactList}\item 
{\bf QCString} {\bf instance\-Name} () const 
\begin{CompactList}\small\item\em Returns the name of the instance. \item\end{CompactList}\item 
{\bf KMime\-Source\-Factory} $\ast$ {\bf mime\-Source\-Factory} () const 
\begin{CompactList}\small\item\em Returns the {\bf KMime\-Source\-Factory}{\rm (p.\,\pageref{classKMimeSourceFactory})} of the instance. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KInstance} (const  {\bf KInstance} \&)
\begin{CompactList}\small\item\em Copy Constructor is not allowed. \item\end{CompactList}\item 
void {\bf set\-Config\-Name} (const  {\bf QString} \&name)
\begin{CompactList}\small\item\em Set name of default config file. \item\end{CompactList}\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKInstance_b2}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KStandard\-Dirs}\label{classKInstance_n0}

\end{CompactItemize}


\subsection{Detailed Description}
Access to {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} global objects for use in shared libraries. 

In practical terms, this class is used in {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} components. This allows components to store things that normally would be accessed by {\bf KGlobal}{\rm (p.\,\pageref{classKGlobal})}.

\begin{Desc}
\item[Author:]Torben Weis \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kinstance.h}{\rm (p.\,\pageref{kinstance_8h})},v 1.26 2002/09/28 12:28:47 tjansen Exp \end{Desc}
\end{Desc}




Definition at line 42 of file kinstance.h.

\subsection{Constructor \& Destructor Documentation}
\index{KInstance@{KInstance}!KInstance@{KInstance}}
\index{KInstance@{KInstance}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInstance::KInstance (const {\bf QCString} \& {\em instance\-Name})}\label{classKInstance_a0}


Constructor. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em instance\-Name}]the name of the instance \end{description}
\end{Desc}


Definition at line 50 of file kinstance.cpp.

References KStd\-Action::name(), and KGlobal::set\-Active\-Instance().\index{KInstance@{KInstance}!KInstance@{KInstance}}
\index{KInstance@{KInstance}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInstance::KInstance (const {\bf KAbout\-Data} $\ast$ {\em about\-Data})}\label{classKInstance_a1}


Constructor. 

When building a KInstance that is not your {\bf KApplication}{\rm (p.\,\pageref{classKApplication})}, make sure that the {\bf KAbout\-Data}{\rm (p.\,\pageref{classKAboutData})} and the KInstance have the same life time. You have to destroy both, since the instance doesn't own the about data. Don't build a {\bf KAbout\-Data}{\rm (p.\,\pageref{classKAboutData})} on the stack in this case ! Building a {\bf KAbout\-Data}{\rm (p.\,\pageref{classKAboutData})} on the stack is only ok for usage with {\bf KCmd\-Line\-Args}{\rm (p.\,\pageref{classKCmdLineArgs})} and {\bf KApplication}{\rm (p.\,\pageref{classKApplication})} (not destroyed until the app exits). \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em about\-Data}]data about this instance (see {\bf KAbout\-Data}{\rm (p.\,\pageref{classKAboutData})}) \end{description}
\end{Desc}


Definition at line 67 of file kinstance.cpp.

References QCString::is\-Empty(), and KGlobal::set\-Active\-Instance().\index{KInstance@{KInstance}!~KInstance@{$\sim$KInstance}}
\index{~KInstance@{$\sim$KInstance}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInstance::$\sim${\bf KInstance} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKInstance_a3}


Destructor. 



Definition at line 109 of file kinstance.cpp.

References KGlobal::set\-Active\-Instance().\index{KInstance@{KInstance}!KInstance@{KInstance}}
\index{KInstance@{KInstance}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KInstance::KInstance (const {\bf KInstance} \&)\hspace{0.3cm}{\tt  [protected]}}\label{classKInstance_b0}


Copy Constructor is not allowed. 



\subsection{Member Function Documentation}
\index{KInstance@{KInstance}!dirs@{dirs}}
\index{dirs@{dirs}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KStandard\-Dirs} $\ast$ KInstance::dirs () const}\label{classKInstance_a4}


Returns the application standard dirs object. 

\begin{Desc}
\item[Returns:]The {\bf KStandard\-Dirs}{\rm (p.\,\pageref{classKStandardDirs})} of the application. \end{Desc}


Definition at line 132 of file kinstance.cpp.

References KStandard\-Dirs::add\-Customized(), and KConfig::reparse\-Configuration().

Referenced by KGlobal::dirs(), KLib\-Loader::find\-Library(), icon\-Loader(), KStandard\-Dirs::locate(), KStandard\-Dirs::locate\-Local(), and new\-Icon\-Loader().\index{KInstance@{KInstance}!config@{config}}
\index{config@{config}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KConfig} $\ast$ KInstance::config () const}\label{classKInstance_a5}


Returns the general config object (\char`\"{}appnamerc\char`\"{}). 

\begin{Desc}
\item[Returns:]the {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} object for the instance. \end{Desc}


Definition at line 144 of file kinstance.cpp.

References KStandard\-Dirs::add\-Customized(), QCString::is\-Empty(), KConfig\-Base::read\-Bool\-Entry(), KConfig::reparse\-Configuration(), and KConfig\-Base::set\-Group().

Referenced by KGlobal::config(), KCmd\-Line\-Args::enable\_\-i18n(), KNotify\-Client::Instance::Instance(), KApplication::invoke\-Mailer(), and KLocale::KLocale().\index{KInstance@{KInstance}!iconLoader@{iconLoader}}
\index{iconLoader@{iconLoader}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KIcon\-Loader} $\ast$ KInstance::icon\-Loader () const}\label{classKInstance_a6}


Returns an iconloader object. 

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


Definition at line 184 of file kinstance.cpp.

References dirs(), and KIcon\-Loader::enable\-Delayed\-Icon\-Set\-Loading().

Referenced by KWin::icon(), KGlobal::icon\-Loader(), and mime\-Source\-Factory().\index{KInstance@{KInstance}!newIconLoader@{newIconLoader}}
\index{newIconLoader@{newIconLoader}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KInstance::new\-Icon\-Loader () const}\label{classKInstance_a7}


Re-allocate the global iconloader. 



Definition at line 194 of file kinstance.cpp.

References dirs(), KIcon\-Loader::reconfigure(), and KIcon\-Theme::reconfigure().\index{KInstance@{KInstance}!aboutData@{aboutData}}
\index{aboutData@{aboutData}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const  {\bf KAbout\-Data} $\ast$ KInstance::about\-Data () const}\label{classKInstance_a9}


Returns the about data of this instance Warning, can be 0L. 

\begin{Desc}
\item[Returns:]the about data of the instance, or 0 if it has not been set yet \end{Desc}


Definition at line 200 of file kinstance.cpp.

Referenced by KApplication::caption(), and KCrash::default\-Crash\-Handler().\index{KInstance@{KInstance}!instanceName@{instanceName}}
\index{instanceName@{instanceName}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KInstance::instance\-Name () const}\label{classKInstance_a10}


Returns the name of the instance. 

\begin{Desc}
\item[Returns:]the instance name, can be null if the KInstance has been created with a null name \end{Desc}


Definition at line 205 of file kinstance.cpp.

Referenced by KApplication::icon(), KApplication::icon\-Name(), KApplication::KApplication(), KApplication::mini\-Icon(), and KApplication::mini\-Icon\-Name().\index{KInstance@{KInstance}!mimeSourceFactory@{mimeSourceFactory}}
\index{mimeSourceFactory@{mimeSourceFactory}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KMime\-Source\-Factory} $\ast$ KInstance::mime\-Source\-Factory () const}\label{classKInstance_a11}


Returns the {\bf KMime\-Source\-Factory}{\rm (p.\,\pageref{classKMimeSourceFactory})} of the instance. 

Mainly added for API completeness and future extensibility. \begin{Desc}
\item[Returns:]the {\bf KMime\-Source\-Factory}{\rm (p.\,\pageref{classKMimeSourceFactory})} set as default for this application. \end{Desc}


Definition at line 210 of file kinstance.cpp.

References icon\-Loader().\index{KInstance@{KInstance}!setConfigName@{setConfigName}}
\index{setConfigName@{setConfigName}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KInstance::set\-Config\-Name (const {\bf QString} \& {\em name})\hspace{0.3cm}{\tt  [protected]}}\label{classKInstance_b1}


Set name of default config file. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the default config file \end{description}
\end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 179 of file kinstance.cpp.

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