.TH "KMacroCommand" kde3 "11 Jun 2005" "Version Version 3.4.1" "kdeui Library" \" -*- nroff -*-
.ad l
.nh
.SH NAME
KMacroCommand \- A Macro Command is a command that holds several sub-commands.  

.PP
.SH SYNOPSIS
.br
.PP
\fC#include <kcommand.h>\fP
.PP
Inherits \fBKNamedCommand\fP.
.PP
.SS "Public Member Functions"

.in +1c
.ti -1c
.RI "\fBKMacroCommand\fP (const \fBQString\fP &name)"
.br
.ti -1c
.RI "void \fBaddCommand\fP (\fBKCommand\fP *command)"
.br
.ti -1c
.RI "virtual void \fBexecute\fP ()"
.br
.ti -1c
.RI "virtual void \fBunexecute\fP ()"
.br
.in -1c
.SS "Protected Member Functions"

.in +1c
.ti -1c
.RI "virtual void \fBvirtual_hook\fP (int id, void *data)"
.br
.in -1c
.SS "Protected Attributes"

.in +1c
.ti -1c
.RI "\fBQPtrList\fP< \fBKCommand\fP > \fBm_commands\fP"
.br
.in -1c
.SH "Detailed Description"
.PP 
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. 
.PP
Definition at line 110 of file kcommand.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KMacroCommand::KMacroCommand (const \fBQString\fP & name)"
.PP
Creates a macro command. 
.PP
You will then need to call addCommand for each subcommand to be added to this macro command. 
.PP
\fBParameters:\fP
.RS 4
\fIname\fP the name of this command, translated, since it will appear in the menus. 
.RE
.PP

.PP
Definition at line 33 of file kcommand.cpp.
.PP
References QPtrList::setAutoDelete().
.SH "Member Function Documentation"
.PP 
.SS "void KMacroCommand::addCommand (\fBKCommand\fP * command)"
.PP
Appends a command to this macro command. 
.PP
The ownership is transfered to the macro command. 
.PP
Definition at line 38 of file kcommand.cpp.
.PP
References QPtrList::append().
.SS "void KMacroCommand::execute ()\fC [virtual]\fP"
.PP
Executes this command, i.e. 
.PP
execute all the sub-commands in the order in which they were added. 
.PP
Implements \fBKCommand\fP.
.PP
Definition at line 43 of file kcommand.cpp.
.PP
References QPtrListIterator::current().
.SS "void KMacroCommand::unexecute ()\fC [virtual]\fP"
.PP
Undoes the execution of this command, i.e. 
.PP
\fBunexecute\fP all the sub-commands in the _reverse_ order to the one in which they were added. 
.PP
Implements \fBKCommand\fP.
.PP
Definition at line 50 of file kcommand.cpp.
.PP
References QPtrListIterator::current(), and QPtrListIterator::toLast().

.SH "Author"
.PP 
Generated automatically by Doxygen for kdeui Library from the source code.
