\section{KData\-Tool Class Reference}
\label{classKDataTool}\index{KDataTool@{KDataTool}}
A generic tool that processes data.  


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

Inheritance diagram for KData\-Tool:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=50pt]{classKDataTool__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KData\-Tool:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=100pt]{classKDataTool__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf KData\-Tool} ({\bf QObject} $\ast${\bf parent}=0, const  char $\ast${\bf name}=0)
\begin{CompactList}\small\item\em Constructor The data-tool is only created when a menu-item, that relates to it, is activated. \item\end{CompactList}\item 
void {\bf set\-Instance} ({\bf KInstance} $\ast$instance)\label{classKDataTool_a1}

\item 
{\bf KInstance} $\ast$ {\bf instance} () const 
\item 
virtual bool {\bf run} (const  {\bf QString} \&command, void $\ast$data, const  {\bf QString} \&datatype, const  {\bf QString} \&mimetype)=0
\begin{CompactList}\small\item\em Interface for 'running' this tool. \item\end{CompactList}\end{CompactItemize}
\subsection*{Protected Member Functions}
\begin{CompactItemize}
\item 
virtual void {\bf virtual\_\-hook} (int id, void $\ast$data)\label{classKDataTool_b0}

\end{CompactItemize}


\subsection{Detailed Description}
A generic tool that processes data. 

A data-tool is a \char`\"{}plugin\char`\"{} for an application, that acts (reads/modifies) on a portion of the data present in the document (e.g. a text document, a single word or paragraph, a KSpread cell, an image, etc.)

The application has some generic code for presenting the tools in a popupmenu \begin{Desc}
\item[See also:]{\bf KData\-Tool\-Action}{\rm (p.\,\pageref{classKDataToolAction})}, and for activating a tool, passing it the data (and possibly getting modified data from it). \end{Desc}




Definition at line 210 of file kdatatool.h.

\subsection{Constructor \& Destructor Documentation}
\index{KDataTool@{KData\-Tool}!KDataTool@{KDataTool}}
\index{KDataTool@{KDataTool}!KDataTool@{KData\-Tool}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KData\-Tool::KData\-Tool ({\bf QObject} $\ast$ {\em parent} = 0, const char $\ast$ {\em name} = 0)}\label{classKDataTool_a0}


Constructor The data-tool is only created when a menu-item, that relates to it, is activated. 



Definition at line 277 of file kdatatool.cpp.

References KStd\-Accel::name().

\subsection{Member Function Documentation}
\index{KDataTool@{KData\-Tool}!instance@{instance}}
\index{instance@{instance}!KDataTool@{KData\-Tool}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}{\bf KInstance} $\ast$ KData\-Tool::instance () const}\label{classKDataTool_a2}


\begin{Desc}
\item[Returns:]the instance of the part that created this tool. Usually used if the tool wants to read its configuration in the app's config file. \end{Desc}


Definition at line 282 of file kdatatool.cpp.\index{KDataTool@{KData\-Tool}!run@{run}}
\index{run@{run}!KDataTool@{KData\-Tool}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KData\-Tool::run (const {\bf QString} \& {\em command}, void $\ast$ {\em data}, const {\bf QString} \& {\em datatype}, const {\bf QString} \& {\em mimetype})\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKDataTool_a3}


Interface for 'running' this tool. 

This is the method that the data-tool must implement.

\begin{Desc}
\item[Parameters:]
\begin{description}
\item[{\em command}]is the command that was selected (see {\bf KData\-Tool\-Info::commands()}{\rm (p.\,\pageref{classKDataToolInfo_a11})}) \item[{\em data}]the data provided by the application, on which to run the tool. The application is responsible for setting that data before running the tool, and for getting it back and updating itself with it, after the tool ran. \item[{\em datatype}]defines the type of {\tt data}. \item[{\em mimetype}]defines the mimetype of the data (for instance datatype may be {\bf QString}, but the mimetype can be text/plain, text/html etc.) \end{description}
\end{Desc}


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