\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=69pt]{classKInstance__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KInstance:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=227pt]{classKInstance__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KInstance} (const {\bf QCString} \&instance\-Name)
\item 
{\bf KInstance} (const {\bf KAbout\-Data} $\ast$about\-Data)
\item 
{\bf KInstance} ({\bf KInstance} $\ast$src)\label{classKInstance_a2}

\item 
virtual {\bf $\sim$KInstance} ()
\item 
{\bf KStandard\-Dirs} $\ast$ {\bf dirs} () const 
\item 
{\bf KConfig} $\ast$ {\bf config} () const 
\item 
{\bf KShared\-Config} $\ast$ {\bf shared\-Config} () const 
\item 
{\bf KIcon\-Loader} $\ast$ {\bf icon\-Loader} () const 
\item 
void {\bf new\-Icon\-Loader} () const 
\item 
const {\bf KAbout\-Data} $\ast$ {\bf about\-Data} () const 
\item 
{\bf QCString} {\bf instance\-Name} () const 
\item 
{\bf KMime\-Source\-Factory} $\ast$ {\bf mime\-Source\-Factory} () const 
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KInstance} (const {\bf KInstance} \&)
\item 
void {\bf set\-Config\-Name} (const {\bf QString} \&name)
\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}




Definition at line 43 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 69 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 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 87 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 132 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 159 of file kinstance.cpp.

References KConfig::reparse\-Configuration().

Referenced by KGlobal::dirs(), KLib\-Loader::find\-Library(), icon\-Loader(), 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 175 of file kinstance.cpp.

References KStandard\-Dirs::add\-Customized(), QCString::is\-Empty(), KShared\-Config::open\-Config(), and KConfig::reparse\-Configuration().

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


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 222 of file kinstance.cpp.

References config().

Referenced by KGlobal::shared\-Config().\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_a7}


Returns an iconloader object. 

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


Definition at line 237 of file kinstance.cpp.

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

Referenced by KIcon\-Loader::Bar\-Icon(), KIcon\-Loader::Bar\-Icon\-Set(), KIcon\-Loader::Desktop\-Icon(), KIcon\-Loader::Desktop\-Icon\-Set(), KGlobal::icon\-Loader(), KIcon\-Loader::Icon\-Size(), KIcon\-Loader::Main\-Bar\-Icon(), KIcon\-Loader::Main\-Bar\-Icon\-Set(), mime\-Source\-Factory(), KIcon\-Loader::Small\-Icon(), KIcon\-Loader::Small\-Icon\-Set(), KIcon\-Loader::User\-Icon(), and KIcon\-Loader::User\-Icon\-Set().\index{KInstance@{KInstance}!newIconLoader@{newIconLoader}}
\index{newIconLoader@{newIconLoader}!KInstance@{KInstance}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KInstance::new\-Icon\-Loader () const}\label{classKInstance_a8}


Re-allocate the global iconloader. 



Definition at line 248 of file kinstance.cpp.

References dirs(), KIcon\-Loader::reconfigure(), and KIcon\-Theme::reconfigure().

Referenced by KApplication::x11Event\-Filter().\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 255 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 261 of file kinstance.cpp.

Referenced by KConfig\-Back\-End::check\-Config\-Files\-Writable(), KApplication::icon\-Name(), KApplication::KApplication(), 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 267 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 231 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}
