KDE3Support
k3command.cpp
Go to the documentation of this file.
135 So m_current is the index of the current undo command, m_current+1 the current redo command if any.
360 K3UndoRedoAction::K3UndoRedoAction( Type type, KActionCollection* actionCollection, K3CommandHistory* commandHistory )
366 setShortcut( KStandardShortcut::shortcut( type == Undo ? KStandardShortcut::Undo : KStandardShortcut::Redo ) );
373 connect( this->menu(), SIGNAL(triggered(QAction*)), this, SLOT(slotActionTriggered(QAction*)) );
375 connect( d->commandHistory, SIGNAL(commandHistoryChanged()), this, SLOT(slotCommandHistoryChanged()) );
377 actionCollection->addAction(KStandardAction::name(type == Undo ? KStandardAction::Undo : KStandardAction::Redo),
void addCommand(K3Command *command)
Appends a command to this macro command.
Definition: k3command.cpp:88
The command history stores a (user) configurable amount of Commands.
Definition: k3command.h:180
virtual QString name() const =0
QList< K3Command * > redoCommands(int maxCommands=0) const
Definition: k3command.cpp:323
KAction * undo(const QObject *recvr, const char *slot, QObject *parent)
virtual void virtual_hook(int id, void *data)
Definition: k3command.cpp:439
void addCommand(K3Command *command, bool execute=true)
Adds a command to the history.
Definition: k3command.cpp:188
void setRedoLimit(int limit)
Sets the maximum number of items in the redo history.
Definition: k3command.cpp:259
void documentRestored()
Emitted every time we reach the index where you saved the document for the last time.
void commandHistoryChanged()
Emitted whenever the command history has changed, i.e.
void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
void setUndoLimit(int limit)
Sets the maximum number of items in the undo history.
Definition: k3command.cpp:252
K3UndoRedoAction(Type type, KActionCollection *actionCollection, K3CommandHistory *commandHistory)
Definition: k3command.cpp:360
const KShortcut & shortcut(StandardShortcut id)
QString i18n(const char *text)
This type of action is used to show undo or redo actions in the menu or in the toolbars.
Definition: k3command.h:358
void setShortcut(const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
QList< K3Command * > undoCommands(int maxCommands=0) const
Definition: k3command.cpp:312
KAction * redo(const QObject *recvr, const char *slot, QObject *parent)
void commandExecuted(K3Command *command)
Emitted every time a command is executed (whether by addCommand, undo or redo).
const char * name(StandardAction id)
virtual void virtual_hook(int id, void *data)
Definition: k3command.cpp:442
Type
KAction * addAction(const QString &name, const QObject *receiver=0, const char *member=0)
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Thu Aug 27 2020 00:00:00 by doxygen 1.8.20 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.