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),
419 const bool enabled = isUndo ? d->commandHistory->isUndoAvailable() : d->commandHistory->isRedoAvailable();
QString i18n(const char *text)
virtual void virtual_hook(int id, void *data)
Definition: k3command.cpp:439
This type of action is used to show undo or redo actions in the menu or in the toolbars.
Definition: k3command.h:357
QList< K3Command * > undoCommands(int maxCommands=0) const
Definition: k3command.cpp:312
Type
KAction * undo(const QObject *recvr, const char *slot, QObject *parent)
void addCommand(K3Command *command)
Appends a command to this macro command.
Definition: k3command.cpp:88
K3UndoRedoAction(Type type, KActionCollection *actionCollection, K3CommandHistory *commandHistory)
Definition: k3command.cpp:360
const KShortcut & shortcut(StandardShortcut id)
const char * name(StandardAction id)
QAction * addAction(const QString &name, QAction *action)
void addCommand(K3Command *command, bool execute=true)
Adds a command to the history.
Definition: k3command.cpp:188
QList< K3Command * > redoCommands(int maxCommands=0) const
Definition: k3command.cpp:323
void commandExecuted(K3Command *command)
Emitted every time a command is executed (whether by addCommand, undo or redo).
void setUndoLimit(int limit)
Sets the maximum number of items in the undo history.
Definition: k3command.cpp:252
virtual QString name() const =0
KAction * redo(const QObject *recvr, const char *slot, QObject *parent)
void setShortcut(const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
void setRedoLimit(int limit)
Sets the maximum number of items in the redo history.
Definition: k3command.cpp:259
virtual void virtual_hook(int id, void *data)
Definition: k3command.cpp:442
Definition: k3command.h:361
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.
Definition: k3command.h:361
The command history stores a (user) configurable amount of Commands.
Definition: k3command.h:180
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:51:58 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.