KUndoActions Namespace

Provides functions that creates undo/redo actions for a QUndoStack with KDE's default icons and shortcuts. More...

Header: #include <KUndoActions>
CMake: find_package(KF6 REQUIRED COMPONENTS XmlGui)
target_link_libraries(mytarget PRIVATE KF6::XmlGui)
Since: 5.0

Functions

QAction *createRedoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName = QString())
QAction *createUndoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName = QString())

Detailed Description

See QUndoStack for more information.

Function Documentation

QAction *KUndoActions::createRedoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName = QString())

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

undoStack the QUndoStack the action triggers the redo on

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 *KUndoActions::createUndoAction(QUndoStack *undoStack, KActionCollection *actionCollection, const QString &actionName = QString())

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

Returns the created action.

undoStack The QUndoStack the action triggers the undo on.

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.