.TH "KDataTool" kde3 "11 Jun 2005" "Version Version 3.4.1" "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
.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
.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 253 of file kdatatool.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDataTool::KDataTool (\fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP)"
.PP
Constructor The data-tool is only created when a menu-item, that relates to it, is activated. 
.PP
\fBParameters:\fP
.RS 4
\fIparent\fP the parent of the \fBQObject\fP (or 0 for parent-less KDataTools) 
.br
\fIname\fP the name of the \fBQObject\fP, can be 0 
.RE
.PP

.PP
Definition at line 277 of file kdatatool.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBKInstance\fP * KDataTool::instance () const"
.PP
Returns the instance of the part that created this tool. 
.PP
Usually used if the tool wants to read its configuration in the app's config file. 
.PP
\fBReturns:\fP
.RS 4
the instance of the part that created this tool. 
.RE
.PP

.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. 
.PP
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
\fBReturns:\fP
.RS 4
true if successful, false otherwise 
.RE
.PP


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