# class KMacroCommand | A Macro Command is a command that holds several sub-commands. More...
Definition | `#include <kcommand.h>`
Inherits | KCommand [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Methods

- KMacroCommand ( const QString & name )
- virtual ~KMacroCommand ()
- void addCommand (KCommand *command)
- virtual void execute ()
- virtual void unexecute ()

#### Protected Members

- QList<KCommand> m_commands

## Detailed Description

A Macro Command is a command that holds several sub-commands. It will appear as one to the user and in the command history, but it can use the implementation of multiple commands internally.

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

Create a macro command. You will then need to call addCommand for each subcommand to be added to this macro command.

Parameters:

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

~KMacroCommand () | ### ~KMacroCommand

[virtual]

void addCommand (KCommand *command) | ### addCommand

Appends a command to this macro command. The ownership is transfered to the macro command.

void execute () | ### execute

[virtual]

Execute this command, i.e. execute all the sub-commands in the order in which they were added.

Reimplemented from KCommand.

void unexecute () | ### unexecute

[virtual]

Undo the execution of this command, i.e. unexecute all the sub-commands in the _reverse_ order to the one in which they were added.

Reimplemented from KCommand.

QList<KCommand> m_commands | ### m_commands

[protected]

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