.TH "KDataTool" 3 "28 Jan 2004" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDataTool \- A generic tool that processes data.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kdatatool.h>\fP
.PP
Inherits \fBQObject\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKDataTool\fP (\fBQObject\fP *\fBparent\fP=0, const  char *\fBname\fP=0)"
.br
.RI "\fIConstructor The data-tool is only created when a menu-item, that relates to it, is activated. \fP"
.ti -1c
.RI "void \fBsetInstance\fP (\fBKInstance\fP *instance)"
.br
.ti -1c
.RI "\fBKInstance\fP * \fBinstance\fP () const "
.br
.ti -1c
.RI "virtual bool \fBrun\fP (const  \fBQString\fP &command, void *data, const  \fBQString\fP &datatype, const  \fBQString\fP &mimetype)=0"
.br
.RI "\fIInterface for 'running' this tool. \fP"
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SH "Detailed Description"
.PP 
A generic tool that processes data. 

A data-tool is a 'plugin' 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.)
.PP
The application has some generic code for presenting the tools in a popupmenu 
.PP
\fBSee also:\fP
.RS 4
\fBKDataToolAction\fP, and for activating a tool, passing it the data (and possibly getting modified data from it). 
.RE
.PP

.PP
Definition at line 210 of file kdatatool.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDataTool::KDataTool (\fBQObject\fP * parent = 0, const char * name = 0)"
.PP
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.
.PP
References KStdAccel::name().
.SH "Member Function Documentation"
.PP 
.SS "\fBKInstance\fP * KDataTool::instance () const"
.PP
\fBReturns:\fP
.RS 4
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. 
.RE
.PP
Definition at line 282 of file kdatatool.cpp.
.SS "virtual bool KDataTool::run (const \fBQString\fP & command, void * data, const \fBQString\fP & datatype, const \fBQString\fP & mimetype)\fC [pure virtual]\fP"
.PP
Interface for 'running' this tool. This is the method that the data-tool must implement.
.PP
\fBParameters:\fP
.RS 4
\fIcommand\fP is the command that was selected (see \fBKDataToolInfo::commands()\fP) 
.br
\fIdata\fP 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. 
.br
\fIdatatype\fP defines the type of \fCdata\fP. 
.br
\fImimetype\fP defines the mimetype of the data (for instance datatype may be \fBQString\fP, but the mimetype can be text/plain, text/html etc.) 
.RE
.PP


.SH "Author"
.PP 
Generated automatically by Doxygen for kio Library from the source code.
