24 #include <tqptrlist.h>
27 #include <tdelibs_export.h>
68 virtual TQString
name()
const = 0;
70 virtual void virtual_hook(
int id,
void* data );
92 virtual TQString
name()
const {
return m_name; }
102 virtual void virtual_hook(
int id,
void* data );
140 TQPtrList<KCommand> m_commands;
142 virtual void virtual_hook(
int id,
void* data );
195 void addCommand(
KCommand *command,
bool execute=
true);
204 void setUndoLimit(
int limit);
212 void setRedoLimit(
int limit);
220 void updateActions();
241 virtual void documentSaved();
244 void slotUndoAboutToShow();
245 void slotUndoActivated(
int );
246 void slotRedoAboutToShow();
247 void slotRedoActivated(
int );
277 TQPtrList<KCommand> m_commands;
279 TQPopupMenu *m_undoPopup, *m_redoPopup;
280 int m_undoLimit, m_redoLimit;
283 virtual void virtual_hook(
int id,
void* data );
285 class KCommandHistoryPrivate;
286 KCommandHistoryPrivate *d;
The abstract base class for all Commands.
void documentRestored()
Emitted every time we reach the index where you saved the document for the last time.
A Macro Command is a command that holds several sub-commands.
Class to encapsulate user-driven action or event.
virtual TQString name() const
virtual void unexecute()=0
Unexecutes (undo) this command.
The command history stores a (user) configurable amount of Commands.
void commandExecuted(KCommand *command)
Emitted every time a command is executed (whether by addCommand, undo or redo).
KCommand()
Creates a command.
void setName(const TQString &name)
Updates the name of this command.
void commandExecuted()
Emitted every time a command is executed (whether by addCommand, undo or redo).
KNamedCommand(const TQString &name)
Creates a command.
A managed set of TDEAction objects.
A command which stores its name.
virtual TQString name() const =0
virtual void execute()=0
The main method: executes this command.