KDataToolInfo Class Reference
#include <kdatatool.h>
Detailed Description
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.
- See also:
- KDataTool
Definition at line 47 of file kdatatool.h.
Public Member Functions | |
KDataToolInfo () | |
KDataToolInfo (const KService::Ptr &service, KInstance *instance) | |
KDataToolInfo (const KDataToolInfo &info) | |
KDataToolInfo & | operator= (const KDataToolInfo &info) |
QString | dataType () const |
QStringList | mimeTypes () const |
bool | isReadOnly () const |
QPixmap | icon () const KDE_DEPRECATED |
QPixmap | miniIcon () const KDE_DEPRECATED |
QString | iconName () const |
QStringList | userCommands () const |
QStringList | commands () const |
KDataTool * | createTool (QObject *parent=0, const char *name=0) const |
KService::Ptr | service () const |
KInstance * | instance () const |
bool | isValid () const |
Static Public Member Functions | |
static QValueList< KDataToolInfo > | query (const QString &datatype, const QString &mimetype, KInstance *instance) |
Constructor & Destructor Documentation
|
Create an invalid KDataToolInfo.
Definition at line 40 of file kdatatool.cpp. |
|
Create a valid KDataToolInfo.
Definition at line 45 of file kdatatool.cpp. |
|
Copy constructor.
Definition at line 58 of file kdatatool.cpp. |
Member Function Documentation
|
Returns the list of commands the DataTool can execute. The application passes the command to the KDataTool::run method. 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.
Definition at line 130 of file kdatatool.cpp. |
|
Creates the data tool described by this KDataToolInfo.
Definition at line 146 of file kdatatool.cpp. |
|
Returns the data type that the DataTool can accept.
Definition at line 71 of file kdatatool.cpp. |
|
Returns the icon of this data tool.
Definition at line 95 of file kdatatool.cpp. |
|
Returns the icon name for this DataTool.
Definition at line 123 of file kdatatool.cpp. |
|
The instance of the service.
Definition at line 157 of file kdatatool.h. |
|
Checks whether the DataTool is read-only.
Definition at line 87 of file kdatatool.cpp. |
|
A DataToolInfo may be invalid if the KService passed to its constructor does not feature the service type "KDataTool".
Definition at line 208 of file kdatatool.cpp. |
|
Returns a list of mime type that will be accepted by the DataTool. 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".
Definition at line 79 of file kdatatool.cpp. |
|
Returns the mini icon of this data tool.
Definition at line 109 of file kdatatool.cpp. |
|
Assignment operator.
Definition at line 64 of file kdatatool.cpp. |
|
Queries the KTrader about installed KDataTool implementations.
Definition at line 162 of file kdatatool.cpp. |
|
The KDataToolInfo's service that is represented by this class.
Definition at line 157 of file kdatatool.cpp. |
|
Returns a list of 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. 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.
Definition at line 138 of file kdatatool.cpp. |
The documentation for this class was generated from the following files: