KDE 4.9 PyKDE API Reference

- KDE's Python API

# KUndoStack Class Reference

`from PyKDE4.kdeui import *`

Inherits: QUndoStack → QObject

## Detailed Description

Extends QUndoStack with functions that creates actions with KDE's default icons and shortcuts. See QUndoStack for more information.

## Methods

| __init__ (self, QObject parent=0)
QAction | createRedoAction (self, KActionCollection actionCollection, QString actionName=QString())
QAction | createUndoAction (self, KActionCollection actionCollection, QString actionName=QString())

## Method Documentation

__init__ | ( | self, |
|  | QObject | parent=0
| ) |  |  |

Constructs a KUndoStack with parent as parent

Parameters:

  | parent | parent of the object

QAction createRedoAction | ( | self, |
|  | KActionCollection | actionCollection,
|  | QString | actionName=QString()
| ) |  |  |

Creates an redo action with the default shortcut and icon and adds it to actionCollection

Parameters:

  | actionCollection | the KActionCollection that should be the parent of the action
  | actionName | the created action's object name, empty string will set it to the KDE default

Returns:
  the created action.

QAction createUndoAction | ( | self, |
|  | KActionCollection | actionCollection,
|  | QString | actionName=QString()
| ) |  |  |

Creates an undo action with the default KDE shortcut and icon and adds it to actionCollection

Parameters:

  | actionCollection | the KActionCollection that should be the parent of the action
  | actionName | the created action's object name, empty string will set it to the KDE default

Returns:
  the created action.