|
|
This is a convenience class for KService. You can use it if you have a KService describing a KDataTool. In this case the KDataToolInfo class is more convenient to work with.
Especially useful is the method createTool which creates the datatool described by the service.
| KDataToolInfo ()
| KDataToolInfo |
Create an invalid KDataToolInfo.
| KDataToolInfo ( const KService::Ptr& service, KInstance* instance )
| KDataToolInfo |
Create a valid KDataToolInfo.
| KDataToolInfo ( const KDataToolInfo& info )
| KDataToolInfo |
Copy constructor.
| KDataToolInfo& operator= ( const KDataToolInfo& info )
| operator= |
Assignment operator.
| QString dataType ()
| dataType |
[const]
Returns: the C++ data type that this DataTool accepts. For example "QString" or "QImage" or something more complicated.
| QStringList mimeTypes ()
| mimeTypes |
[const]
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".
Returns: 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.
| bool isReadOnly ()
| isReadOnly |
[const]
Returns: TRUE if the DataTool does not modify the data passed to it by KDataTool::run.
| QPixmap icon ()
| icon |
[const]
Returns: a large pixmap for the DataTool.
| QPixmap miniIcon ()
| miniIcon |
[const]
Returns: a mini pixmap for the DataTool.
| QString iconName ()
| iconName |
[const]
Returns: the name of the icon for the DataTool
| QStringList userCommands ()
| userCommands |
[const]
This list comes from the Comment field of the tool's desktop file (so that it can be translated).
Each of the strings returned corresponds to a string in the list returned by commands.
Returns: a list if strings that you can put in a QPopupMenu item, for example to offer the DataTools services to the user. The returned value is usually something like "Spell checking", "Shrink Image", "Rotate Image" or something like that.
| QStringList commands ()
| commands |
[const]
This list comes from the Commands field of the tool's desktop file.
Each of the strings returned corresponds to a string in the list returned by userCommands.
Returns: the list of commands the DataTool can execute. The application passes the command to the KDataTool::run method.
| KDataTool* createTool ( QObject* parent = 0, const char* name = 0 )
| createTool |
[const]
Creates the data tool described by this KDataToolInfo.
Returns: a pointer to the created data tool or 0 on error.
| KService::Ptr service ()
| service |
[const]
| KInstance* instance ()
| instance |
[const]
| bool isValid ()
| isValid |
[const]
A DataToolInfo may be invalid if the KService passed to its constructor does not feature the service type "KDataTool".
| QValueList<KDataToolInfo> query ( const QString& datatype, const QString& mimetype, KInstance * instance )
| query |
[static]
Queries the KTrader about installed KDataTool implementations.
Parameters:
| datatype | a type that the application can 'export' to the tools (e.g. QString) |
| mimetype | the mimetype of the data (e.g. text/plain) |
| instance | 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). |
| Generated by: caleb on tcdevel on Tue Jan 28 12:54:15 2003, using kdoc $. |