\section{KXMLGUIClient Class Reference}
\label{classKXMLGUIClient}\index{KXMLGUIClient@{KXMLGUIClient}}
A KXMLGUIClient can be used with {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} to create a GUI from actions and an XML document, and can be dynamically merged with other KXMLGUIClients.  


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

Inheritance diagram for KXMLGUIClient:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=217pt]{classKXMLGUIClient__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KXMLGUIClient:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=115pt]{classKXMLGUIClient__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf Reverse\-State\-Change} \{ {\bf State\-No\-Reverse}, 
{\bf State\-Reverse}
 \}
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KXMLGUIClient} ()
\item 
{\bf KXMLGUIClient} ({\bf KXMLGUIClient} $\ast$parent)
\item 
virtual {\bf $\sim$KXMLGUIClient} ()
\item 
{\bf KAction} $\ast$ {\bf action} (const char $\ast$name) const 
\item 
virtual {\bf KAction} $\ast$ {\bf action} (const {\bf QDom\-Element} \&element) const 
\item 
virtual {\bf KAction\-Collection} $\ast$ {\bf action\-Collection} () const 
\item 
virtual {\bf KInstance} $\ast$ {\bf instance} () const 
\item 
virtual {\bf QDom\-Document} {\bf dom\-Document} () const 
\item 
virtual {\bf QString} {\bf xml\-File} () const 
\item 
virtual {\bf QString} {\bf local\-XMLFile} () const \label{classKXMLGUIClient_a9}

\item 
void {\bf set\-XMLGUIBuild\-Document} (const {\bf QDom\-Document} \&doc)\label{classKXMLGUIClient_a10}

\item 
{\bf QDom\-Document} {\bf xmlgui\-Build\-Document} () const \label{classKXMLGUIClient_a11}

\item 
void {\bf set\-Factory} ({\bf KXMLGUIFactory} $\ast$factory)
\item 
{\bf KXMLGUIFactory} $\ast$ {\bf factory} () const 
\item 
{\bf KXMLGUIClient} $\ast$ {\bf parent\-Client} () const 
\item 
void {\bf insert\-Child\-Client} ({\bf KXMLGUIClient} $\ast$child)
\item 
void {\bf remove\-Child\-Client} ({\bf KXMLGUIClient} $\ast$child)
\item 
const {\bf QPtr\-List}$<$ {\bf KXMLGUIClient} $>$ $\ast$ {\bf child\-Clients} ()
\item 
void {\bf set\-Client\-Builder} ({\bf KXMLGUIBuilder} $\ast$builder)
\item 
{\bf KXMLGUIBuilder} $\ast$ {\bf client\-Builder} () const 
\item 
void {\bf reload\-XML} ()
\item 
void {\bf plug\-Action\-List} (const {\bf QString} \&name, const {\bf QPtr\-List}$<$ {\bf KAction} $>$ \&action\-List)
\item 
void {\bf unplug\-Action\-List} (const {\bf QString} \&name)
\item 
void {\bf add\-State\-Action\-Enabled} (const {\bf QString} \&state, const {\bf QString} \&action)\label{classKXMLGUIClient_a23}

\item 
void {\bf add\-State\-Action\-Disabled} (const {\bf QString} \&state, const {\bf QString} \&action)\label{classKXMLGUIClient_a24}

\item 
State\-Change {\bf get\-Actions\-To\-Change\-For\-State} (const {\bf QString} \&state)\label{classKXMLGUIClient_a25}

\item 
void {\bf begin\-XMLPlug} ({\bf QWidget} $\ast$)
\item 
void {\bf end\-XMLPlug} ()
\item 
void {\bf prepare\-XMLUnplug} ({\bf QWidget} $\ast$)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf QString} {\bf find\-Most\-Recent\-XMLFile} (const {\bf QString\-List} \&files, {\bf QString} \&doc)\label{classKXMLGUIClient_e0}

\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf set\-Instance} ({\bf KInstance} $\ast$instance)
\item 
virtual void {\bf set\-XMLFile} (const {\bf QString} \&file, bool merge=false, bool set\-XMLDoc=true)
\item 
virtual void {\bf set\-Local\-XMLFile} (const {\bf QString} \&file)\label{classKXMLGUIClient_b2}

\item 
virtual void {\bf set\-XML} (const {\bf QString} \&document, bool merge=false)
\item 
virtual void {\bf set\-DOMDocument} (const {\bf QDom\-Document} \&document, bool merge=false)
\item 
virtual void {\bf conserve\-Memory} ()
\item 
virtual void {\bf state\-Changed} (const {\bf QString} \&newstate, Reverse\-State\-Change reverse=State\-No\-Reverse)
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKXMLGUIClient_b7}

\end{CompactItemize}
\subsection*{Friends}
\begin{CompactItemize}
\item 
class {\bf KEdit\-Toolbar\-Widget}\label{classKXMLGUIClient_n0}

\end{CompactItemize}


\subsection{Detailed Description}
A KXMLGUIClient can be used with {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} to create a GUI from actions and an XML document, and can be dynamically merged with other KXMLGUIClients. 



Definition at line 43 of file kxmlguiclient.h.

\subsection{Constructor \& Destructor Documentation}
\index{KXMLGUIClient@{KXMLGUIClient}!KXMLGUIClient@{KXMLGUIClient}}
\index{KXMLGUIClient@{KXMLGUIClient}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KXMLGUIClient::KXMLGUIClient ()}\label{classKXMLGUIClient_a0}


Constructs a KXMLGUIClient which can be used with a {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} to create a GUI from actions and an XML document, and which can be dynamically merged with other KXMLGUIClients. 



Definition at line 67 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!KXMLGUIClient@{KXMLGUIClient}}
\index{KXMLGUIClient@{KXMLGUIClient}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KXMLGUIClient::KXMLGUIClient ({\bf KXMLGUIClient} $\ast$ {\em parent})}\label{classKXMLGUIClient_a1}


Constructs a KXMLGUIClient which can be used with a {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} to create a GUI from actions and an XML document, and which can be dynamically merged with other KXMLGUIClients. 

This constructor takes an additional {\tt parent} argument, which makes the client a child client of the parent.

Child clients are automatically added to the GUI if the parent is added. 

Definition at line 72 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!~KXMLGUIClient@{$\sim$KXMLGUIClient}}
\index{~KXMLGUIClient@{$\sim$KXMLGUIClient}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KXMLGUIClient::$\sim${\bf KXMLGUIClient} ()\hspace{0.3cm}{\tt  [virtual]}}\label{classKXMLGUIClient_a2}


Destructs the KXMLGUIClient. 



Definition at line 78 of file kxmlguiclient.cpp.

\subsection{Member Function Documentation}
\index{KXMLGUIClient@{KXMLGUIClient}!action@{action}}
\index{action@{action}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAction} $\ast$ KXMLGUIClient::action (const char $\ast$ {\em name}) const}\label{classKXMLGUIClient_a3}


Retrieves an action of the client by name. 

If not found, it looks in its child clients. This method is provided for convenience, as it uses {\bf action\-Collection()}{\rm (p.\,\pageref{classKXMLGUIClient_a5})} to get the action object. 

Definition at line 93 of file kxmlguiclient.cpp.

References KAction\-Collection::action(), and action\-Collection().\index{KXMLGUIClient@{KXMLGUIClient}!action@{action}}
\index{action@{action}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAction} $\ast$ KXMLGUIClient::action (const {\bf QDom\-Element} \& {\em element}) const\hspace{0.3cm}{\tt  [virtual]}}\label{classKXMLGUIClient_a4}


Retrieves an action for a given {\bf QDom\-Element}. 

The default implementation uses the \char`\"{}name\char`\"{} attribute to query the action object via the other {\bf action()}{\rm (p.\,\pageref{classKXMLGUIClient_a3})} method. 

Definition at line 117 of file kxmlguiclient.cpp.

References KAction\-Collection::action(), action\-Collection(), and KGlobal::static\-QString().\index{KXMLGUIClient@{KXMLGUIClient}!actionCollection@{actionCollection}}
\index{actionCollection@{actionCollection}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KAction\-Collection} $\ast$ KXMLGUIClient::action\-Collection () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKXMLGUIClient_a5}


Retrieves the entire action collection for the GUI client. 

If you subclass KXMLGUIClient you should call {\bf KAction\-Collection::set\-Widget( QWidget$\ast$ )}{\rm (p.\,\pageref{classKActionCollection_a4})} with this object, or you will encounter subtle bugs with {\bf KAction}{\rm (p.\,\pageref{classKAction})} keyboard shortcuts. This is not necessary if your KXMLGUIClient is a {\bf KMain\-Window}{\rm (p.\,\pageref{classKMainWindow})}.

\begin{Desc}
\item[See also:]{\bf KAction\-Collection::set\-Widget( QWidget$\ast$ )}{\rm (p.\,\pageref{classKActionCollection_a4})} \end{Desc}


Reimplemented in {\bf KEdit\-Toolbar\-Widget} {\rm (p.\,\pageref{classKEditToolbarWidget_a5})}.

Definition at line 107 of file kxmlguiclient.cpp.

Referenced by action(), begin\-XMLPlug(), KXMLGUIFactory::configure\-Shortcuts(), KMain\-Window::configure\-Toolbars(), KMain\-Window::create\-GUI(), KMain\-Window::create\-Standard\-Status\-Bar\-Action(), end\-XMLPlug(), KMain\-Window\-Interface::KMain\-Window\-Interface(), prepare\-XMLUnplug(), set\-DOMDocument(), set\-Instance(), KMain\-Window::setup\-GUI(), set\-XMLFile(), and state\-Changed().\index{KXMLGUIClient@{KXMLGUIClient}!instance@{instance}}
\index{instance@{instance}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KInstance} $\ast$ KXMLGUIClient::instance () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKXMLGUIClient_a6}


\begin{Desc}
\item[Returns:]The instance ( {\bf KInstance} ) for this GUI client. \end{Desc}


Definition at line 123 of file kxmlguiclient.cpp.

Referenced by KMain\-Window::create\-GUI(), KMain\-Window::help\-Menu(), set\-Client\-Builder(), set\-Instance(), and set\-XMLFile().\index{KXMLGUIClient@{KXMLGUIClient}!domDocument@{domDocument}}
\index{domDocument@{domDocument}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QDom\-Document} KXMLGUIClient::dom\-Document () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKXMLGUIClient_a7}


\begin{Desc}
\item[Returns:]The parsed XML in a {\bf QDom\-Document}, set by {\bf set\-XMLFile()}{\rm (p.\,\pageref{classKXMLGUIClient_b1})} or {\bf set\-XML()}{\rm (p.\,\pageref{classKXMLGUIClient_b3})}. This document describes the layout of the GUI. \end{Desc}


Definition at line 128 of file kxmlguiclient.cpp.

Referenced by KMain\-Window::create\-GUI().\index{KXMLGUIClient@{KXMLGUIClient}!xmlFile@{xmlFile}}
\index{xmlFile@{xmlFile}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QString} KXMLGUIClient::xml\-File () const\hspace{0.3cm}{\tt  [virtual]}}\label{classKXMLGUIClient_a8}


This will return the name of the XML file as set by {\bf set\-XMLFile()}{\rm (p.\,\pageref{classKXMLGUIClient_b1})}. 

If {\bf set\-XML()}{\rm (p.\,\pageref{classKXMLGUIClient_b3})} is used directly, then this will return NULL.

The filename that this returns is obvious for components as each component has exactly one XML file. In non-components, however, there are usually two: the global file and the local file. This function doesn't really care about that, though. It will always return the last XML file set. This, in almost all cases, will be the local XML file.

\begin{Desc}
\item[Returns:]The name of the XML file or QString::null \end{Desc}


Definition at line 133 of file kxmlguiclient.cpp.

Referenced by KXMLGUIFactory::configure\-Shortcuts(), KMain\-Window::configure\-Toolbars(), reload\-XML(), KEdit\-Toolbar\-Widget::save(), and KMain\-Window::save\-New\-Toolbar\-Config().\index{KXMLGUIClient@{KXMLGUIClient}!setFactory@{setFactory}}
\index{setFactory@{setFactory}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::set\-Factory ({\bf KXMLGUIFactory} $\ast$ {\em factory})}\label{classKXMLGUIClient_a12}


This method is called by the {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} as soon as the client is added to the KXMLGUIFactory's GUI. 



Definition at line 550 of file kxmlguiclient.cpp.

References factory().\index{KXMLGUIClient@{KXMLGUIClient}!factory@{factory}}
\index{factory@{factory}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KXMLGUIFactory} $\ast$ KXMLGUIClient::factory () const}\label{classKXMLGUIClient_a13}


Retrieves a pointer to the {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} this client is associated with (will return 0L if the client's GUI has not been built by a {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})}. 



Definition at line 555 of file kxmlguiclient.cpp.

Referenced by KEdit\-Toolbar\-Widget::save(), set\-Factory(), and KMain\-Window::set\-Standard\-Tool\-Bar\-Menu\-Enabled().\index{KXMLGUIClient@{KXMLGUIClient}!parentClient@{parentClient}}
\index{parentClient@{parentClient}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KXMLGUIClient} $\ast$ KXMLGUIClient::parent\-Client () const}\label{classKXMLGUIClient_a14}


KXMLGUIClients can form a simple child/parent object tree. 

This method returns a pointer to the parent client or 0L if it has no parent client assigned. 

Definition at line 560 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!insertChildClient@{insertChildClient}}
\index{insertChildClient@{insertChildClient}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::insert\-Child\-Client ({\bf KXMLGUIClient} $\ast$ {\em child})}\label{classKXMLGUIClient_a15}


Use this method to make a client a child client of another client. 

Usually you don't need to call this method, as it is called automatically when using the second constructor, which takes a parent argument. 

Definition at line 565 of file kxmlguiclient.cpp.

References d, and remove\-Child\-Client().\index{KXMLGUIClient@{KXMLGUIClient}!removeChildClient@{removeChildClient}}
\index{removeChildClient@{removeChildClient}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::remove\-Child\-Client ({\bf KXMLGUIClient} $\ast$ {\em child})}\label{classKXMLGUIClient_a16}


Removes the given {\tt child} from the client's children list. 



Definition at line 573 of file kxmlguiclient.cpp.

References d.

Referenced by insert\-Child\-Client().\index{KXMLGUIClient@{KXMLGUIClient}!childClients@{childClients}}
\index{childClients@{childClients}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}const {\bf QPtr\-List}$<$ {\bf KXMLGUIClient} $>$ $\ast$ KXMLGUIClient::child\-Clients ()}\label{classKXMLGUIClient_a17}


Retrieves a list of all child clients. 



Definition at line 588 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!setClientBuilder@{setClientBuilder}}
\index{setClientBuilder@{setClientBuilder}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::set\-Client\-Builder ({\bf KXMLGUIBuilder} $\ast$ {\em builder})}\label{classKXMLGUIClient_a18}


A client can have an own {\bf KXMLGUIBuilder}{\rm (p.\,\pageref{classKXMLGUIBuilder})}. 

Use this method to assign your builder instance to the client (so that the {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} can use it when building the client's GUI)

Client specific guibuilders are useful if you want to create custom container widgets for your GUI. 

Definition at line 593 of file kxmlguiclient.cpp.

References instance().\index{KXMLGUIClient@{KXMLGUIClient}!clientBuilder@{clientBuilder}}
\index{clientBuilder@{clientBuilder}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KXMLGUIBuilder} $\ast$ KXMLGUIClient::client\-Builder () const}\label{classKXMLGUIClient_a19}


Retrieves the client's GUI builder or 0L if no client specific builder has been assigned via {\bf set\-Client\-Builder()}{\rm (p.\,\pageref{classKXMLGUIClient_a18})}. 



Definition at line 600 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!reloadXML@{reloadXML}}
\index{reloadXML@{reloadXML}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::reload\-XML ()}\label{classKXMLGUIClient_a20}


Forces this client to re-read its XML resource file. 

This is intended to be used when you know that the resource file has changed and you will soon be rebuilding the GUI. It has no useful effect with non-KParts GUIs, so don't bother using it unless your app is component based. 

Definition at line 150 of file kxmlguiclient.cpp.

References QString::is\-Empty(), set\-XMLFile(), and xml\-File().\index{KXMLGUIClient@{KXMLGUIClient}!plugActionList@{plugActionList}}
\index{plugActionList@{plugActionList}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::plug\-Action\-List (const {\bf QString} \& {\em name}, const {\bf QPtr\-List}$<$ {\bf KAction} $>$ \& {\em action\-List})}\label{classKXMLGUIClient_a21}


Action\-Lists are a way for XMLGUI to support dynamic lists of actions. 

E.g. if you are writing a file manager, and there is a menu file whose contents depend on the mimetype of the file that is selected, then you can achieve this using Action\-Lists. It works as follows: In your xxxui.rc file ( the one that you set in {\bf set\-XMLFile()}{\rm (p.\,\pageref{classKXMLGUIClient_b1})} ), you put an 

$<$Action\-List name=\char`\"{}xxx\char`\"{}$>$ tag. E.g. 

\footnotesize\begin{verbatim}
   * <kpartgui name="xxx_part" version="1">
   * <MenuBar>
   *   <Menu name="file">
   *     ...  <!-- some useful actions-->
   *     <ActionList name="xxx_file_actionlist" />
   *     ...  <!-- even more useful actions-->
   *   </Menu>
   *   ...
   * </MenuBar>
   * </kpartgui>
   * \end{verbatim}
\normalsize


This tag will get expanded to a list of actions. In the example above ( a file manager with a dynamic file menu ), you would call 

\footnotesize\begin{verbatim} QPtrList<KAction> file_actions;
 for( ... )
   if( ... )
     file_actions.append( cool_action );
 unplugActionList( "xxx_file_actionlist" );
 plugActionList( "xxx_file_actionlist", file_actions );
\end{verbatim}
\normalsize
 every time a file is selected, unselected or ...

\begin{Desc}
\item[Note:]You should not call create\-GUI() after calling this function. In fact, that would remove the newly added actionlists again... 

Forgetting to call {\bf unplug\-Action\-List()}{\rm (p.\,\pageref{classKXMLGUIClient_a22})} before {\bf plug\-Action\-List()}{\rm (p.\,\pageref{classKXMLGUIClient_a21})} would leave the previous actions in the menu too.. \end{Desc}


Definition at line 605 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!unplugActionList@{unplugActionList}}
\index{unplugActionList@{unplugActionList}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::unplug\-Action\-List (const {\bf QString} \& {\em name})}\label{classKXMLGUIClient_a22}


The complement of {\bf plug\-Action\-List()}{\rm (p.\,\pageref{classKXMLGUIClient_a21})} ... 



Definition at line 613 of file kxmlguiclient.cpp.\index{KXMLGUIClient@{KXMLGUIClient}!beginXMLPlug@{beginXMLPlug}}
\index{beginXMLPlug@{beginXMLPlug}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::begin\-XMLPlug ({\bf QWidget} $\ast$)}\label{classKXMLGUIClient_a26}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 926 of file kxmlguiclient.cpp.

References action\-Collection(), and KAction\-Collection::begin\-XMLPlug().\index{KXMLGUIClient@{KXMLGUIClient}!endXMLPlug@{endXMLPlug}}
\index{endXMLPlug@{endXMLPlug}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::end\-XMLPlug ()}\label{classKXMLGUIClient_a27}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 934 of file kxmlguiclient.cpp.

References action\-Collection(), and KAction\-Collection::end\-XMLPlug().\index{KXMLGUIClient@{KXMLGUIClient}!prepareXMLUnplug@{prepareXMLUnplug}}
\index{prepareXMLUnplug@{prepareXMLUnplug}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::prepare\-XMLUnplug ({\bf QWidget} $\ast$)}\label{classKXMLGUIClient_a28}


\begin{Desc}
\item[Since:]3.1 \end{Desc}




Definition at line 942 of file kxmlguiclient.cpp.

References action\-Collection(), and KAction\-Collection::prepare\-XMLUnplug().\index{KXMLGUIClient@{KXMLGUIClient}!setInstance@{setInstance}}
\index{setInstance@{setInstance}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::set\-Instance ({\bf KInstance} $\ast$ {\em instance})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXMLGUIClient_b0}


Sets the instance ( {\bf KInstance}) for this part. 

Call this first in the inherited class constructor. (At least before {\bf set\-XMLFile()}{\rm (p.\,\pageref{classKXMLGUIClient_b1})}.) 

Definition at line 157 of file kxmlguiclient.cpp.

References action\-Collection(), instance(), and KAction\-Collection::set\-Instance().\index{KXMLGUIClient@{KXMLGUIClient}!setXMLFile@{setXMLFile}}
\index{setXMLFile@{setXMLFile}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::set\-XMLFile (const {\bf QString} \& {\em file}, bool {\em merge} = {\tt false}, bool {\em set\-XMLDoc} = {\tt true})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXMLGUIClient_b1}


Sets the name of the rc file containing the XML for the part. 

Call this in the Part-inherited class constructor.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em file}]Either an absolute path for the file, or simply the filename, which will then be assumed to be installed in the \char`\"{}data\char`\"{} resource, under a directory named like the instance. \item[{\em merge}]Whether to merge with the global document. \item[{\em set\-XMLDoc}]Specify whether to call set\-XML. Default is true. and the DOM document at once. \end{description}
\end{Desc}


Definition at line 165 of file kxmlguiclient.cpp.

References action\-Collection(), KInstance::dirs(), endl(), KStandard\-Dirs::find\-All\-Resources(), QString::from\-Latin1(), instance(), QString::is\-Empty(), kd\-Warning(), set\-XML(), and KAction\-Collection::set\-XMLFile().

Referenced by KMain\-Window::create\-GUI(), reload\-XML(), and KEdit\-Toolbar\-Widget::save().\index{KXMLGUIClient@{KXMLGUIClient}!setXML@{setXML}}
\index{setXML@{setXML}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::set\-XML (const {\bf QString} \& {\em document}, bool {\em merge} = {\tt false})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXMLGUIClient_b3}


Sets the XML for the part. 

Call this in the Part-inherited class constructor if you don't call {\bf set\-XMLFile()}{\rm (p.\,\pageref{classKXMLGUIClient_b1})}. 

Definition at line 217 of file kxmlguiclient.cpp.

References QDom\-Document::set\-Content(), and set\-DOMDocument().

Referenced by set\-XMLFile().\index{KXMLGUIClient@{KXMLGUIClient}!setDOMDocument@{setDOMDocument}}
\index{setDOMDocument@{setDOMDocument}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::set\-DOMDocument (const {\bf QDom\-Document} \& {\em document}, bool {\em merge} = {\tt false})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXMLGUIClient_b4}


Sets the Document for the part, describing the layout of the GUI. 

Call this in the Part-inherited class constructor if you don't call set\-XMLFile or set\-XML . 

Definition at line 224 of file kxmlguiclient.cpp.

References action\-Collection(), and QDom\-Document::document\-Element().

Referenced by set\-XML().\index{KXMLGUIClient@{KXMLGUIClient}!conserveMemory@{conserveMemory}}
\index{conserveMemory@{conserveMemory}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::conserve\-Memory ()\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXMLGUIClient_b5}


This function will attempt to give up some memory after the GUI is built. 

It should never be used in apps where the GUI may be rebuilt at some later time (components, for instance). 

Definition at line 534 of file kxmlguiclient.cpp.

Referenced by KMain\-Window::create\-GUI().\index{KXMLGUIClient@{KXMLGUIClient}!stateChanged@{stateChanged}}
\index{stateChanged@{stateChanged}!KXMLGUIClient@{KXMLGUIClient}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KXMLGUIClient::state\-Changed (const {\bf QString} \& {\em newstate}, Reverse\-State\-Change {\em reverse} = {\tt StateNoReverse})\hspace{0.3cm}{\tt  [protected, virtual]}}\label{classKXMLGUIClient_b6}


Actions can collectively be assigned a \char`\"{}State\char`\"{}. 

To accomplish this the respective actions are tagged as $<$enable$>$ or $<$disable$>$ in a $<$State$>$ $<$/State$>$ group of the XMLfile. During program execution the programmer can call {\bf state\-Changed()}{\rm (p.\,\pageref{classKXMLGUIClient_b6})} to set actions to a defined state.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em newstate}]Name of a State in the XMLfile. \item[{\em reverse}]If the flag reverse is set to State\-Reverse, the State is reversed. (actions to be enabled will be disabled and action to be disabled will be enabled) Default is reverse=false. \end{description}
\end{Desc}


Definition at line 899 of file kxmlguiclient.cpp.

References KAction\-Collection::action(), and action\-Collection().

Referenced by KMain\-Window::slot\-State\-Changed().

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