Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

KMacroCommand Class Reference

#include <kcommand.h>

Inheritance diagram for KMacroCommand:

KNamedCommand KCommand List of all members.

Public Methods

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

Protected Methods

virtual void virtual_hook (int id, void *data)

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.

Definition at line 109 of file kcommand.h.


Constructor & Destructor Documentation

KMacroCommand::KMacroCommand const QString &    name
 

Creates 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.


Member Function Documentation

void KMacroCommand::addCommand KCommand   command
 

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

virtual void KMacroCommand::execute   [virtual]
 

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

Implements KCommand.

virtual void KMacroCommand::unexecute   [virtual]
 

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

Implements KCommand.


The documentation for this class was generated from the following file:
Generated on Wed Aug 13 23:30:18 2003 for kdelibs by doxygen1.2.18