MCPcopy Create free account
hub / github.com/KDE/krita / createUndoAction

Method createUndoAction

libs/command/kundo2stack.cpp:1143–1154  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1141*/
1142
1143QAction *KUndo2QStack::createUndoAction(QObject *parent) const
1144{
1145 KUndo2Action *result = new KUndo2Action(i18n("Undo %1"), i18nc("Default text for undo action", "Undo"), parent);
1146 result->setEnabled(canUndo());
1147 result->setPrefixedText(undoText());
1148 connect(this, SIGNAL(canUndoChanged(bool)),
1149 result, SLOT(setEnabled(bool)));
1150 connect(this, SIGNAL(undoTextChanged(QString)),
1151 result, SLOT(setPrefixedText(QString)));
1152 connect(result, SIGNAL(triggered()), this, SLOT(undo()));
1153 return result;
1154}
1155
1156/*!
1157 Creates an redo QAction object with the given \a parent.

Callers

nothing calls this directly

Calls 8

setPrefixedTextMethod · 0.80
setIconTextMethod · 0.80
undoFunction · 0.50
nameFunction · 0.50
setEnabledMethod · 0.45
isEmptyMethod · 0.45
setIconMethod · 0.45
addActionMethod · 0.45

Tested by

no test coverage detected