• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KIO

Signals | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
KDataToolAction Class Reference

#include <kdatatool.h>

Inheritance diagram for KDataToolAction:
Inheritance graph
[legend]

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)
 

Public Member Functions

 KDataToolAction (const QString &text, const KDataToolInfo &info, const QString &command, QObject *parent)
 
 ~KDataToolAction ()
 
- Public Member Functions inherited from KAction
 KAction (QObject *parent)
 
 KAction (const QString &text, QObject *parent)
 
 KAction (const KIcon &icon, const QString &text, QObject *parent)
 
virtual ~KAction ()
 
KAuth::Action * authAction () const
 
bool event (QEvent *)
 
void forgetGlobalShortcut ()
 
const KShortcut & globalShortcut (ShortcutTypes type=ActiveShortcut) const
 
bool globalShortcutAllowed () const
 
bool isGlobalShortcutEnabled () const
 
bool isShortcutConfigurable () const
 
KRockerGesture rockerGesture (ShortcutTypes type=ActiveShortcut) const
 
void setAuthAction (KAuth::Action *action)
 
void setAuthAction (const QString &actionName)
 
void setGlobalShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut), GlobalShortcutLoading loading=Autoloading)
 
void setGlobalShortcutAllowed (bool allowed, GlobalShortcutLoading loading=Autoloading)
 
void setHelpText (const QString &text)
 
void setRockerGesture (const KRockerGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShapeGesture (const KShapeGesture &gest, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcut (const QKeySequence &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
void setShortcutConfigurable (bool configurable)
 
void setShortcuts (const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
 
KShapeGesture shapeGesture (ShortcutTypes type=ActiveShortcut) const
 
KShortcut shortcut (ShortcutTypes types=ActiveShortcut) const
 

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 ()
 

Additional Inherited Members

- Public Types inherited from KAction
enum  GlobalShortcutLoading
 
enum  ShortcutType
 
- Properties inherited from KAction
KShortcut globalShortcut
 
bool globalShortcutAllowed
 
bool globalShortcutEnabled
 
KShortcut shortcut
 
bool shortcutConfigurable
 

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
textThe text that will be displayed
infoThe corresponding KDataToolInfo
commandThe command of the action
parentThis action's parent
nameThe 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

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
toolsthe list of data tool descriptions
receiverthe receiver for toolActivated() signals
slotthe slot that will receive the toolActivated() signals
parentthe parent action collection for the actions to be created
Returns
the KActions

Definition at line 274 of file kdatatool.cpp.

void KDataToolAction::slotActivated ( )
protectedvirtual

Definition at line 269 of file kdatatool.cpp.

void KDataToolAction::toolActivated ( const KDataToolInfo &  info,
const QString &  command 
)
signal

Emitted when a tool has been activated.

Parameters
infoa description of the activated tools
commandthe command for the tool

The documentation for this class was generated from the following files:
  • kdatatool.h
  • kdatatool.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:50:04 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal