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

#### Public Methods

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

#### Protected Methods

- KCommand (const QString &name)

## Detailed Description

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

KCommand (const QString &name) | ### KCommand

[protected]

Creates a command

Parameters:

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

~KCommand () | ### ~KCommand

[virtual]

void execute () | ### execute

[pure virtual]

The main method: execute 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]

Unexecute (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]

Returns: the name of this command

void setName (const QString &name) | ### setName

Update the name of this command. Rarely necessary.

Generated by: root@i386.ports.openbsd.org on Wed Apr 25 13:58:24 2001, using kdoc 2.0a53.