class KCommand

# class KCommand | The abstract base class for all Commands. More...
Contains pure virtuals
Definition | `#include <kcommand.h>`
Inherited by | KMacroCommand, KNamedCommand
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- virtual ~KCommand ()
- virtual void execute ()
- virtual void unexecute ()
- virtual QString name () const

#### Protected Methods

- KCommand ()
- virtual void virtual_hook ( int id, void* data )

## Detailed Description

The abstract base class for all Commands. Commands are used to store information needed for Undo/Redo functionality...

KCommand () | ### KCommand

[protected]

Creates a command.

~KCommand () | ### ~KCommand

[virtual]

void execute () | ### execute

[pure virtual]

The main method: executes this command. Implement here what this command is about, and remember to record any information that will be helpful for #unexecute.

void unexecute () | ### unexecute

[pure virtual]

Unexecutes (undo) this command. Implement here the steps to take for undoing the command. If your application uses actions for everything (it should), and if you implement unexecute correctly, the application is in the same state after unexecute as it was before execute. This means, the next call to execute will do the same thing as it did the first time.

QString name () | ### name

[const pure virtual]

Returns: the name of this command, translated, since it will appear in the menus.

void virtual_hook ( int id, void* data ) | ### virtual_hook

[protected virtual]

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:36:37 2003, using kdoc 2.0a54.