\section{KApplication Class Reference}
\label{classKApplication}\index{KApplication@{KApplication}}
Controls and provides information to all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications. Controls and provides information to all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications.  


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

Inheritance diagram for KApplication:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=95pt]{classKApplication__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KApplication:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=244pt]{classKApplication__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Caption\-Layout} \{ {\bf Caption\-App\-Last} = 1, 
{\bf Caption\-App\-First}, 
{\bf Caption\-No\-App}
 \}
\item 
enum {\bf Shutdown\-Confirm} \{ {\bf Shutdown\-Confirm\-Default} =  -1, 
{\bf Shutdown\-Confirm\-No} =  0, 
{\bf Shutdown\-Confirm\-Yes} =  1
 \}
\begin{CompactList}\small\item\em The possible values for the {\tt confirm} parameter of {\bf request\-Shut\-Down()}{\rm (p.\,\pageref{classKApplication_a7})}. \item\end{CompactList}\item 
enum {\bf Shutdown\-Type} \{ {\bf Shutdown\-Type\-Default} =  -1, 
{\bf Shutdown\-Type\-None} =  0, 
{\bf Shutdown\-Type\-Reboot} =  1, 
{\bf Shutdown\-Type\-Halt} =  2
 \}
\begin{CompactList}\small\item\em The possible values for the {\tt sdtype} parameter of {\bf request\-Shut\-Down()}{\rm (p.\,\pageref{classKApplication_a7})}. \item\end{CompactList}\item 
enum {\bf Shutdown\-Mode} \{ \par
{\bf Shutdown\-Mode\-Default} =  -1, 
{\bf Shutdown\-Mode\-Schedule} =  0, 
{\bf Shutdown\-Mode\-Try\-Now} =  1, 
{\bf Shutdown\-Mode\-Force\-Now} =  2, 
\par
{\bf Shutdown\-Mode\-Interactive} =  3
 \}
\begin{CompactList}\small\item\em The possible values for the {\tt sdmode} parameter of {\bf request\-Shut\-Down()}{\rm (p.\,\pageref{classKApplication_a7})}. \item\end{CompactList}\item 
enum \{ \par
{\bf Shift\-Modifier} =  1$<$$<$0, 
{\bf Lock\-Modifier} =  1$<$$<$1, 
{\bf Control\-Modifier} =  1$<$$<$2, 
{\bf Modifier1} =  1$<$$<$3, 
\par
{\bf Modifier2} =  1$<$$<$4, 
{\bf Modifier3} =  1$<$$<$5, 
{\bf Modifier4} =  1$<$$<$6, 
{\bf Modifier5} =  1$<$$<$7
 \}
\item 
enum \{ \par
{\bf Button1Pressed} =  1$<$$<$8, 
{\bf Button2Pressed} =  1$<$$<$9, 
{\bf Button3Pressed} =  1$<$$<$10, 
{\bf Button4Pressed} =  1$<$$<$11, 
\par
{\bf Button5Pressed} =  1$<$$<$12
 \}
\item 
enum {\bf Settings\-Category} \{ \par
{\bf SETTINGS\_\-MOUSE}, 
{\bf SETTINGS\_\-COMPLETION}, 
{\bf SETTINGS\_\-PATHS}, 
{\bf SETTINGS\_\-POPUPMENU}, 
\par
{\bf SETTINGS\_\-QT}, 
{\bf SETTINGS\_\-SHORTCUTS}
 \}
\begin{CompactList}\small\item\em Valid values for the settings\-Changed signal. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
void {\bf invoke\-Browser} (const  {\bf QString} \&url)
\begin{CompactList}\small\item\em Invokes the standard browser. \item\end{CompactList}\item 
void {\bf ref} ()
\begin{CompactList}\small\item\em Tells KApplication about one more operation that should be finished before the application exits. \item\end{CompactList}\item 
void {\bf deref} ()
\begin{CompactList}\small\item\em Tells KApplication that one operation such as those described in just finished. \item\end{CompactList}\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf kdisplay\-Palette\-Changed} ()
\begin{CompactList}\small\item\em Emitted when KApplication has changed its palette due to a KControl request. \item\end{CompactList}\item 
void {\bf kdisplay\-Style\-Changed} ()
\begin{CompactList}\small\item\em Emitted when KApplication has changed its GUI style in response to a KControl request. \item\end{CompactList}\item 
void {\bf kdisplay\-Font\-Changed} ()
\begin{CompactList}\small\item\em Emitted when KApplication has changed its font in response to a KControl request. \item\end{CompactList}\item 
void {\bf appearance\-Changed} ()
\begin{CompactList}\small\item\em Emitted when KApplication has changed either its GUI style, its font or its palette in response to a kdisplay request. \item\end{CompactList}\item 
void {\bf toolbar\-Appearance\-Changed} (int)
\begin{CompactList}\small\item\em Emitted when the settings for toolbars have been changed. \item\end{CompactList}\item 
void {\bf background\-Changed} (int desk)
\begin{CompactList}\small\item\em Emitted when the desktop background has been changed by {\tt kcmdisplay}. \item\end{CompactList}\item 
void {\bf settings\-Changed} (int category)
\begin{CompactList}\small\item\em Emitted when the global settings have been changed - see {\bf KGlobal\-Settings}{\rm (p.\,\pageref{classKGlobalSettings})} KApplication takes care of calling reparse\-Configuration on {\bf KGlobal::config()}{\rm (p.\,\pageref{classKGlobal_e2})} so that applications/classes using this only have to re-read the configuration. \item\end{CompactList}\item 
void {\bf icon\-Changed} (int group)
\begin{CompactList}\small\item\em Emitted when the global icon settings have been changed. \item\end{CompactList}\item 
void {\bf kipc\-Message} (int id, int data)
\begin{CompactList}\small\item\em Emitted when a {\bf KIPC}{\rm (p.\,\pageref{classKIPC})} user message has been received. \item\end{CompactList}\item 
void {\bf save\-Yourself} ()
\begin{CompactList}\small\item\em Session management asks you to save the state of your application. \item\end{CompactList}\item 
void {\bf shut\-Down} ()
\begin{CompactList}\small\item\em Your application is killed. \item\end{CompactList}\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KApplication} (bool allow\-Styles=true, bool GUIenabled=true)
\begin{CompactList}\small\item\em This constructor takes about\-Data and command line arguments from {\bf KCmd\-Line\-Args}{\rm (p.\,\pageref{classKCmdLineArgs})}. \item\end{CompactList}\item 
{\bf KApplication} (Display $\ast$display, int \&{\bf argc}, char $\ast$$\ast${\bf argv}, const  {\bf QCString} \&r\-App\-Name, bool allow\-Styles=true, bool GUIenabled=true)
\begin{CompactList}\small\item\em Constructor. \item\end{CompactList}\item 
{\bf KApplication} (int \&{\bf argc}, char $\ast$$\ast${\bf argv}, const  {\bf QCString} \&r\-App\-Name, bool allow\-Styles=true, bool GUIenabled=true)
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} // REMOVE FOR {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} 4.0 - using it only gives crashing applications because // {\bf KCmd\-Line\-Args::init}{\rm (p.\,\pageref{classKCmdLineArgs_e0})} isn't called \item\end{CompactList}\item 
{\bf KConfig} $\ast$ {\bf session\-Config} ()
\begin{CompactList}\small\item\em Returns the application session config object. \item\end{CompactList}\item 
bool {\bf is\-Restored} () const 
\begin{CompactList}\small\item\em Is the application restored from the session manager? \item\end{CompactList}\item 
void {\bf disable\-Session\-Management} ()
\begin{CompactList}\small\item\em Disables session management for this application. \item\end{CompactList}\item 
bool {\bf request\-Shut\-Down} ({\bf Shutdown\-Confirm} confirm=Shutdown\-Confirm\-Default, {\bf Shutdown\-Type} sdtype=Shutdown\-Type\-Default, {\bf Shutdown\-Mode} sdmode=Shutdown\-Mode\-Default)
\begin{CompactList}\small\item\em Asks the session manager to shut the session down. \item\end{CompactList}\item 
void {\bf propagate\-Session\-Manager} ()
\begin{CompactList}\small\item\em Propagates the network address of the session manager in the SESSION\_\-MANAGER environment variable so that child processes can pick it up. \item\end{CompactList}\item 
void {\bf commit\-Data} ({\bf QSession\-Manager} \&sm)\label{classKApplication_a9}

\item 
void {\bf save\-State} ({\bf QSession\-Manager} \&sm)\label{classKApplication_a10}

\item 
bool {\bf session\-Saving} () const 
\begin{CompactList}\small\item\em Returns true if the application is currently saving its session data (most probably before {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} logout). \item\end{CompactList}\item 
{\bf QPixmap} {\bf icon} () const 
\begin{CompactList}\small\item\em Returns a {\bf QPixmap} with the application icon. \item\end{CompactList}\item 
{\bf QString} {\bf icon\-Name} () const 
\begin{CompactList}\small\item\em Returns the name of the application icon. \item\end{CompactList}\item 
{\bf QPixmap} {\bf mini\-Icon} () const 
\begin{CompactList}\small\item\em Returns the mini-icon for the application as a {\bf QPixmap}. \item\end{CompactList}\item 
{\bf QString} {\bf mini\-Icon\-Name} () const 
\begin{CompactList}\small\item\em Returns the name of the mini-icon for the application. \item\end{CompactList}\item 
void {\bf set\-Top\-Widget} ({\bf QWidget} $\ast$top\-Widget)
\begin{CompactList}\small\item\em Sets the top widget of the application. \item\end{CompactList}\item 
void {\bf invoke\-Help} (const  {\bf QString} \&anchor=QString::null, const  {\bf QString} \&appname=QString::null) const 
\begin{CompactList}\small\item\em Invokes the KHelp\-Center HTML help viewer from docbook sources. \item\end{CompactList}\item 
void {\bf invoke\-HTMLHelp} (const  {\bf QString} \&a\-Filename, const  {\bf QString} \&a\-Topic=QString::null) const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} Invoke the khelpcenter HTML help viewer from HTML sources. \item\end{CompactList}\item 
void {\bf invoke\-Mailer} (const  {\bf QString} \&address, const  {\bf QString} \&subject)
\begin{CompactList}\small\item\em Convenience method; invokes the standard email application. \item\end{CompactList}\item 
void {\bf invoke\-Mailer} (const  {\bf KURL} \&mailto\-URL)
\begin{CompactList}\small\item\em Invokes the standard email application. \item\end{CompactList}\item 
void {\bf invoke\-Mailer} (const  {\bf QString} \&to, const  {\bf QString} \&cc, const  {\bf QString} \&bcc, const  {\bf QString} \&subject, const  {\bf QString} \&body, const  {\bf QString} \&message\-File=QString::null, const  {\bf QString\-List} \&attach\-URLs={\bf QString\-List}())
\begin{CompactList}\small\item\em Convenience method; invokes the standard email application. \item\end{CompactList}\item 
{\bf QString} {\bf caption} () const 
\begin{CompactList}\small\item\em Returns a text for the window caption. \item\end{CompactList}\item 
KStyle $\ast$ {\bf kstyle} () const 
\begin{CompactList}\small\item\em {\bf This class or method is obsolete, it is provided for compatibility only.} \item\end{CompactList}\item 
{\bf QString} {\bf make\-Std\-Caption} (const  {\bf QString} \&user\-Caption, bool with\-App\-Name=true, bool modified=false) const 
\begin{CompactList}\small\item\em Builds a caption that contains the application name along with the user\-Caption() using a standard layout. \item\end{CompactList}\item 
{\bf QString} {\bf temp\-Save\-Name} (const  {\bf QString} \&p\-Filename) const 
\begin{CompactList}\small\item\em Get a file name in order to make a temporary copy of your document. \item\end{CompactList}\item 
{\bf QString} {\bf check\-Recover\-File} (const  {\bf QString} \&p\-Filename, bool \&b\-Recover) const 
\begin{CompactList}\small\item\em Check whether an auto-save file exists for the document you want to open. \item\end{CompactList}\item 
void {\bf enable\-Styles} ()
\begin{CompactList}\small\item\em Enables style plugins. \item\end{CompactList}\item 
void {\bf disable\-Styles} ()
\begin{CompactList}\small\item\em Disables style plugins. \item\end{CompactList}\item 
void {\bf install\-X11Event\-Filter} ({\bf QWidget} $\ast$filter)
\begin{CompactList}\small\item\em Installs widget filter as global X11 event filter. \item\end{CompactList}\item 
void {\bf add\-Kipc\-Event\-Mask} (int id)
\begin{CompactList}\small\item\em Adds a message type to the {\bf KIPC}{\rm (p.\,\pageref{classKIPC})} event mask. \item\end{CompactList}\item 
void {\bf remove\-Kipc\-Event\-Mask} (int id)
\begin{CompactList}\small\item\em Removes a message type from the {\bf KIPC}{\rm (p.\,\pageref{classKIPC})} event mask. \item\end{CompactList}\item 
{\bf QCString} {\bf startup\-Id} () const 
\begin{CompactList}\small\item\em Returns the app startup notification identifier for this running application. \item\end{CompactList}\item 
void {\bf set\-Startup\-Id} (const  {\bf QCString} \&startup\_\-id)
\begin{CompactList}\small\item\em Sets a new value for the application startup notification window property for newly created toplevel windows. \item\end{CompactList}\item 
{\bf QString} {\bf geometry\-Argument} () const 
\begin{CompactList}\small\item\em Returns the argument to --geometry if any, so the geometry can be set wherever necessary. \item\end{CompactList}\item 
void {\bf install\-KDEProperty\-Map} ()
\begin{CompactList}\small\item\em Install a {\bf Qt} SQL property map with entries for all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} widgets Call this in any application using {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} widgets in {\bf QSql\-Form} or {\bf QData\-View}. \item\end{CompactList}\item 
bool {\bf authorize} (const  {\bf QString} \&generic\-Action)
\begin{CompactList}\small\item\em Returns whether a certain action is authorized. \item\end{CompactList}\item 
bool {\bf authorize\-KAction} (const  char $\ast$action)
\begin{CompactList}\small\item\em Returns whether a certain {\bf KAction} is authorized. \item\end{CompactList}\item 
bool {\bf authorize\-URLAction} (const  {\bf QString} \&action, const  {\bf KURL} \&base\-URL, const  {\bf KURL} \&dest\-URL)
\begin{CompactList}\small\item\em Returns whether a certain URL related action is authorized. \item\end{CompactList}\item 
bool {\bf notify} ({\bf QObject} $\ast$receiver, {\bf QEvent} $\ast$event)\label{classKApplication_a39}

\item 
int {\bf xio\-Errhandler} ()\label{classKApplication_a40}

\item 
void {\bf ice\-IOError\-Handler} (\_\-Ice\-Conn $\ast$conn)\label{classKApplication_a41}

\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
void {\bf add\-Cmd\-Line\-Options} ()
\begin{CompactList}\small\item\em Add {\bf Qt} and {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} command line options to {\bf KCmd\-Line\-Args}{\rm (p.\,\pageref{classKCmdLineArgs})}. \item\end{CompactList}\item 
{\bf KApplication} $\ast$ {\bf k\-Application} ()
\begin{CompactList}\small\item\em Returns the current application object. \item\end{CompactList}\item 
{\bf DCOPClient} $\ast$ {\bf dcop\-Client} ()
\begin{CompactList}\small\item\em Returns a pointer to a {\bf DCOPClient} for the application. \item\end{CompactList}\item 
void {\bf disable\-Auto\-Dcop\-Registration} ()
\begin{CompactList}\small\item\em Disable automatic dcop registration Must be called before creating a KApplication instance to have an effect. \item\end{CompactList}\item 
{\bf QCString} {\bf launcher} ()
\begin{CompactList}\small\item\em Returns the DCOP name of the service launcher. \item\end{CompactList}\item 
int {\bf start\-Service\-By\-Name} (const  {\bf QString} \&\_\-name, const  {\bf QString} \&URL, {\bf QString} $\ast$error=0, {\bf QCString} $\ast$dcop\-Service=0, int $\ast$pid=0, const  {\bf QCString} \&startup\_\-id=\char`\"{}\char`\"{}, bool no\-Wait=false)
\begin{CompactList}\small\item\em Starts a service based on the (translated) name of the service. \item\end{CompactList}\item 
int {\bf start\-Service\-By\-Name} (const  {\bf QString} \&\_\-name, const  {\bf QString\-List} \&URLs={\bf QString\-List}(), {\bf QString} $\ast$error=0, {\bf QCString} $\ast$dcop\-Service=0, int $\ast$pid=0, const  {\bf QCString} \&startup\_\-id=\char`\"{}\char`\"{}, bool no\-Wait=false)
\begin{CompactList}\small\item\em Starts a service based on the (translated) name of the service. \item\end{CompactList}\item 
int {\bf start\-Service\-By\-Desktop\-Path} (const  {\bf QString} \&\_\-name, const  {\bf QString} \&URL, {\bf QString} $\ast$error=0, {\bf QCString} $\ast$dcop\-Service=0, int $\ast$pid=0, const  {\bf QCString} \&startup\_\-id=\char`\"{}\char`\"{}, bool no\-Wait=false)
\begin{CompactList}\small\item\em Starts a service based on the desktop path of the service. \item\end{CompactList}\item 
int {\bf start\-Service\-By\-Desktop\-Path} (const  {\bf QString} \&\_\-name, const  {\bf QString\-List} \&URLs={\bf QString\-List}(), {\bf QString} $\ast$error=0, {\bf QCString} $\ast$dcop\-Service=0, int $\ast$pid=0, const  {\bf QCString} \&startup\_\-id=\char`\"{}\char`\"{}, bool no\-Wait=false)
\begin{CompactList}\small\item\em Starts a service based on the desktop path of the service. \item\end{CompactList}\item 
int {\bf start\-Service\-By\-Desktop\-Name} (const  {\bf QString} \&\_\-name, const  {\bf QString} \&URL, {\bf QString} $\ast$error=0, {\bf QCString} $\ast$dcop\-Service=0, int $\ast$pid=0, const  {\bf QCString} \&startup\_\-id=\char`\"{}\char`\"{}, bool no\-Wait=false)
\begin{CompactList}\small\item\em Starts a service based on the desktop name of the service. \item\end{CompactList}\item 
int {\bf start\-Service\-By\-Desktop\-Name} (const  {\bf QString} \&\_\-name, const  {\bf QString\-List} \&URLs={\bf QString\-List}(), {\bf QString} $\ast$error=0, {\bf QCString} $\ast$dcop\-Service=0, int $\ast$pid=0, const  {\bf QCString} \&startup\_\-id=\char`\"{}\char`\"{}, bool no\-Wait=false)
\begin{CompactList}\small\item\em Starts a service based on the desktop name of the service. \item\end{CompactList}\item 
int {\bf kdeinit\-Exec} (const  {\bf QString} \&name, const  {\bf QString\-List} \&args={\bf QString\-List}(), {\bf QString} $\ast$error=0, int $\ast$pid=0)
\begin{CompactList}\small\item\em Starts a program via kdeinit. \item\end{CompactList}\item 
int {\bf kdeinit\-Exec\-Wait} (const  {\bf QString} \&name, const  {\bf QString\-List} \&args={\bf QString\-List}(), {\bf QString} $\ast$error=0, int $\ast$pid=0)
\begin{CompactList}\small\item\em Starts a program via kdeinit and wait for it to finish. \item\end{CompactList}\item 
int {\bf random} ()
\begin{CompactList}\small\item\em Generates a uniform random number. \item\end{CompactList}\item 
{\bf QString} {\bf random\-String} (int length)
\begin{CompactList}\small\item\em Generates a random string. \item\end{CompactList}\item 
uint {\bf keyboard\-Modifiers} ()
\begin{CompactList}\small\item\em Returns the currently pressed keyboard modifiers (e.g. \item\end{CompactList}\item 
uint {\bf mouse\-State} ()
\begin{CompactList}\small\item\em Returns the currently pressed mouse buttons. \item\end{CompactList}\item 
void {\bf start\-Kdeinit} ()\label{classKApplication_e17}

\item 
{\bf QPalette} {\bf create\-Application\-Palette} ()
\begin{CompactList}\small\item\em Used to obtain the {\bf QPalette} that will be used to set the application palette. \item\end{CompactList}\item 
{\bf QPalette} {\bf create\-Application\-Palette} ({\bf KConfig} $\ast$config, int contrast)\label{classKApplication_e19}

\end{CompactItemize}
\subsection*{Static Public Attributes}
\begin{CompactItemize}
\item 
bool {\bf loaded\-By\-Kdeinit} = false\label{classKApplication_s0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
{\bf KApplication} (bool allow\-Styles, bool GUIenabled, {\bf KInstance} $\ast$\_\-instance)\label{classKApplication_b0}

\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKApplication_b1}

\end{CompactItemize}
\subsection*{Protected Attributes}
\begin{CompactItemize}
\item 
Atom {\bf kipc\-Comm\-Atom}\label{classKApplication_p0}

\item 
int {\bf kipc\-Event\-Mask}\label{classKApplication_p1}

\item 
int {\bf p\-Argc}\label{classKApplication_p2}

\end{CompactItemize}
\subsection*{Static Protected Attributes}
\begin{CompactItemize}
\item 
{\bf KApplication} $\ast$ {\bf KApp} = 0L
\begin{CompactList}\small\item\em Current application object. \item\end{CompactList}\end{CompactItemize}


\subsection{Detailed Description}
Controls and provides information to all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications. Controls and provides information to all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications. 

Only one object of this class can be instantiated in a single app. This instance is always accessible via the {\bf k\-Application}{\rm (p.\,\pageref{classKApplication_e1})}() method.

This class provides the following services to all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} applications.

\begin{itemize}
\item It controls the event queue (see {\bf QApplication} ). \item It provides the application with {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} resources such as accelerators, common menu entries, a {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} object. session management events, help invocation etc. \item Installs a signal handler for the SIGCHLD signal in order to avoid zombie children. If you want to catch this signal yourself or don't want it to be caught at all, you have set a new signal handler (or SIG\_\-IGN) after KApplication's constructor has run. \item It can start new services\end{itemize}
The way a service gets started depends on the 'X-DCOP-Service\-Type' entry in the desktop file of the service:

There are three possibilities: \begin{itemize}
\item X-DCOP-Service\-Type=None (default) Always start a new service, don't wait till the service registers with dcop. \item X-DCOP-Service\-Type=Multi Always start a new service, wait until the service has registered with dcop. \item X-DCOP-Service\-Type=Unique Only start the service if it isn't already running, wait until the service has registered with dcop.\end{itemize}


\begin{Desc}
\item[Author:]Matthias Kalle Dalheimer $<${\tt kalle@kde.org}$>$ \end{Desc}
\begin{Desc}
\item[Version:]\begin{Desc}
\item[Id]{\bf kapplication.h}{\rm (p.\,\pageref{kapplication_8h})},v 1.278.2.1 2003/03/03 14:39:42 lunakl Exp \end{Desc}
\end{Desc}




Definition at line 91 of file kapplication.h.

\subsection{Member Enumeration Documentation}
\index{KApplication@{KApplication}!ShutdownConfirm@{ShutdownConfirm}}
\index{ShutdownConfirm@{ShutdownConfirm}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KApplication::Shutdown\-Confirm}}\label{classKApplication_w35}


The possible values for the {\tt confirm} parameter of {\bf request\-Shut\-Down()}{\rm (p.\,\pageref{classKApplication_a7})}. 

\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{ShutdownConfirmDefault@{ShutdownConfirmDefault}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownConfirmDefault@{ShutdownConfirmDefault}}\item[{\em 
Shutdown\-Confirm\-Default\label{classKApplication_w35w3}
}]Obey the user's confirmation setting. \index{ShutdownConfirmNo@{ShutdownConfirmNo}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownConfirmNo@{ShutdownConfirmNo}}\item[{\em 
Shutdown\-Confirm\-No\label{classKApplication_w35w4}
}]Don't confirm, shutdown without asking. \index{ShutdownConfirmYes@{ShutdownConfirmYes}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownConfirmYes@{ShutdownConfirmYes}}\item[{\em 
Shutdown\-Confirm\-Yes\label{classKApplication_w35w5}
}]Always confirm, ask even if the user turned it off. \end{description}
\end{Desc}



Definition at line 210 of file kapplication.h.\index{KApplication@{KApplication}!ShutdownType@{ShutdownType}}
\index{ShutdownType@{ShutdownType}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KApplication::Shutdown\-Type}}\label{classKApplication_w36}


The possible values for the {\tt sdtype} parameter of {\bf request\-Shut\-Down()}{\rm (p.\,\pageref{classKApplication_a7})}. 

\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{ShutdownTypeDefault@{ShutdownTypeDefault}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownTypeDefault@{ShutdownTypeDefault}}\item[{\em 
Shutdown\-Type\-Default\label{classKApplication_w36w6}
}]Select previous action or the default if it's the first time. \index{ShutdownTypeNone@{ShutdownTypeNone}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownTypeNone@{ShutdownTypeNone}}\item[{\em 
Shutdown\-Type\-None\label{classKApplication_w36w7}
}]Only log out. \index{ShutdownTypeReboot@{ShutdownTypeReboot}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownTypeReboot@{ShutdownTypeReboot}}\item[{\em 
Shutdown\-Type\-Reboot\label{classKApplication_w36w8}
}]Log out and reboot the machine. \index{ShutdownTypeHalt@{ShutdownTypeHalt}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownTypeHalt@{ShutdownTypeHalt}}\item[{\em 
Shutdown\-Type\-Halt\label{classKApplication_w36w9}
}]Log out and halt the machine. \end{description}
\end{Desc}



Definition at line 228 of file kapplication.h.\index{KApplication@{KApplication}!ShutdownMode@{ShutdownMode}}
\index{ShutdownMode@{ShutdownMode}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KApplication::Shutdown\-Mode}}\label{classKApplication_w37}


The possible values for the {\tt sdmode} parameter of {\bf request\-Shut\-Down()}{\rm (p.\,\pageref{classKApplication_a7})}. 

\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{ShutdownModeDefault@{ShutdownModeDefault}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownModeDefault@{ShutdownModeDefault}}\item[{\em 
Shutdown\-Mode\-Default\label{classKApplication_w37w10}
}]Select previous mode or the default if it's the first time. \index{ShutdownModeSchedule@{ShutdownModeSchedule}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownModeSchedule@{ShutdownModeSchedule}}\item[{\em 
Shutdown\-Mode\-Schedule\label{classKApplication_w37w11}
}]Schedule a shutdown (halt or reboot) for the time all active sessions have exited. \index{ShutdownModeTryNow@{ShutdownModeTryNow}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownModeTryNow@{ShutdownModeTryNow}}\item[{\em 
Shutdown\-Mode\-Try\-Now\label{classKApplication_w37w12}
}]Shut down, if no sessions are active. 

Otherwise do nothing. \index{ShutdownModeForceNow@{ShutdownModeForceNow}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownModeForceNow@{ShutdownModeForceNow}}\item[{\em 
Shutdown\-Mode\-Force\-Now\label{classKApplication_w37w13}
}]Force shutdown. 

Kill any possibly active sessions. \index{ShutdownModeInteractive@{ShutdownModeInteractive}!KApplication@{KApplication}}\index{KApplication@{KApplication}!ShutdownModeInteractive@{ShutdownModeInteractive}}\item[{\em 
Shutdown\-Mode\-Interactive\label{classKApplication_w37w14}
}]Pop up a dialog asking the user what to do if sessions are still active. \end{description}
\end{Desc}



Definition at line 250 of file kapplication.h.\index{KApplication@{KApplication}!SettingsCategory@{SettingsCategory}}
\index{SettingsCategory@{SettingsCategory}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf enum} {\bf KApplication::Settings\-Category}}\label{classKApplication_w40}


Valid values for the settings\-Changed signal. 



Definition at line 956 of file kapplication.h.

\subsection{Constructor \& Destructor Documentation}
\index{KApplication@{KApplication}!KApplication@{KApplication}}
\index{KApplication@{KApplication}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KApplication::KApplication (bool {\em allow\-Styles} = true, bool {\em GUIenabled} = true)}\label{classKApplication_a0}


This constructor takes about\-Data and command line arguments from {\bf KCmd\-Line\-Args}{\rm (p.\,\pageref{classKCmdLineArgs})}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em allow\-Styles}]Set to false to disable the loading on plugin based styles. This is only useful to applications that do not display a GUI normally. If you do create an application with {\tt allow\-Styles} set to false it normally runs in the background but under special circumstances displays widgets. Call {\bf enable\-Styles}{\rm (p.\,\pageref{classKApplication_a27})}() before displaying any widgets.\item[{\em GUIenabled}]Set to false to disable all GUI stuff. This implies no styles either. \end{description}
\end{Desc}


Definition at line 515 of file kapplication.cpp.

References KInstance::instance\-Name().\index{KApplication@{KApplication}!KApplication@{KApplication}}
\index{KApplication@{KApplication}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KApplication::KApplication (Display $\ast$ {\em display}, int \& {\em argc}, char $\ast$$\ast$ {\em argv}, const {\bf QCString} \& {\em r\-App\-Name}, bool {\em allow\-Styles} = true, bool {\em GUIenabled} = true)}\label{classKApplication_a1}


Constructor. 

Parses command-line arguments. Use this constructor to use KApplication in a Motif or Xt program.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em display}]Will be passed to {\bf Qt} as the X display. The display must be valid and already opened.\item[{\em r\-App\-Name}]application name. Will be used for finding the associated message files and icon files, and as the default registration name for DCOP. This is a mandatory parameter.\item[{\em allow\-Styles}]Set to false to disable the loading on plugin based styles. This is only useful to applications that do not display a GUI normally. If you do create an application with {\tt allow\-Styles} set to false that normally runs in the background but under special circumstances displays widgets call {\bf enable\-Styles}{\rm (p.\,\pageref{classKApplication_a27})}() before displaying any widgets.\item[{\em GUIenabled}]Set to false to disable all GUI stuff. This implies no styles either. \end{description}
\end{Desc}
\index{KApplication@{KApplication}!KApplication@{KApplication}}
\index{KApplication@{KApplication}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KApplication::KApplication (int \& {\em argc}, char $\ast$$\ast$ {\em argv}, const {\bf QCString} \& {\em r\-App\-Name}, bool {\em allow\-Styles} = true, bool {\em GUIenabled} = true)}\label{classKApplication_a2}


{\bf This class or method is obsolete, it is provided for compatibility only.} // REMOVE FOR {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} 4.0 - using it only gives crashing applications because // {\bf KCmd\-Line\-Args::init}{\rm (p.\,\pageref{classKCmdLineArgs_e0})} isn't called 

Constructor. Parses command-line arguments.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em r\-App\-Name}]application name. Will be used for finding the associated message files and icon files, and as the default registration name for DCOP. This is a mandatory parameter.\item[{\em allow\-Styles}]Set to false to disable the loading on plugin based styles. This is only useful to applications that do not display a GUI normally. If you do create an application with {\tt allow\-Styles} set to false that normally runs in the background but under special circumstances displays widgets call {\bf enable\-Styles}{\rm (p.\,\pageref{classKApplication_a27})}() before displaying any widgets.\item[{\em GUIenabled}]Set to false to disable all GUI stuff. This implies no styles either. \end{description}
\end{Desc}


Definition at line 494 of file kapplication.cpp.

References QCString::is\-Empty(), and QApplication::Q\_\-ASSERT().

\subsection{Member Function Documentation}
\index{KApplication@{KApplication}!addCmdLineOptions@{addCmdLineOptions}}
\index{addCmdLineOptions@{addCmdLineOptions}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::add\-Cmd\-Line\-Options ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e0}


Add {\bf Qt} and {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} command line options to {\bf KCmd\-Line\-Args}{\rm (p.\,\pageref{classKCmdLineArgs})}. 



Reimplemented in {\bf KUnique\-Application} {\rm (p.\,\pageref{classKUniqueApplication_e0})}.

Definition at line 1213 of file kapplication.cpp.

References KCmd\-Line\-Args::add\-Cmd\-Line\-Options().

Referenced by KCmd\-Line\-Args::init().\index{KApplication@{KApplication}!kApplication@{kApplication}}
\index{kApplication@{kApplication}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KApplication}$\ast$ KApplication::k\-Application ()\hspace{0.3cm}{\tt  [inline, static]}}\label{classKApplication_e1}


Returns the current application object. 

This is similar to the global {\bf QApplication} pointer q\-App. It allows access to the single global KApplication object, since more than one cannot be created in the same application. It saves you the trouble of having to pass the pointer explicitly to every function that may require it. \begin{Desc}
\item[Returns:]the current application object \end{Desc}


Definition at line 178 of file kapplication.h.

References KApp.\index{KApplication@{KApplication}!sessionConfig@{sessionConfig}}
\index{sessionConfig@{sessionConfig}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KConfig} $\ast$ KApplication::session\-Config ()}\label{classKApplication_a4}


Returns the application session config object. 

\begin{Desc}
\item[Returns:]A pointer to the application's instance specific {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} object. \end{Desc}
\begin{Desc}
\item[See also:]{\bf KConfig}{\rm (p.\,\pageref{classKConfig})} \end{Desc}


Definition at line 817 of file kapplication.cpp.\index{KApplication@{KApplication}!isRestored@{isRestored}}
\index{isRestored@{isRestored}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KApplication::is\-Restored () const\hspace{0.3cm}{\tt  [inline]}}\label{classKApplication_a5}


Is the application restored from the session manager? 

\begin{Desc}
\item[Returns:]If true, this application was restored by the session manager. Note that this may mean the config object returned by {\bf session\-Config}{\rm (p.\,\pageref{classKApplication_a4})}() contains data saved by a session closedown. \end{Desc}
\begin{Desc}
\item[See also:]{\bf session\-Config()}{\rm (p.\,\pageref{classKApplication_a4})} \end{Desc}


Definition at line 197 of file kapplication.h.

References QApplication::is\-Session\-Restored().\index{KApplication@{KApplication}!disableSessionManagement@{disableSessionManagement}}
\index{disableSessionManagement@{disableSessionManagement}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::disable\-Session\-Management ()}\label{classKApplication_a6}


Disables session management for this application. 

Useful in case your application is started by the initial \char`\"{}startkde\char`\"{} script. 

Definition at line 863 of file kapplication.cpp.\index{KApplication@{KApplication}!requestShutDown@{requestShutDown}}
\index{requestShutDown@{requestShutDown}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KApplication::request\-Shut\-Down ({\bf Shutdown\-Confirm} {\em confirm} = Shutdown\-Confirm\-Default, {\bf Shutdown\-Type} {\em sdtype} = Shutdown\-Type\-Default, {\bf Shutdown\-Mode} {\em sdmode} = Shutdown\-Mode\-Default)}\label{classKApplication_a7}


Asks the session manager to shut the session down. 

Using {\tt confirm} == Shutdown\-Confirm\-Yes or {\tt sdtype} != Shutdown\-Type\-Default or {\tt sdmode} != Shutdown\-Mode\-Default causes the use of ksmserver's DCOP interface. The remaining two combinations use the standard XSMP and will work with any session manager compliant with it.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em confirm}]Whether to ask the user if he really wants to log out. {\bf Shutdown\-Confirm}{\rm (p.\,\pageref{classKApplication_w35})} \item[{\em sdtype}]The action to take after logging out. {\bf Shutdown\-Type}{\rm (p.\,\pageref{classKApplication_w36})} \item[{\em sdmode}]If/When the action should be taken. {\bf Shutdown\-Mode}{\rm (p.\,\pageref{classKApplication_w37})} \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true on sucess, false if the session manager could not be contacted. \end{Desc}


Definition at line 868 of file kapplication.cpp.

References dcop\-Client(), QCString::is\-Empty(), propagate\-Session\-Manager(), DCOPClient::send(), Shutdown\-Confirm\-No, Shutdown\-Confirm\-Yes, Shutdown\-Mode\-Default, Shutdown\-Type\-Default, and QApplication::sync\-X().\index{KApplication@{KApplication}!propagateSessionManager@{propagateSessionManager}}
\index{propagateSessionManager@{propagateSessionManager}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::propagate\-Session\-Manager ()}\label{classKApplication_a8}


Propagates the network address of the session manager in the SESSION\_\-MANAGER environment variable so that child processes can pick it up. 

If SESSION\_\-MANAGER isn't defined yet, the address is searched in \$HOME/.KSMserver.

This function is called by clients that are started outside the session ( i.e. before ksmserver is started), but want to launch other processes that should participate in the session. Examples are kdesktop or kicker. 

Definition at line 931 of file kapplication.cpp.

References QFile::close(), QFile::encode\-Name(), QCString::find(), QCString::is\-Empty(), QFile\-Info::last\-Modified(), QString::latin1(), QFile::open(), QText\-Stream::read\-Line(), QCString::replace(), and QText\-Stream::set\-Encoding().

Referenced by request\-Shut\-Down().\index{KApplication@{KApplication}!sessionSaving@{sessionSaving}}
\index{sessionSaving@{sessionSaving}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KApplication::session\-Saving () const}\label{classKApplication_a11}


Returns true if the application is currently saving its session data (most probably before {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} logout). 

This is intended for use mainly in {\bf KMain\-Window::query\-Close()} and {\bf KMain\-Window::query\-Exit()}.

\begin{Desc}
\item[See also:]{\bf KMain\-Window::query\-Close} 

{\bf KMain\-Window::query\-Exit} \end{Desc}
\begin{Desc}
\item[Since:]3.1.1 \end{Desc}


Definition at line 1098 of file kapplication.cpp.\index{KApplication@{KApplication}!dcopClient@{dcopClient}}
\index{dcopClient@{dcopClient}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf DCOPClient} $\ast$ KApplication::dcop\-Client ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e2}


Returns a pointer to a {\bf DCOPClient} for the application. 

If a client does not exist yet, it is created when this function is called. \begin{Desc}
\item[Returns:]the {\bf DCOPClient} for the application \end{Desc}


Definition at line 767 of file kapplication.cpp.

References KCmd\-Line\-Args::get\-Option(), KCmd\-Line\-Args::is\-Set(), KCmd\-Line\-Args::parsed\-Args(), DCOPClient::set\-Main\-Client(), and DCOPClient::set\-Server\-Address().

Referenced by request\-Shut\-Down(), and KUnique\-Application::start().\index{KApplication@{KApplication}!disableAutoDcopRegistration@{disableAutoDcopRegistration}}
\index{disableAutoDcopRegistration@{disableAutoDcopRegistration}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::disable\-Auto\-Dcop\-Registration ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e3}


Disable automatic dcop registration Must be called before creating a KApplication instance to have an effect. 



Definition at line 812 of file kapplication.cpp.\index{KApplication@{KApplication}!icon@{icon}}
\index{icon@{icon}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KApplication::icon () const}\label{classKApplication_a12}


Returns a {\bf QPixmap} with the application icon. 

\begin{Desc}
\item[Returns:]the application icon \end{Desc}


Definition at line 1319 of file kapplication.cpp.

References a\-Icon\-Pixmap, KInstance::instance\-Name(), and QPixmap::is\-Null().

Referenced by set\-Top\-Widget().\index{KApplication@{KApplication}!iconName@{iconName}}
\index{iconName@{iconName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::icon\-Name () const}\label{classKApplication_a13}


Returns the name of the application icon. 

\begin{Desc}
\item[Returns:]the icon's name \end{Desc}


Definition at line 1328 of file kapplication.cpp.

References KInstance::instance\-Name(), and QString::is\-Null().\index{KApplication@{KApplication}!miniIcon@{miniIcon}}
\index{miniIcon@{miniIcon}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPixmap} KApplication::mini\-Icon () const}\label{classKApplication_a14}


Returns the mini-icon for the application as a {\bf QPixmap}. 

\begin{Desc}
\item[Returns:]the application's mini icon \end{Desc}


Definition at line 1333 of file kapplication.cpp.

References a\-Mini\-Icon\-Pixmap, KInstance::instance\-Name(), and QPixmap::is\-Null().

Referenced by set\-Top\-Widget().\index{KApplication@{KApplication}!miniIconName@{miniIconName}}
\index{miniIconName@{miniIconName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::mini\-Icon\-Name () const}\label{classKApplication_a15}


Returns the name of the mini-icon for the application. 

\begin{Desc}
\item[Returns:]the mini icon's name \end{Desc}


Definition at line 1342 of file kapplication.cpp.

References KInstance::instance\-Name(), and QString::is\-Null().\index{KApplication@{KApplication}!setTopWidget@{setTopWidget}}
\index{setTopWidget@{setTopWidget}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::set\-Top\-Widget ({\bf QWidget} $\ast$ {\em top\-Widget})}\label{classKApplication_a16}


Sets the top widget of the application. 

This means basically applying the right window caption and icon. An application may have several top widgets. You don't need to call this function manually when using {\bf KMain\-Window}.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em top\-Widget}]A top widget of the application.\end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf icon()}{\rm (p.\,\pageref{classKApplication_a12})}, {\bf caption()}{\rm (p.\,\pageref{classKApplication_a22})} \end{Desc}


Definition at line 2247 of file kapplication.cpp.

References KCmd\-Line\-Args::app\-Name(), caption(), icon(), mini\-Icon(), QWidget::set\-Caption(), QWidget::set\-Icon(), KWin::set\-Icons(), startup\-Id(), QString::utf8(), and QWidget::win\-Id().\index{KApplication@{KApplication}!invokeHelp@{invokeHelp}}
\index{invokeHelp@{invokeHelp}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::invoke\-Help (const {\bf QString} \& {\em anchor} = QString::null, const {\bf QString} \& {\em appname} = QString::null) const}\label{classKApplication_a17}


Invokes the KHelp\-Center HTML help viewer from docbook sources. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em anchor}]This has to be a defined anchor in your docbook sources. If empty the main index is loaded \item[{\em appname}]This allows you to show the help of another application. If empty the current name() is used \end{description}
\end{Desc}


Definition at line 1818 of file kapplication.cpp.

References QString::arg(), QString::is\-Empty(), KStd\-Action::name(), and start\-Service\-By\-Desktop\-Name().\index{KApplication@{KApplication}!invokeHTMLHelp@{invokeHTMLHelp}}
\index{invokeHTMLHelp@{invokeHTMLHelp}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::invoke\-HTMLHelp (const {\bf QString} \& {\em a\-Filename}, const {\bf QString} \& {\em a\-Topic} = QString::null) const}\label{classKApplication_a18}


{\bf This class or method is obsolete, it is provided for compatibility only.} Invoke the khelpcenter HTML help viewer from HTML sources. 

Please use {\bf invoke\-Help()}{\rm (p.\,\pageref{classKApplication_a17})} instead.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em a\-Filename}]The filename that is to be loaded. Its location is computed automatically according to the KFSSTND. If {\tt a\-Filename} is empty, the logical appname with .html appended to it is used. \item[{\em a\-Topic}]This allows context-sensitive help. Its value will be appended to the filename, prefixed with a \char`\"{}\#\char`\"{} (hash) character. \end{description}
\end{Desc}


Definition at line 1842 of file kapplication.cpp.

References QString::arg(), QString::is\-Empty(), KStd\-Action::name(), and start\-Service\-By\-Desktop\-Name().\index{KApplication@{KApplication}!invokeMailer@{invokeMailer}}
\index{invokeMailer@{invokeMailer}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::invoke\-Mailer (const {\bf QString} \& {\em address}, const {\bf QString} \& {\em subject})}\label{classKApplication_a19}


Convenience method; invokes the standard email application. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em address}]The destination address \item[{\em subject}]Subject string. Can be QString::null. \end{description}
\end{Desc}


Definition at line 1869 of file kapplication.cpp.

Referenced by invoke\-Mailer().\index{KApplication@{KApplication}!invokeMailer@{invokeMailer}}
\index{invokeMailer@{invokeMailer}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::invoke\-Mailer (const {\bf KURL} \& {\em mailto\-URL})}\label{classKApplication_a20}


Invokes the standard email application. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em mailto\-URL}]A mailto URL. \end{description}
\end{Desc}


Definition at line 1874 of file kapplication.cpp.

References KURL::decode\_\-string(), invoke\-Mailer(), QString::mid(), KURL::path(), KURL::query(), QString\-List::split(), and QString::starts\-With().\index{KApplication@{KApplication}!invokeMailer@{invokeMailer}}
\index{invokeMailer@{invokeMailer}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::invoke\-Mailer (const {\bf QString} \& {\em to}, const {\bf QString} \& {\em cc}, const {\bf QString} \& {\em bcc}, const {\bf QString} \& {\em subject}, const {\bf QString} \& {\em body}, const {\bf QString} \& {\em message\-File} = QString::null, const {\bf QString\-List} \& {\em attach\-URLs} = {\bf QString\-List}())}\label{classKApplication_a21}


Convenience method; invokes the standard email application. 

All parameters are optional.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em to}]The destination address. \item[{\em cc}]The Cc field \item[{\em bcc}]The Bcc field \item[{\em subject}]Subject string \item[{\em body}]A string containing the body of the mail (exclusive with message\-File) \item[{\em message\-File}]A file (URL) containing the body of the mail (exclusive with body) - currently unsupported \item[{\em attach\-URLs}]List of URLs to be attached to the mail. \end{description}
\end{Desc}


Definition at line 1900 of file kapplication.cpp.

References KInstance::config(), QString::from\-Latin1(), QString::insert(), QString::is\-Empty(), kdeinit\-Exec(), KConfig\-Base::read\-Bool\-Entry(), KConfig\-Base::read\-Path\-Entry(), QString::remove(), QString::right(), KConfig\-Base::set\-Group(), QString::simplify\-White\-Space(), and QString\-List::split().\index{KApplication@{KApplication}!invokeBrowser@{invokeBrowser}}
\index{invokeBrowser@{invokeBrowser}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::invoke\-Browser (const {\bf QString} \& {\em url})\hspace{0.3cm}{\tt  [slot]}}\label{classKApplication_i0}


Invokes the standard browser. 

Note that you should only do this when you know for sure that the browser can handle the URL (i.e. its mimetype). In doubt, if the URL can point to an image or anything else than directory or HTML, prefer to use new KRun( url ).

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em url}]The destination address \end{description}
\end{Desc}


Definition at line 1975 of file kapplication.cpp.

References start\-Service\-By\-Desktop\-Name().\index{KApplication@{KApplication}!launcher@{launcher}}
\index{launcher@{launcher}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KApplication::launcher ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e4}


Returns the DCOP name of the service launcher. 

This will be something like klaucher\_\-\$host\_\-\$uid. \begin{Desc}
\item[Returns:]the name of the service launcher \end{Desc}


Definition at line 1987 of file kapplication.cpp.\index{KApplication@{KApplication}!startServiceByName@{startServiceByName}}
\index{startServiceByName@{startServiceByName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::start\-Service\-By\-Name (const {\bf QString} \& {\em \_\-name}, const {\bf QString} \& {\em URL}, {\bf QString} $\ast$ {\em error} = 0, {\bf QCString} $\ast$ {\em dcop\-Service} = 0, int $\ast$ {\em pid} = 0, const {\bf QCString} \& {\em startup\_\-id} = \char`\"{}\char`\"{}, bool {\em no\-Wait} = false)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e5}


Starts a service based on the (translated) name of the service. 

E.g. \char`\"{}Web Browser\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the service \item[{\em URL}]if not empty this URL is passed to the service \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em dcop\-Service}]On success, {\tt dcop\-Service} contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \item[{\em startup\_\-id}]for app startup notification, \char`\"{}0\char`\"{} for none, \char`\"{}\char`\"{} ( empty string ) is the default \item[{\em no\-Wait}]if set, the function does not wait till the service is running. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2069 of file kapplication.cpp.

References QString::is\-Empty().\index{KApplication@{KApplication}!startServiceByName@{startServiceByName}}
\index{startServiceByName@{startServiceByName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::start\-Service\-By\-Name (const {\bf QString} \& {\em \_\-name}, const {\bf QString\-List} \& {\em URLs} = {\bf QString\-List}(), {\bf QString} $\ast$ {\em error} = 0, {\bf QCString} $\ast$ {\em dcop\-Service} = 0, int $\ast$ {\em pid} = 0, const {\bf QCString} \& {\em startup\_\-id} = \char`\"{}\char`\"{}, bool {\em no\-Wait} = false)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e6}


Starts a service based on the (translated) name of the service. 

E.g. \char`\"{}Web Browser\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the name of the service \item[{\em URLs}]if not empty these URLs will be passed to the service \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em dcop\-Service}]On success, {\tt dcop\-Service} contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \item[{\em startup\_\-id}]for app startup notification, \char`\"{}0\char`\"{} for none, \char`\"{}\char`\"{} ( empty string ) is the default \item[{\em no\-Wait}]if set, the function does not wait till the service is running. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2081 of file kapplication.cpp.\index{KApplication@{KApplication}!startServiceByDesktopPath@{startServiceByDesktopPath}}
\index{startServiceByDesktopPath@{startServiceByDesktopPath}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::start\-Service\-By\-Desktop\-Path (const {\bf QString} \& {\em \_\-name}, const {\bf QString} \& {\em URL}, {\bf QString} $\ast$ {\em error} = 0, {\bf QCString} $\ast$ {\em dcop\-Service} = 0, int $\ast$ {\em pid} = 0, const {\bf QCString} \& {\em startup\_\-id} = \char`\"{}\char`\"{}, bool {\em no\-Wait} = false)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e7}


Starts a service based on the desktop path of the service. 

E.g. \char`\"{}Applications/konqueror.desktop\char`\"{} or \char`\"{}/home/user/bla/myfile.desktop\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the path of the desktop file \item[{\em URL}]if not empty this URL is passed to the service \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em dcop\-Service}]On success, {\tt dcop\-Service} contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \item[{\em startup\_\-id}]for app startup notification, \char`\"{}0\char`\"{} for none, \char`\"{}\char`\"{} ( empty string ) is the default \item[{\em no\-Wait}]if set, the function does not wait till the service is running. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2090 of file kapplication.cpp.

References QString::is\-Empty().\index{KApplication@{KApplication}!startServiceByDesktopPath@{startServiceByDesktopPath}}
\index{startServiceByDesktopPath@{startServiceByDesktopPath}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::start\-Service\-By\-Desktop\-Path (const {\bf QString} \& {\em \_\-name}, const {\bf QString\-List} \& {\em URLs} = {\bf QString\-List}(), {\bf QString} $\ast$ {\em error} = 0, {\bf QCString} $\ast$ {\em dcop\-Service} = 0, int $\ast$ {\em pid} = 0, const {\bf QCString} \& {\em startup\_\-id} = \char`\"{}\char`\"{}, bool {\em no\-Wait} = false)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e8}


Starts a service based on the desktop path of the service. 

E.g. \char`\"{}Applications/konqueror.desktop\char`\"{} or \char`\"{}/home/user/bla/myfile.desktop\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the path of the desktop file \item[{\em URLs}]if not empty these URLs will be passed to the service \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em dcop\-Service}]On success, {\tt dcop\-Service} contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \item[{\em startup\_\-id}]for app startup notification, \char`\"{}0\char`\"{} for none, \char`\"{}\char`\"{} ( empty string ) is the default \item[{\em no\-Wait}]if set, the function does not wait till the service is running. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2102 of file kapplication.cpp.\index{KApplication@{KApplication}!startServiceByDesktopName@{startServiceByDesktopName}}
\index{startServiceByDesktopName@{startServiceByDesktopName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::start\-Service\-By\-Desktop\-Name (const {\bf QString} \& {\em \_\-name}, const {\bf QString} \& {\em URL}, {\bf QString} $\ast$ {\em error} = 0, {\bf QCString} $\ast$ {\em dcop\-Service} = 0, int $\ast$ {\em pid} = 0, const {\bf QCString} \& {\em startup\_\-id} = \char`\"{}\char`\"{}, bool {\em no\-Wait} = false)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e9}


Starts a service based on the desktop name of the service. 

E.g. \char`\"{}konqueror\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the desktop name of the service \item[{\em URL}]if not empty this URL is passed to the service \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em dcop\-Service}]On success, {\tt dcop\-Service} contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \item[{\em startup\_\-id}]for app startup notification, \char`\"{}0\char`\"{} for none, \char`\"{}\char`\"{} ( empty string ) is the default \item[{\em no\-Wait}]if set, the function does not wait till the service is running. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2111 of file kapplication.cpp.

References QString::is\-Empty().

Referenced by invoke\-Browser(), invoke\-Help(), invoke\-HTMLHelp(), and KNotify\-Client::start\-Daemon().\index{KApplication@{KApplication}!startServiceByDesktopName@{startServiceByDesktopName}}
\index{startServiceByDesktopName@{startServiceByDesktopName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::start\-Service\-By\-Desktop\-Name (const {\bf QString} \& {\em \_\-name}, const {\bf QString\-List} \& {\em URLs} = {\bf QString\-List}(), {\bf QString} $\ast$ {\em error} = 0, {\bf QCString} $\ast$ {\em dcop\-Service} = 0, int $\ast$ {\em pid} = 0, const {\bf QCString} \& {\em startup\_\-id} = \char`\"{}\char`\"{}, bool {\em no\-Wait} = false)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e10}


Starts a service based on the desktop name of the service. 

E.g. \char`\"{}konqueror\char`\"{}

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]the desktop name of the service \item[{\em URLs}]if not empty these URLs will be passed to the service \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em dcop\-Service}]On success, {\tt dcop\-Service} contains the DCOP name under which this service is available. If empty, the service does not provide DCOP services. If the pointer is 0 the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \item[{\em startup\_\-id}]for app startup notification, \char`\"{}0\char`\"{} for none, \char`\"{}\char`\"{} ( empty string ) is the default \item[{\em no\-Wait}]if set, the function does not wait till the service is running. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2123 of file kapplication.cpp.\index{KApplication@{KApplication}!kdeinitExec@{kdeinitExec}}
\index{kdeinitExec@{kdeinitExec}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::kdeinit\-Exec (const {\bf QString} \& {\em name}, const {\bf QString\-List} \& {\em args} = {\bf QString\-List}(), {\bf QString} $\ast$ {\em error} = 0, int $\ast$ {\em pid} = 0)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e11}


Starts a program via kdeinit. 

There will be no application startup notification, so you should use it only for starting internal processes.

program name and arguments are converted to according to the local encoding and passed as is to kdeinit.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]Name of the program to start \item[{\em args}]Arguments to pass to the program \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2132 of file kapplication.cpp.

References KStd\-Action::name().

Referenced by invoke\-Mailer().\index{KApplication@{KApplication}!kdeinitExecWait@{kdeinitExecWait}}
\index{kdeinitExecWait@{kdeinitExecWait}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::kdeinit\-Exec\-Wait (const {\bf QString} \& {\em name}, const {\bf QString\-List} \& {\em args} = {\bf QString\-List}(), {\bf QString} $\ast$ {\em error} = 0, int $\ast$ {\em pid} = 0)\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e12}


Starts a program via kdeinit and wait for it to finish. 

Like {\bf kdeinit\-Exec}{\rm (p.\,\pageref{classKApplication_e11})}(), but it waits till the program is finished. As such it behaves similar to the system(...) function.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em name}]Name of the program to start \item[{\em args}]Arguments to pass to the program \item[{\em error}]On failure, {\tt error} contains a description of the error that occurred. If the pointer is 0, the argument will be ignored \item[{\em pid}]On success, the process id of the new service will be written here. If the pointer is 0, the argument will be ignored. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]an error code indicating success (== 0) or failure ($>$ 0). \end{Desc}


Definition at line 2140 of file kapplication.cpp.

References KStd\-Action::name().

Referenced by KConfig::check\-Update().\index{KApplication@{KApplication}!caption@{caption}}
\index{caption@{caption}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::caption () const}\label{classKApplication_a22}


Returns a text for the window caption. 

This may be set by \char`\"{}-caption\char`\"{}, otherwise it will be equivalent to the name of the executable. \begin{Desc}
\item[Returns:]the text for the window caption \end{Desc}


Definition at line 1578 of file kapplication.cpp.

References KInstance::about\-Data(), KGlobal::instance(), QString::is\-Null(), KStd\-Action::name(), and KAbout\-Data::program\-Name().

Referenced by make\-Std\-Caption(), and set\-Top\-Widget().\index{KApplication@{KApplication}!kstyle@{kstyle}}
\index{kstyle@{kstyle}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KStyle$\ast$ KApplication::kstyle () const\hspace{0.3cm}{\tt  [inline]}}\label{classKApplication_a23}


{\bf This class or method is obsolete, it is provided for compatibility only.} 



Definition at line 652 of file kapplication.h.\index{KApplication@{KApplication}!makeStdCaption@{makeStdCaption}}
\index{makeStdCaption@{makeStdCaption}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::make\-Std\-Caption (const {\bf QString} \& {\em user\-Caption}, bool {\em with\-App\-Name} = true, bool {\em modified} = false) const}\label{classKApplication_a24}


Builds a caption that contains the application name along with the user\-Caption() using a standard layout. 

To make a compliant caption for your window, simply do: {\tt set\-Caption}(kapp-$>$make\-Std\-Caption(your\-Caption));

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em user\-Caption}]The caption string you want to display in the window caption area. Do not include the application name! \item[{\em with\-App\-Name}]Indicates that the method shall include or ignore the application name when making the caption string. You are not compliant if you set this to {\tt false}. \item[{\em modified}]If true, a 'modified' sign will be included in the returned string. This is useful when indicating that a file is modified, i.e., it contains data that has not been saved. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the created caption \end{Desc}


Definition at line 1597 of file kapplication.cpp.

References caption(), QString::ends\-With(), QString::from\-Utf8(), QString::is\-Empty(), and QString::is\-Null().\index{KApplication@{KApplication}!tempSaveName@{tempSaveName}}
\index{tempSaveName@{tempSaveName}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::temp\-Save\-Name (const {\bf QString} \& {\em p\-Filename}) const}\label{classKApplication_a25}


Get a file name in order to make a temporary copy of your document. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Filename}]The full path to the current file of your document. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]A new filename for auto-saving. \end{Desc}


Definition at line 2147 of file kapplication.cpp.

References QDir::abs\-Path(), KGlobal::dirs(), QDir::exists(), QDir::home\-Dir\-Path(), QDir::mkdir(), QString::replace(), and QDir::set\-Path().\index{KApplication@{KApplication}!checkRecoverFile@{checkRecoverFile}}
\index{checkRecoverFile@{checkRecoverFile}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::check\-Recover\-File (const {\bf QString} \& {\em p\-Filename}, bool \& {\em b\-Recover}) const}\label{classKApplication_a26}


Check whether an auto-save file exists for the document you want to open. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em p\-Filename}]The full path to the document you want to open. \item[{\em b\-Recover}]This gets set to true if there was a recover file. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]The full path of the file to open. \end{Desc}


Definition at line 2175 of file kapplication.cpp.

References QDir::abs\-Path(), KGlobal::dirs(), QDir::exists(), QDir::home\-Dir\-Path(), QDir::mkdir(), QString::replace(), and QDir::set\-Path().\index{KApplication@{KApplication}!enableStyles@{enableStyles}}
\index{enableStyles@{enableStyles}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::enable\-Styles ()}\label{classKApplication_a27}


Enables style plugins. 

This is useful only to applications that normally do not display a GUI and create the KApplication with allow\-Styles set to false. 

Definition at line 1537 of file kapplication.cpp.\index{KApplication@{KApplication}!disableStyles@{disableStyles}}
\index{disableStyles@{disableStyles}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::disable\-Styles ()}\label{classKApplication_a28}


Disables style plugins. 

Current style plugins do not get unloaded.

This is only useful when used in combination with {\bf enable\-Styles}{\rm (p.\,\pageref{classKApplication_a27})}(). 

Definition at line 1546 of file kapplication.cpp.\index{KApplication@{KApplication}!installX11EventFilter@{installX11EventFilter}}
\index{installX11EventFilter@{installX11EventFilter}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::install\-X11Event\-Filter ({\bf QWidget} $\ast$ {\em filter})}\label{classKApplication_a29}


Installs widget filter as global X11 event filter. 

The widget filter receives XEvents in its standard {\bf QWidget::x11Event}() function.

Warning: Only do this when absolutely necessary. An installed X11 filter can slow things down. 

Definition at line 351 of file kapplication.cpp.\index{KApplication@{KApplication}!random@{random}}
\index{random@{random}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KApplication::random ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e13}


Generates a uniform random number. 

\begin{Desc}
\item[Returns:]A truly unpredictable number in the range [0, RAND\_\-MAX) \end{Desc}


Definition at line 2321 of file kapplication.cpp.

References KStd\-Action::close(), and KStd\-Action::open().

Referenced by random\-String(), and KRandom\-Sequence::set\-Seed().\index{KApplication@{KApplication}!randomString@{randomString}}
\index{randomString@{randomString}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::random\-String (int {\em length})\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e14}


Generates a random string. 

It operates in the range [A-Za-z0-9] \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em length}]Generate a string of this length. \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the random string \end{Desc}


Definition at line 2341 of file kapplication.cpp.

References random().\index{KApplication@{KApplication}!addKipcEventMask@{addKipcEventMask}}
\index{addKipcEventMask@{addKipcEventMask}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::add\-Kipc\-Event\-Mask (int {\em id})}\label{classKApplication_a30}


Adds a message type to the {\bf KIPC}{\rm (p.\,\pageref{classKIPC})} event mask. 

You can only add \char`\"{}system messages\char`\"{} to the event mask. These are the messages with id $<$ 32. Messages with id $>$= 32 are user messages. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The message id. See {\bf KIPC::Message}{\rm (p.\,\pageref{classKIPC_w9})}. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KIPC}{\rm (p.\,\pageref{classKIPC})} 

{\bf remove\-Kipc\-Event\-Mask()}{\rm (p.\,\pageref{classKApplication_a31})} 

{\bf kipc\-Message()}{\rm (p.\,\pageref{classKApplication_l8})} \end{Desc}


Definition at line 1517 of file kapplication.cpp.\index{KApplication@{KApplication}!removeKipcEventMask@{removeKipcEventMask}}
\index{removeKipcEventMask@{removeKipcEventMask}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::remove\-Kipc\-Event\-Mask (int {\em id})}\label{classKApplication_a31}


Removes a message type from the {\bf KIPC}{\rm (p.\,\pageref{classKIPC})} event mask. 

This message will not be handled anymore. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]The message id. \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KIPC}{\rm (p.\,\pageref{classKIPC})} 

{\bf add\-Kipc\-Event\-Mask()}{\rm (p.\,\pageref{classKApplication_a30})} 

{\bf kipc\-Message()}{\rm (p.\,\pageref{classKApplication_l8})} \end{Desc}


Definition at line 1527 of file kapplication.cpp.\index{KApplication@{KApplication}!startupId@{startupId}}
\index{startupId@{startupId}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QCString} KApplication::startup\-Id () const}\label{classKApplication_a32}


Returns the app startup notification identifier for this running application. 

\begin{Desc}
\item[Returns:]the startup notification identifier \end{Desc}


Definition at line 2297 of file kapplication.cpp.

Referenced by set\-Top\-Widget().\index{KApplication@{KApplication}!setStartupId@{setStartupId}}
\index{setStartupId@{setStartupId}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::set\-Startup\-Id (const {\bf QCString} \& {\em startup\_\-id})}\label{classKApplication_a33}


Sets a new value for the application startup notification window property for newly created toplevel windows. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em the}]startup notification identifier \end{description}
\end{Desc}


Definition at line 2302 of file kapplication.cpp.

References QCString::is\-Empty().\index{KApplication@{KApplication}!geometryArgument@{geometryArgument}}
\index{geometryArgument@{geometryArgument}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KApplication::geometry\-Argument () const}\label{classKApplication_a34}


Returns the argument to --geometry if any, so the geometry can be set wherever necessary. 

\begin{Desc}
\item[Returns:]the geometry argument, or QString::null if there is none \end{Desc}


Definition at line 1314 of file kapplication.cpp.\index{KApplication@{KApplication}!installKDEPropertyMap@{installKDEPropertyMap}}
\index{installKDEPropertyMap@{installKDEPropertyMap}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::install\-KDEProperty\-Map ()}\label{classKApplication_a35}


Install a {\bf Qt} SQL property map with entries for all {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} widgets Call this in any application using {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} widgets in {\bf QSql\-Form} or {\bf QData\-View}. 



Definition at line 1786 of file kapplication.cpp.

References QSql\-Property\-Map::insert(), and QSql\-Property\-Map::install\-Default\-Map().\index{KApplication@{KApplication}!authorize@{authorize}}
\index{authorize@{authorize}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KApplication::authorize (const {\bf QString} \& {\em generic\-Action})}\label{classKApplication_a36}


Returns whether a certain action is authorized. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em generic\-Action}]The name of a generic action \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the action is authorized \end{Desc}


Definition at line 2358 of file kapplication.cpp.

References KGlobal::config(), and KConfig\-Base::read\-Bool\-Entry().

Referenced by authorize\-KAction().\index{KApplication@{KApplication}!authorizeKAction@{authorizeKAction}}
\index{authorizeKAction@{authorizeKAction}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KApplication::authorize\-KAction (const char $\ast$ {\em action})}\label{classKApplication_a37}


Returns whether a certain {\bf KAction} is authorized. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em action}]The name of a {\bf KAction} action. The name is prepended with \char`\"{}action/\char`\"{} before being passed to {\bf authorize}{\rm (p.\,\pageref{classKApplication_a36})}() \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true if the {\bf KAction} is authorized \end{Desc}


Definition at line 2368 of file kapplication.cpp.

References KStd\-Action::action(), authorize(), and KGlobal::static\-QString().\index{KApplication@{KApplication}!authorizeURLAction@{authorizeURLAction}}
\index{authorizeURLAction@{authorizeURLAction}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KApplication::authorize\-URLAction (const {\bf QString} \& {\em action}, const {\bf KURL} \& {\em base\-URL}, const {\bf KURL} \& {\em dest\-URL})}\label{classKApplication_a38}


Returns whether a certain URL related action is authorized. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em action}]The name of the action. Known actions are list (may be listed (e.g. in file selection dialog)), link (may be linked to), open (may open) and redirect (may be redirected to) \item[{\em base\-URL}]The url where the action originates from \item[{\em dest\-URL}]The object of the action \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]true when the action is authorized, false otherwise. \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2474 of file kapplication.cpp.

References KStd\-Action::action(), QDir::clean\-Dir\-Path(), KURL::is\-Empty(), KURL::path(), and KURL::set\-Path().\index{KApplication@{KApplication}!keyboardModifiers@{keyboardModifiers}}
\index{keyboardModifiers@{keyboardModifiers}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KApplication::keyboard\-Modifiers ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e15}


Returns the currently pressed keyboard modifiers (e.g. 

shift, control, etc.) Usually you simply want to test for those in key events, in which case {\bf QKey\-Event::state}() does the job (or {\bf QKey\-Event::key}() to notice when a modifier is pressed alone). But it can be useful to query for the status of the modifiers at another moment (e.g. some {\bf KDE}{\rm (p.\,\pageref{namespaceKDE})} apps do that upon a drop event). \begin{Desc}
\item[Returns:]the keyboard modifiers \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2503 of file kapplication.cpp.\index{KApplication@{KApplication}!mouseState@{mouseState}}
\index{mouseState@{mouseState}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}uint KApplication::mouse\-State ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e16}


Returns the currently pressed mouse buttons. 

Usually you simply want to test for those in mouse events, in which case {\bf QMouse\-Event::button}() does the job (or {\bf QMouse\-Event::state}()). But it can be useful to query for the status of the mouse buttons at another moment. To query for the mouse pointer position, use {\bf QCursor::pos}(). \begin{Desc}
\item[Returns:]the currently pressed mouse buttons \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 2514 of file kapplication.cpp.\index{KApplication@{KApplication}!ref@{ref}}
\index{ref@{ref}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::ref ()\hspace{0.3cm}{\tt  [slot]}}\label{classKApplication_i1}


Tells KApplication about one more operation that should be finished before the application exits. 

The standard behavior is to exit on the \char`\"{}last window closed\char`\"{} event, but some events should outlive the last window closed (e.g. a file copy for a file manager, or 'compacting folders on exit' for a mail client). 

Definition at line 827 of file kapplication.cpp.\index{KApplication@{KApplication}!deref@{deref}}
\index{deref@{deref}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::deref ()\hspace{0.3cm}{\tt  [slot]}}\label{classKApplication_i2}


Tells KApplication that one operation such as those described in just finished. 

The application exits if the counter is back to 0. 

Definition at line 833 of file kapplication.cpp.

References QApplication::quit().\index{KApplication@{KApplication}!createApplicationPalette@{createApplicationPalette}}
\index{createApplicationPalette@{createApplicationPalette}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPalette} KApplication::create\-Application\-Palette ()\hspace{0.3cm}{\tt  [static]}}\label{classKApplication_e18}


Used to obtain the {\bf QPalette} that will be used to set the application palette. 

This is only useful for configuration modules such as krdb and should not be used in normal circumstances. \begin{Desc}
\item[Returns:]the {\bf QPalette} \end{Desc}
\begin{Desc}
\item[Since:]3.1 \end{Desc}


Definition at line 1616 of file kapplication.cpp.

References KGlobal::config(), and KGlobal\-Settings::contrast().\index{KApplication@{KApplication}!kdisplayPaletteChanged@{kdisplayPaletteChanged}}
\index{kdisplayPaletteChanged@{kdisplayPaletteChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::kdisplay\-Palette\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l0}


Emitted when KApplication has changed its palette due to a KControl request. 

Normally, widgets will update their palette automatically, but you should connect to this to program special behavior. \index{KApplication@{KApplication}!kdisplayStyleChanged@{kdisplayStyleChanged}}
\index{kdisplayStyleChanged@{kdisplayStyleChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::kdisplay\-Style\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l1}


Emitted when KApplication has changed its GUI style in response to a KControl request. 

Normally, widgets will update their styles automatically (as they would respond to an explicit set\-GUIStyle() call), but you should connect to this to program special behavior. \index{KApplication@{KApplication}!kdisplayFontChanged@{kdisplayFontChanged}}
\index{kdisplayFontChanged@{kdisplayFontChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::kdisplay\-Font\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l2}


Emitted when KApplication has changed its font in response to a KControl request. 

Normally widgets will update their fonts automatically, but you should connect to this to monitor global font changes, especially if you are using explicit fonts. \index{KApplication@{KApplication}!appearanceChanged@{appearanceChanged}}
\index{appearanceChanged@{appearanceChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::appearance\-Changed ()\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l3}


Emitted when KApplication has changed either its GUI style, its font or its palette in response to a kdisplay request. 

Normally, widgets will update their styles automatically, but you should connect to this to program special behavior. \index{KApplication@{KApplication}!toolbarAppearanceChanged@{toolbarAppearanceChanged}}
\index{toolbarAppearanceChanged@{toolbarAppearanceChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::toolbar\-Appearance\-Changed (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l4}


Emitted when the settings for toolbars have been changed. 

{\bf KTool\-Bar} will know what to do. \index{KApplication@{KApplication}!backgroundChanged@{backgroundChanged}}
\index{backgroundChanged@{backgroundChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::background\-Changed (int {\em desk})\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l5}


Emitted when the desktop background has been changed by {\tt kcmdisplay}. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em desk}]The desktop whose background has changed. \end{description}
\end{Desc}
\index{KApplication@{KApplication}!settingsChanged@{settingsChanged}}
\index{settingsChanged@{settingsChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::settings\-Changed (int {\em category})\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l6}


Emitted when the global settings have been changed - see {\bf KGlobal\-Settings}{\rm (p.\,\pageref{classKGlobalSettings})} KApplication takes care of calling reparse\-Configuration on {\bf KGlobal::config()}{\rm (p.\,\pageref{classKGlobal_e2})} so that applications/classes using this only have to re-read the configuration. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em category}]the category among the enum above \end{description}
\end{Desc}
\index{KApplication@{KApplication}!iconChanged@{iconChanged}}
\index{iconChanged@{iconChanged}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::icon\-Changed (int {\em group})\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l7}


Emitted when the global icon settings have been changed. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em group}]the new group \end{description}
\end{Desc}
\index{KApplication@{KApplication}!kipcMessage@{kipcMessage}}
\index{kipcMessage@{kipcMessage}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::kipc\-Message (int {\em id}, int {\em data})\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l8}


Emitted when a {\bf KIPC}{\rm (p.\,\pageref{classKIPC})} user message has been received. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em id}]the message id \item[{\em data}]the data \end{description}
\end{Desc}
\begin{Desc}
\item[See also:]{\bf KIPC}{\rm (p.\,\pageref{classKIPC})} 

{\bf KIPC::Message}{\rm (p.\,\pageref{classKIPC_w9})} 

{\bf add\-Kipc\-Event\-Mask}{\rm (p.\,\pageref{classKApplication_a30})} 

{\bf remove\-Kipc\-Event\-Mask}{\rm (p.\,\pageref{classKApplication_a31})} \end{Desc}
\index{KApplication@{KApplication}!saveYourself@{saveYourself}}
\index{saveYourself@{saveYourself}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::save\-Yourself ()\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l9}


Session management asks you to save the state of your application. 

This signal is provided for compatibility only. For new applications, simply use {\bf KMain\-Window}. By reimplementing {\bf KMain\-Window::query\-Close}(), {\bf KMain\-Window::save\-Properties}() and {\bf KMain\-Window::read\-Properties}() you can simply handle session management for applications with multiple toplevel windows.

For purposes without {\bf KMain\-Window}, create an instance of {\bf KSession\-Managed}{\rm (p.\,\pageref{classKSessionManaged})} and reimplement the functions {\bf KSession\-Managed::commit\-Data}{\rm (p.\,\pageref{classKSessionManaged_a3})}() and/or {\bf KSession\-Managed::save\-State}{\rm (p.\,\pageref{classKSessionManaged_a2})}()

If you still want to use this signal, here is what you should do:

Connect to this signal in order to save your data. Do NOT manipulate the UI in that slot, it is blocked by the session manager.

Use the {\bf session\-Config}{\rm (p.\,\pageref{classKApplication_a4})}() {\bf KConfig}{\rm (p.\,\pageref{classKConfig})} object to store all your instance specific data.

Do not do any closing at this point! The user may still select Cancel wanting to continue working with your application. Cleanups could be done after {\bf shut\-Down()}{\rm (p.\,\pageref{classKApplication_l10})} (see the following). \index{KApplication@{KApplication}!shutDown@{shutDown}}
\index{shutDown@{shutDown}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KApplication::shut\-Down ()\hspace{0.3cm}{\tt  [signal]}}\label{classKApplication_l10}


Your application is killed. 

Either by your program itself, {\tt xkill} or (the usual case) by KDE's logout.

The signal is particularly useful if your application has to do some last-second cleanups. Note that no user interaction is possible at this state. 

\subsection{Member Data Documentation}
\index{KApplication@{KApplication}!KApp@{KApp}}
\index{KApp@{KApp}!KApplication@{KApplication}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KApplication} $\ast$ {\bf KApplication::KApp} = 0L\hspace{0.3cm}{\tt  [static, protected]}}\label{classKApplication_t0}


Current application object. 



Definition at line 132 of file kapplication.cpp.

Referenced by k\-Application().

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