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

KDE3Support

Public Types | Public Member Functions
K3UndoRedoAction Class Reference

#include <k3command.h>

Inheritance diagram for K3UndoRedoAction:
KToolBarPopupAction KAction QAction QWidgetAction

List of all members.

Public Types

enum  Type { Undo, Redo }
- Public Types inherited from KToolBarPopupAction
enum  GlobalShortcutLoading
enum  ShortcutType
- Public Types inherited from KAction

Public Member Functions

 K3UndoRedoAction (Type type, KActionCollection *actionCollection, K3CommandHistory *commandHistory)
- Public Member Functions inherited from KToolBarPopupAction
 KToolBarPopupAction (const KIcon &icon, const QString &text, QObject *parent)
virtual ~KAction ()
virtual ~KToolBarPopupAction ()
KAuth::Action * authAction () const
virtual QWidget * createWidget (QWidget *parent)
bool delayed () const
bool event (QEvent *)
void forgetGlobalShortcut ()
const KShortcut & globalShortcut (ShortcutTypes type=ActiveShortcut) const
bool globalShortcutAllowed () const
bool isGlobalShortcutEnabled () const
bool isShortcutConfigurable () const
 KAction (QObject *parent)
 KAction (const QString &text, QObject *parent)
 KAction (const KIcon &icon, const QString &text, QObject *parent)
KMenu * popupMenu () const
KRockerGesture rockerGesture (ShortcutTypes type=ActiveShortcut) const
void setAuthAction (KAuth::Action *action)
void setAuthAction (const QString &actionName)
void setDelayed (bool delayed)
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 QKeySequence &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void setShortcut (const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void setShortcutConfigurable (bool configurable)
void setShortcuts (const QList< QKeySequence > &shortcuts, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void setStickyMenu (bool sticky)
KShapeGesture shapeGesture (ShortcutTypes type=ActiveShortcut) const
KShortcut shortcut (ShortcutTypes types=ActiveShortcut) const
bool stickyMenu () const

Additional Inherited Members

- Signals inherited from KToolBarPopupAction
void authorized (KAuth::Action *action)
void globalShortcutChanged (const QKeySequence &)
void triggered (Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
- Signals inherited from KAction
- Public Attributes inherited from KToolBarPopupAction
 ActiveShortcut
 Autoloading
 DefaultShortcut
 NoAutoloading
- Public Attributes inherited from KAction
- Properties inherited from KToolBarPopupAction
bool delayed
KShortcut globalShortcut
bool globalShortcutAllowed
bool globalShortcutEnabled
KShortcut shortcut
bool shortcutConfigurable
bool stickyMenu
- Properties inherited from KAction

Detailed Description

This type of action is used to show undo or redo actions in the menu or in the toolbars.

This action will keep itself up to date and change the text based on the undo history, plus it will disable itself when there is nothing to undo/redo. You will typically need two instances of this action per view (e.g. the mainwindow).

new KUndoRedoAction( KUndoRedoAction::Undo, view->actionCollection(), m_history );
new KUndoRedoAction( KUndoRedoAction::Redo, view->actionCollection(), m_history );

Note that there is no need to connect or even keep a reference to the object as all work is done automatically.

Note: you might want to use the QUndo framework instead. It didn't exist when K3Command was written.

Definition at line 357 of file k3command.h.


Member Enumeration Documentation

enum K3UndoRedoAction::Type
Enumerator:
Undo 
Redo 

Definition at line 361 of file k3command.h.


Constructor & Destructor Documentation

K3UndoRedoAction::K3UndoRedoAction ( Type  type,
KActionCollection *  actionCollection,
K3CommandHistory *  commandHistory 
)

Definition at line 360 of file k3command.cpp.


The documentation for this class was generated from the following files:
  • k3command.h
  • k3command.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 16 2013 17:53:32 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDE3Support

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

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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