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();
void setText(const QString &text)
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)
const T & next()
const T & previous()
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
QVariant data() const
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
const char * name() const
void commandExecuted(K3Command *command)
Emitted every time a command is executed (whether by addCommand, undo or redo).
int count(const T &value) const
void append(const T &value)
int toInt(bool *ok) const
void setUndoLimit(int limit)
Sets the maximum number of items in the undo history.
Definition: k3command.cpp:252
virtual QString name() const =0
void toBack()
KAction * redo(const QObject *recvr, const char *slot, QObject *parent)
void setData(const QVariant &userData)
void setShortcut(const KShortcut &shortcut, ShortcutTypes type=ShortcutTypes(ActiveShortcut|DefaultShortcut))
void triggered(Qt::MouseButtons buttons, Qt::KeyboardModifiers modifiers)
bool hasPrevious() const
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.
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void commandHistoryChanged()
Emitted whenever the command history has changed, i.e.
enabled
Definition: k3command.h:361
The command history stores a (user) configurable amount of Commands.
Definition: k3command.h:180
bool hasNext() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:26:47 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.