KIO
#include <kdatatool.h>
Signals | |
void | toolActivated (const KDataToolInfo &info, const QString &command) |
Signals inherited from KAction | |
void | authorized (KAuth::Action *action) |
void | globalShortcutChanged (const QKeySequence &) |
void | triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers) |
Static Public Member Functions | |
static QList< QAction * > | dataToolActionList (const QList< KDataToolInfo > &tools, const QObject *receiver, const char *slot, KActionCollection *parent) |
Static Public Member Functions inherited from QObject | |
bool | connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type) |
bool | connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type) |
bool | disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method) |
bool | disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method) |
QString | tr (const char *sourceText, const char *disambiguation, int n) |
QString | trUtf8 (const char *sourceText, const char *disambiguation, int n) |
Protected Member Functions | |
virtual void | slotActivated () |
Protected Member Functions inherited from QObject | |
bool | checkConnectArgs (const char *signal, const QObject *object, const char *method) |
virtual void | childEvent (QChildEvent *event) |
virtual void | connectNotify (const char *signal) |
virtual void | customEvent (QEvent *event) |
virtual void | disconnectNotify (const char *signal) |
int | receivers (const char *signal) const |
QObject * | sender () const |
int | senderSignalIndex () const |
virtual void | timerEvent (QTimerEvent *event) |
Protected Member Functions inherited from QWidgetAction | |
QList< QWidget * > | createdWidgets () const |
virtual QWidget * | createWidget (QWidget *parent) |
virtual void | deleteWidget (QWidget *widget) |
virtual bool | eventFilter (QObject *obj, QEvent *event) |
Additional Inherited Members | |
Public Types inherited from KAction | |
enum | GlobalShortcutLoading |
enum | ShortcutType |
Static Protected Member Functions inherited from QObject | |
QByteArray | normalizeSignalSlot (const char *signalSlot) |
Properties inherited from KAction | |
KShortcut | globalShortcut |
bool | globalShortcutAllowed |
bool | globalShortcutEnabled |
KShortcut | shortcut |
bool | shortcutConfigurable |
Properties inherited from QAction | |
autoRepeat | |
checkable | |
checked | |
enabled | |
font | |
icon | |
iconText | |
iconVisibleInMenu | |
menuRole | |
priority | |
shortcut | |
shortcutContext | |
softKeyRole | |
statusTip | |
text | |
toolTip | |
visible | |
whatsThis | |
Properties inherited from QObject | |
objectName | |
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 201 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 254 of file kdatatool.cpp.
KDataToolAction::~KDataToolAction | ( | ) |
Destructor.
Definition at line 264 of file kdatatool.cpp.
Member Function Documentation
|
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 274 of file kdatatool.cpp.
|
protectedvirtual |
Definition at line 269 of file kdatatool.cpp.
|
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:
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:54 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.