\section{KData\-Tool\-Action Class Reference}
\label{classKDataToolAction}\index{KDataToolAction@{KDataToolAction}}
This class helps applications implement support for {\bf KData\-Tool}{\rm (p.\,\pageref{classKDataTool})}.  


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

Inheritance diagram for KData\-Tool\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=63pt]{classKDataToolAction__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KData\-Tool\-Action:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=201pt]{classKDataToolAction__coll__graph}
\end{center}
\end{figure}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf tool\-Activated} (const {\bf KData\-Tool\-Info} \&info, const {\bf QString} \&command)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KData\-Tool\-Action} (const {\bf QString} \&{\bf text}, const {\bf KData\-Tool\-Info} \&info, const {\bf QString} \&command, {\bf QObject} $\ast${\bf parent}=0, const char $\ast${\bf name}=0)
\end{CompactItemize}
\subsection*{Static Public Member Functions}
\begin{CompactItemize}
\item 
static {\bf QPtr\-List}$<$ {\bf KAction} $>$ {\bf data\-Tool\-Action\-List} (const {\bf QValue\-List}$<$ {\bf KData\-Tool\-Info} $>$ \&tools, const {\bf QObject} $\ast$receiver, const char $\ast$slot)
\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf slot\-Activated} ()\label{classKDataToolAction_b0}

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

\end{CompactItemize}


\subsection{Detailed Description}
This class helps applications implement support for {\bf KData\-Tool}{\rm (p.\,\pageref{classKDataTool})}. 

The steps to follow are simple: \begin{itemize}
\item query for the available tools using {\bf KData\-Tool\-Info::query}{\rm (p.\,\pageref{classKDataToolInfo_e0})} \item pass the result to {\bf KData\-Tool\-Action::data\-Tool\-Action\-List}{\rm (p.\,\pageref{classKDataToolAction_e0})} (with a slot) \item plug the resulting actions, either using {\bf KXMLGUIClient::plug\-Action\-List}, or by hand.\end{itemize}
The slot defined for step 2 is called when the action is activated, and that's where the tool should be created and run. 



Definition at line 194 of file kdatatool.h.

\subsection{Constructor \& Destructor Documentation}
\index{KDataToolAction@{KData\-Tool\-Action}!KDataToolAction@{KDataToolAction}}
\index{KDataToolAction@{KDataToolAction}!KDataToolAction@{KData\-Tool\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KData\-Tool\-Action::KData\-Tool\-Action (const {\bf QString} \& {\em text}, const {\bf KData\-Tool\-Info} \& {\em info}, const {\bf QString} \& {\em command}, {\bf QObject} $\ast$ {\em parent} = {\tt 0}, const char $\ast$ {\em name} = {\tt 0})}\label{classKDataToolAction_a0}


Constructs a new KData\-Tool\-Action. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em text}]The text that will be displayed. \item[{\em info}]the corresponding {\bf KData\-Tool\-Info}{\rm (p.\,\pageref{classKDataToolInfo})} \item[{\em command}]the command of the action \item[{\em parent}]This action's parent. \item[{\em name}]An internal name for this action. \end{description}
\end{Desc}


Definition at line 226 of file kdatatool.cpp.

Referenced by data\-Tool\-Action\-List().

\subsection{Member Function Documentation}
\index{KDataToolAction@{KData\-Tool\-Action}!dataToolActionList@{dataToolActionList}}
\index{dataToolActionList@{dataToolActionList}!KDataToolAction@{KData\-Tool\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf QPtr\-List}$<$ {\bf KAction} $>$ KData\-Tool\-Action::data\-Tool\-Action\-List (const {\bf QValue\-List}$<$ {\bf KData\-Tool\-Info} $>$ \& {\em tools}, const {\bf QObject} $\ast$ {\em receiver}, const char $\ast$ {\em slot})\hspace{0.3cm}{\tt  [static]}}\label{classKDataToolAction_e0}


Creates a list of actions from a list of information about data-tools. 

The slot must have a signature corresponding to the tool\-Activated signal.

Note that it's the caller's responsibility to delete the actions when they're not needed anymore. \begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em tools}]the list of data tool descriptions \item[{\em receiver}]the receiver for {\bf tool\-Activated()}{\rm (p.\,\pageref{classKDataToolAction_l0})} signals \item[{\em slot}]the slot that will receive the {\bf tool\-Activated()}{\rm (p.\,\pageref{classKDataToolAction_l0})} signals \end{description}
\end{Desc}
\begin{Desc}
\item[Returns:]the KActions \end{Desc}


Definition at line 239 of file kdatatool.cpp.

References QPtr\-List::append(), QObject::connect(), QValue\-List::end(), endl(), KData\-Tool\-Action(), kd\-Warning(), and tool\-Activated().\index{KDataToolAction@{KData\-Tool\-Action}!toolActivated@{toolActivated}}
\index{toolActivated@{toolActivated}!KDataToolAction@{KData\-Tool\-Action}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KData\-Tool\-Action::tool\-Activated (const {\bf KData\-Tool\-Info} \& {\em info}, const {\bf QString} \& {\em command})\hspace{0.3cm}{\tt  [signal]}}\label{classKDataToolAction_l0}


Emitted when a tool has been activated. 

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em info}]a description of the activated tools \item[{\em command}]the command for the tool \end{description}
\end{Desc}


Referenced by data\-Tool\-Action\-List().

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