• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kio

KDataToolAction Class Reference

This class helps applications implement support for KDataTool. More...

#include <kdatatool.h>

Inheritance diagram for KDataToolAction:

Inheritance graph
[legend]

List of all members.


Signals

void toolActivated (const KDataToolInfo &info, const QString &command)

Public Member Functions

 KDataToolAction (const QString &text, const KDataToolInfo &info, const QString &command, QObject *parent=0, const char *name=0)

Static Public Member Functions

static QPtrList< KAction > dataToolActionList (const QValueList< KDataToolInfo > &tools, const QObject *receiver, const char *slot)

Protected Member Functions

virtual void slotActivated ()
virtual void virtual_hook (int id, void *data)

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 194 of file kdatatool.h.


Constructor & Destructor Documentation

KDataToolAction::KDataToolAction ( const QString &  text,
const KDataToolInfo &  info,
const QString &  command,
QObject *  parent = 0,
const char *  name = 0 
)

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 An internal name for this action.

Definition at line 218 of file kdatatool.cpp.


Member Function Documentation

QPtrList< KAction > KDataToolAction::dataToolActionList ( const QValueList< KDataToolInfo > &  tools,
const QObject *  receiver,
const char *  slot 
) [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
Returns:
the KActions

Definition at line 231 of file kdatatool.cpp.

void KDataToolAction::slotActivated (  )  [protected, virtual]

Definition at line 226 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

void KDataToolAction::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Definition at line 279 of file kdatatool.cpp.


The documentation for this class was generated from the following files:
  • kdatatool.h
  • kdatatool.cpp

kio

Skip menu "kio"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal