.TH "KDataToolInfo" kde3 "11 Jun 2005" "Version Version 3.4.1" "kio Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KDataToolInfo \- This is a convenience class for \fBKService\fP.  

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

.in +1c
.ti -1c
.RI "\fBKDataToolInfo\fP ()"
.br
.ti -1c
.RI "\fBKDataToolInfo\fP (const \fBKService::Ptr\fP &service, \fBKInstance\fP *instance)"
.br
.ti -1c
.RI "\fBKDataToolInfo\fP (const \fBKDataToolInfo\fP &info)"
.br
.ti -1c
.RI "\fBKDataToolInfo\fP & \fBoperator=\fP (const \fBKDataToolInfo\fP &info)"
.br
.ti -1c
.RI "\fBQString\fP \fBdataType\fP () const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBmimeTypes\fP () const "
.br
.ti -1c
.RI "bool \fBisReadOnly\fP () const "
.br
.ti -1c
.RI "\fBQPixmap\fP \fBicon\fP () const KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQPixmap\fP \fBminiIcon\fP () const KDE_DEPRECATED"
.br
.ti -1c
.RI "\fBQString\fP \fBiconName\fP () const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBuserCommands\fP () const "
.br
.ti -1c
.RI "\fBQStringList\fP \fBcommands\fP () const "
.br
.ti -1c
.RI "\fBKDataTool\fP * \fBcreateTool\fP (\fBQObject\fP *parent=0, const char *name=0) const "
.br
.ti -1c
.RI "\fBKService::Ptr\fP \fBservice\fP () const "
.br
.ti -1c
.RI "\fBKInstance\fP * \fBinstance\fP () const "
.br
.ti -1c
.RI "bool \fBisValid\fP () const "
.br
.in -1c
.SS "Static Public Member Functions"

.in +1c
.ti -1c
.RI "static \fBQValueList\fP< \fBKDataToolInfo\fP > \fBquery\fP (const \fBQString\fP &datatype, const \fBQString\fP &mimetype, \fBKInstance\fP *instance)"
.br
.in -1c
.SH "Detailed Description"
.PP 
This is a convenience class for \fBKService\fP. 

You can use it if you have a \fBKService\fP describing a \fBKDataTool\fP. In this case the KDataToolInfo class is more convenient to work with.
.PP
Especially useful is the method createTool which creates the datatool described by the service. 
.PP
\fBSee also:\fP
.RS 4
\fBKDataTool\fP 
.RE
.PP

.PP
Definition at line 47 of file kdatatool.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KDataToolInfo::KDataToolInfo ()"
.PP
Create an invalid KDataToolInfo. 
.PP
Definition at line 38 of file kdatatool.cpp.
.PP
Referenced by query().
.SS "KDataToolInfo::KDataToolInfo (const \fBKService::Ptr\fP & service, \fBKInstance\fP * instance)"
.PP
Create a valid KDataToolInfo. 
.PP
\fBParameters:\fP
.RS 4
\fIservice\fP the corresponding service 
.br
\fIinstance\fP the instance to use 
.RE
.PP

.PP
Definition at line 43 of file kdatatool.cpp.
.PP
References endl(), instance(), kdDebug(), and service().
.SS "KDataToolInfo::KDataToolInfo (const \fBKDataToolInfo\fP & info)"
.PP
Copy constructor. 
.PP
Definition at line 56 of file kdatatool.cpp.
.SH "Member Function Documentation"
.PP 
.SS "\fBKDataToolInfo\fP & KDataToolInfo::operator= (const \fBKDataToolInfo\fP & info)"
.PP
Assignment operator. 
.PP
Definition at line 62 of file kdatatool.cpp.
.SS "\fBQString\fP KDataToolInfo::dataType () const"
.PP
Returns the data type that the DataTool can accept. 
.PP
\fBReturns:\fP
.RS 4
the C++ data type that this DataTool accepts. For example 'QString' or 'QImage' or something more complicated. 
.RE
.PP

.PP
Definition at line 69 of file kdatatool.cpp.
.SS "\fBQStringList\fP KDataToolInfo::mimeTypes () const"
.PP
Returns a list of mime type that will be accepted by the DataTool. 
.PP
The mimetypes are only used if the dataType can be used to store different mimetypes. For example in a 'QString' you could save 'text/plain' or 'text/html' or 'text/xml'.
.PP
\fBReturns:\fP
.RS 4
the mime types accepted by this DataTool. For example 'image/gif' or 'text/plain'. In some cases the dataType determines the accepted type of data perfectly. In this cases this list may be empty. 
.RE
.PP

.PP
Definition at line 77 of file kdatatool.cpp.
.SS "bool KDataToolInfo::isReadOnly () const"
.PP
Checks whether the DataTool is read-only. 
.PP
\fBReturns:\fP
.RS 4
true if the DataTool does not modify the data passed to it by \fBKDataTool::run\fP. 
.RE
.PP

.PP
Definition at line 85 of file kdatatool.cpp.
.SS "\fBQPixmap\fP KDataToolInfo::icon () const"
.PP
Returns the icon of this data tool. 
.PP
\fBReturns:\fP
.RS 4
a large pixmap for the DataTool. 
.RE
.PP
\fBDeprecated\fP
.RS 4
, use \fBiconName()\fP 
.RE
.PP

.PP
Definition at line 93 of file kdatatool.cpp.
.PP
References KGlobal::dirs(), QPixmap::load(), and KStandardDirs::resourceDirs().
.SS "\fBQPixmap\fP KDataToolInfo::miniIcon () const"
.PP
Returns the mini icon of this data tool. 
.PP
\fBReturns:\fP
.RS 4
a mini pixmap for the DataTool. 
.RE
.PP
\fBDeprecated\fP
.RS 4
, use \fBiconName()\fP 
.RE
.PP

.PP
Definition at line 107 of file kdatatool.cpp.
.PP
References KGlobal::dirs(), QPixmap::load(), and KStandardDirs::resourceDirs().
.SS "\fBQString\fP KDataToolInfo::iconName () const"
.PP
Returns the icon name for this DataTool. 
.PP
\fBReturns:\fP
.RS 4
the name of the icon for the DataTool 
.RE
.PP

.PP
Definition at line 121 of file kdatatool.cpp.
.SS "\fBQStringList\fP KDataToolInfo::userCommands () const"
.PP
Returns a list of strings that you can put in a \fBQPopupMenu\fP item, for example to offer the DataTools services to the user. 
.PP
The returned value is usually something like 'Spell checking', 'Shrink Image', 'Rotate Image' or something like that. This list comes from the Comment field of the tool's desktop file (so that it can be translated).
.PP
Each of the strings returned corresponds to a string in the list returned by commands.
.PP
\fBReturns:\fP
.RS 4
a list of strings that you can put in a \fBQPopupMenu\fP item 
.RE
.PP

.PP
Definition at line 136 of file kdatatool.cpp.
.PP
References QStringList::split().
.SS "\fBQStringList\fP KDataToolInfo::commands () const"
.PP
Returns the list of commands the DataTool can execute. 
.PP
The application passes the command to the \fBKDataTool::run\fP method.
.PP
This list comes from the Commands field of the tool's desktop file.
.PP
Each of the strings returned corresponds to a string in the list returned by userCommands. 
.PP
\fBReturns:\fP
.RS 4
the list of commands the DataTool can execute, suitable for the \fBKDataTool::run\fP method. 
.RE
.PP

.PP
Definition at line 128 of file kdatatool.cpp.
.SS "\fBKDataTool\fP * KDataToolInfo::createTool (\fBQObject\fP * parent = \fC0\fP, const char * name = \fC0\fP) const"
.PP
Creates the data tool described by this KDataToolInfo. 
.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
\fBReturns:\fP
.RS 4
a pointer to the created data tool or 0 on error. 
.RE
.PP

.PP
Definition at line 144 of file kdatatool.cpp.
.PP
References KLibFactory::create(), KLibLoader::factory(), QObject::inherits(), KLibLoader::self(), and KDataTool::setInstance().
.SS "\fBKService::Ptr\fP KDataToolInfo::service () const"
.PP
The KDataToolInfo's service that is represented by this class. 
.PP
\fBReturns:\fP
.RS 4
the service 
.RE
.PP

.PP
Definition at line 165 of file kdatatool.cpp.
.PP
Referenced by KDataToolInfo().
.SS "\fBKInstance\fP* KDataToolInfo::instance () const\fC [inline]\fP"
.PP
The instance of the service. 
.PP
\fBReturns:\fP
.RS 4
the instance 
.RE
.PP

.PP
Definition at line 157 of file kdatatool.h.
.PP
Referenced by KDataToolInfo(), and query().
.SS "bool KDataToolInfo::isValid () const"
.PP
A DataToolInfo may be invalid if the \fBKService\fP passed to its constructor does not feature the service type 'KDataTool'. 
.PP
\fBReturns:\fP
.RS 4
true if valid, false otherwise 
.RE
.PP

.PP
Definition at line 216 of file kdatatool.cpp.
.SS "\fBQValueList\fP< \fBKDataToolInfo\fP > KDataToolInfo::query (const \fBQString\fP & datatype, const \fBQString\fP & mimetype, \fBKInstance\fP * instance)\fC [static]\fP"
.PP
Queries the \fBKTrader\fP about installed \fBKDataTool\fP implementations. 
.PP
\fBParameters:\fP
.RS 4
\fIdatatype\fP a type that the application can 'export' to the tools (e.g. \fBQString\fP) 
.br
\fImimetype\fP the mimetype of the data (e.g. text/plain) 
.br
\fIinstance\fP the application (or the part)'s instance (to check if a tool is excluded from this part, and also used if the tool wants to read its configuration in the app's config file). 
.RE
.PP
\fBReturns:\fP
.RS 4
the list of results 
.RE
.PP

.PP
Definition at line 170 of file kdatatool.cpp.
.PP
References QValueList::append(), QString::arg(), QValueList::begin(), QValueList::end(), endl(), QString::fromLatin1(), instance(), KInstance::instanceName(), QString::isEmpty(), KDataToolInfo(), kdDebug(), KTrader::query(), and KTrader::self().

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