24 #include <tqptrlist.h>
27 #include <tdelibs_export.h>
53 virtual void execute() = 0;
62 virtual void unexecute() = 0;
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 );
257 void commandExecuted();
266 void commandExecuted(
KCommand *command);
272 void documentRestored();
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.
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.
KCommand()
Creates a command.
void setName(const TQString &name)
Updates the name of this command.
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.