KIO
KDataToolAction Class Reference
This class helps applications implement support for KDataTool. More...
#include <kdatatool.h>

Signals | |
void | toolActivated (const KDataToolInfo &info, const QString &command) |
Public Member Functions | |
KDataToolAction (const QString &text, const KDataToolInfo &info, const QString &command, QObject *parent) | |
~KDataToolAction () | |
Static Public Member Functions | |
static QList< QAction * > | dataToolActionList (const QList< KDataToolInfo > &tools, const QObject *receiver, const char *slot, KActionCollection *parent) |
Protected Member Functions | |
virtual void | slotActivated () |
Detailed Description
This class helps applications implement support for KDataTool.
The steps to follow are simple:
- query for the available tools using KDataToolInfo::query
- pass the result to KDataToolAction::dataToolActionList (with a slot)
- plug the resulting actions, either using KXMLGUIClient::plugActionList, or by hand.
The slot defined for step 2 is called when the action is activated, and that's where the tool should be created and run.
Definition at line 197 of file kdatatool.h.
Constructor & Destructor Documentation
KDataToolAction::KDataToolAction | ( | const QString & | text, | |
const KDataToolInfo & | info, | |||
const QString & | command, | |||
QObject * | parent | |||
) |
Constructs a new KDataToolAction.
- Parameters:
-
text The text that will be displayed info The corresponding KDataToolInfo command The command of the action parent This action's parent name The name of the action
Definition at line 252 of file kdatatool.cpp.
KDataToolAction::~KDataToolAction | ( | ) |
Destructor.
Definition at line 262 of file kdatatool.cpp.
Member Function Documentation
QList< QAction * > KDataToolAction::dataToolActionList | ( | const QList< KDataToolInfo > & | tools, | |
const QObject * | receiver, | |||
const char * | slot, | |||
KActionCollection * | parent | |||
) | [static] |
Creates a list of actions from a list of information about data-tools.
The slot must have a signature corresponding to the toolActivated signal.
Note that it's the caller's responsibility to delete the actions when they're not needed anymore.
- Parameters:
-
tools the list of data tool descriptions receiver the receiver for toolActivated() signals slot the slot that will receive the toolActivated() signals parent the parent action collection for the actions to be created
- Returns:
- the KActions
Definition at line 272 of file kdatatool.cpp.
void KDataToolAction::slotActivated | ( | ) | [protected, virtual] |
Definition at line 267 of file kdatatool.cpp.
void KDataToolAction::toolActivated | ( | const KDataToolInfo & | info, | |
const QString & | command | |||
) | [signal] |
Emitted when a tool has been activated.
- Parameters:
-
info a description of the activated tools command the command for the tool
The documentation for this class was generated from the following files: