KDataToolInfo Class Reference
This is a convenience class for KService. More...
#include <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) |
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.
Constructor & Destructor Documentation
|
Create an invalid KDataToolInfo.
Definition at line 38 of file kdatatool.cpp. Referenced by query(). |
|
Create a valid KDataToolInfo.
Definition at line 43 of file kdatatool.cpp. |
|
Copy constructor.
Definition at line 56 of file kdatatool.cpp. References instance(), and service(). |
Member Function Documentation
|
Assignment operator.
Definition at line 62 of file kdatatool.cpp. References instance(), and service(). |
|
Returns the data type that the DataTool can accept.
Definition at line 69 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 77 of file kdatatool.cpp. |
|
Checks whether the DataTool is read-only.
Definition at line 85 of file kdatatool.cpp. |
|
Returns the icon of this data tool.
Definition at line 93 of file kdatatool.cpp. References KGlobal::dirs(). |
|
Returns the mini icon of this data tool.
Definition at line 107 of file kdatatool.cpp. References KGlobal::dirs(). |
|
Returns the icon name for this DataTool.
Definition at line 121 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 136 of file kdatatool.cpp. |
|
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 128 of file kdatatool.cpp. |
|
Creates the data tool described by this KDataToolInfo.
Definition at line 144 of file kdatatool.cpp. References KLibFactory::create(), KLibLoader::self(), and KDataTool::setInstance(). |
|
The KDataToolInfo's service that is represented by this class.
Definition at line 165 of file kdatatool.cpp. Referenced by KDataToolInfo(), and operator=(). |
|
The instance of the service.
Definition at line 157 of file kdatatool.h. Referenced by KDataToolInfo(), and operator=(). |
|
A DataToolInfo may be invalid if the KService passed to its constructor does not feature the service type "KDataTool".
Definition at line 216 of file kdatatool.cpp. |
|
Queries the KTrader about installed KDataTool implementations.
Definition at line 170 of file kdatatool.cpp. References endl(), KInstance::instanceName(), KDataToolInfo(), kdDebug(), and KTrader::self(). |
The documentation for this class was generated from the following files: