\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=231pt]{classKXMLGUIClient__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KXMLGUIClient:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=127pt]{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} ()
\begin{CompactList}\small\item\em 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. \item\end{CompactList}\item 
{\bf KXMLGUIClient} ({\bf KXMLGUIClient} $\ast$parent)
\begin{CompactList}\small\item\em 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. \item\end{CompactList}\item 
virtual {\bf $\sim$KXMLGUIClient} ()
\begin{CompactList}\small\item\em Destructs the KXMLGUIClient. \item\end{CompactList}\item 
{\bf KAction} $\ast$ {\bf action} (const  char $\ast$name) const 
\begin{CompactList}\small\item\em Retrieves an action of the client by name. \item\end{CompactList}\item 
virtual {\bf KAction} $\ast$ {\bf action} (const  {\bf QDom\-Element} \&element) const 
\begin{CompactList}\small\item\em Retrieves an action for a given {\bf QDom\-Element}. \item\end{CompactList}\item 
virtual {\bf KAction\-Collection} $\ast$ {\bf action\-Collection} () const 
\begin{CompactList}\small\item\em Retrieves the entire action collection for the GUI client. \item\end{CompactList}\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 
\begin{CompactList}\small\item\em This will return the name of the XML file as set by {\bf set\-XMLFile}{\rm (p.\,\pageref{classKXMLGUIClient_b1})}(). \item\end{CompactList}\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)
\begin{CompactList}\small\item\em This method is called by the {\bf KXMLGUIFactory}{\rm (p.\,\pageref{classKXMLGUIFactory})} as soon as the client is added to the KXMLGUIFactory's GUI. \item\end{CompactList}\item 
{\bf KXMLGUIFactory} $\ast$ {\bf factory} () const 
\begin{CompactList}\small\item\em 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})}. \item\end{CompactList}\item 
{\bf KXMLGUIClient} $\ast$ {\bf parent\-Client} () const 
\begin{CompactList}\small\item\em KXMLGUIClients can form a simple child/parent object tree. \item\end{CompactList}\item 
void {\bf insert\-Child\-Client} ({\bf KXMLGUIClient} $\ast$child)
\begin{CompactList}\small\item\em Use this method to make a client a child client of another client. \item\end{CompactList}\item 
void {\bf remove\-Child\-Client} ({\bf KXMLGUIClient} $\ast$child)
\begin{CompactList}\small\item\em Removes the given {\tt child} from the client's children list. \item\end{CompactList}\item 
const  {\bf QPtr\-List}$<$ {\bf KXMLGUIClient} $>$ $\ast$ {\bf child\-Clients} ()
\begin{CompactList}\small\item\em Retrieves a list of all child clients. \item\end{CompactList}\item 
void {\bf set\-Client\-Builder} ({\bf KXMLGUIBuilder} $\ast$builder)
\begin{CompactList}\small\item\em A client can have an own {\bf KXMLGUIBuilder}{\rm (p.\,\pageref{classKXMLGUIBuilder})}. \item\end{CompactList}\item 
{\bf KXMLGUIBuilder} $\ast$ {\bf client\-Builder} () const 
\begin{CompactList}\small\item\em 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})}(). \item\end{CompactList}\item 
void {\bf reload\-XML} ()
\begin{CompactList}\small\item\em Forces this client to re-read its XML resource file. \item\end{CompactList}\item 
void {\bf plug\-Action\-List} (const  {\bf QString} \&name, const  {\bf QPtr\-List}$<$ {\bf KAction} $>$ \&action\-List)
\begin{CompactList}\small\item\em Action\-Lists are a way for XMLGUI to support dynamic lists of actions. \item\end{CompactList}\item 
void {\bf unplug\-Action\-List} (const  {\bf QString} \&name)
\begin{CompactList}\small\item\em The complement of {\bf plug\-Action\-List}{\rm (p.\,\pageref{classKXMLGUIClient_a21})}() ... \item\end{CompactList}\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$)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
void {\bf end\-XMLPlug} ()
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\item 
void {\bf prepare\-XMLUnplug} ({\bf QWidget} $\ast$)
\begin{CompactList}\small\item\em \begin{Desc}
\item[Since:]3.1 \end{Desc}
\item\end{CompactList}\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
{\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)
\begin{CompactList}\small\item\em Sets the instance ({\bf KInstance}) for this part. \item\end{CompactList}\item 
virtual void {\bf set\-XMLFile} (const  {\bf QString} \&file, bool merge=false, bool set\-XMLDoc=true)
\begin{CompactList}\small\item\em Sets the name of the rc file containing the XML for the part. \item\end{CompactList}\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)
\begin{CompactList}\small\item\em Sets the XML for the part. \item\end{CompactList}\item 
virtual void {\bf set\-DOMDocument} (const  {\bf QDom\-Document} \&document, bool merge=false)
\begin{CompactList}\small\item\em Sets the Document for the part, describing the layout of the GUI. \item\end{CompactList}\item 
virtual void {\bf conserve\-Memory} ()
\begin{CompactList}\small\item\em This function will attempt to give up some memory after the GUI is built. \item\end{CompactList}\item 
virtual void {\bf state\-Changed} (const  {\bf QString} \&newstate, Reverse\-State\-Change reverse=State\-No\-Reverse)
\begin{CompactList}\small\item\em Actions can collectively be assigned a \char`\"{}State\char`\"{}. \item\end{CompactList}\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 41 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.

References insert\-Child\-Client().\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.

References QPtr\-List\-Iterator::current().

\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(), action\-Collection(), QPtr\-List\-Iterator::current(), and KStd\-Accel::name().

Referenced by state\-Changed().\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 115 of file kxmlguiclient.cpp.

References KAction\-Collection::action(), action\-Collection(), QDom\-Element::attribute(), 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. 



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

Definition at line 107 of file kxmlguiclient.cpp.

Referenced by action(), begin\-XMLPlug(), KMain\-Window::create\-GUI(), end\-XMLPlug(), KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), KMain\-Window\-Interface::KMain\-Window\-Interface(), prepare\-XMLUnplug(), set\-DOMDocument(), set\-Instance(), 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 part. \end{Desc}


Definition at line 121 of file kxmlguiclient.cpp.

Referenced by KMain\-Window::create\-GUI(), KMain\-Window::help\-Menu(), KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), set\-Client\-Builder(), 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 126 of file kxmlguiclient.cpp.

Referenced by KXMLGUIFactory::add\-Client(), KMain\-Window::create\-GUI(), KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), and KXMLGUIFactory::remove\-Client().\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 131 of file kxmlguiclient.cpp.

Referenced by KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), reload\-XML(), and KEdit\-Toolbar\-Widget::save().\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 543 of file kxmlguiclient.cpp.

Referenced by KXMLGUIFactory::add\-Client(), KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), and KXMLGUIFactory::remove\-Client().\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 548 of file kxmlguiclient.cpp.

Referenced by KXMLGUIFactory::add\-Client(), KXMLGUIFactory::remove\-Client(), KEdit\-Toolbar\-Widget::save(), 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 553 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 arent argument. 

Definition at line 558 of file kxmlguiclient.cpp.

References d.

Referenced by KXMLGUIClient().\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 566 of file kxmlguiclient.cpp.

References d.\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 581 of file kxmlguiclient.cpp.

Referenced by KXMLGUIFactory::add\-Client(), and KXMLGUIFactory::remove\-Client().\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 586 of file kxmlguiclient.cpp.

References instance(), and KXMLGUIBuilder::set\-Builder\-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 593 of file kxmlguiclient.cpp.

Referenced by KXMLGUIFactory::add\-Client(), and KXMLGUIFactory::remove\-Client().\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 148 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  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 598 of file kxmlguiclient.cpp.

References KStd\-Accel::name().\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 606 of file kxmlguiclient.cpp.

References KStd\-Accel::name().\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 914 of file kxmlguiclient.cpp.

References action\-Collection(), KAction\-Collection::begin\-XMLPlug(), and QPtr\-List\-Iterator::current().

Referenced by KXMLGUIFactory::add\-Client().\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 922 of file kxmlguiclient.cpp.

References action\-Collection(), QPtr\-List\-Iterator::current(), and KAction\-Collection::end\-XMLPlug().

Referenced by KXMLGUIFactory::add\-Client().\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 930 of file kxmlguiclient.cpp.

References action\-Collection(), QPtr\-List\-Iterator::current(), and KAction\-Collection::prepare\-XMLUnplug().

Referenced by KXMLGUIFactory::remove\-Client().\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 155 of file kxmlguiclient.cpp.

References action\-Collection(), KNotify\-Client::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} = false, bool {\em set\-XMLDoc} = 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 set\-XML}]Specify whether to call set\-XML. Default is true. and the DOM document at once. \end{description}
\end{Desc}


Definition at line 163 of file kxmlguiclient.cpp.

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

Referenced by KMain\-Window::create\-GUI(), KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), 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} = 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 209 of file kxmlguiclient.cpp.

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

Referenced by KEdit\-Toolbar\-Widget::KEdit\-Toolbar\-Widget(), and 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} = 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 {\bf set\-XMLFile}{\rm (p.\,\pageref{classKXMLGUIClient_b1})} or {\bf set\-XML}{\rm (p.\,\pageref{classKXMLGUIClient_b3})} . 

Definition at line 216 of file kxmlguiclient.cpp.

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

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 527 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} = State\-No\-Reverse)\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  or  in a   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 887 of file kxmlguiclient.cpp.

References KStd\-Accel::action(), KAction\-Collection::action(), 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}
