.TH "KMacroCommand" 3 "28 Jan 2004" "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
.RI "\fICreates a macro command. \fP"
.ti -1c
.RI "void \fBaddCommand\fP (\fBKCommand\fP *command)"
.br
.RI "\fIAppends a command to this macro command. \fP"
.ti -1c
.RI "virtual void \fBexecute\fP ()"
.br
.RI "\fIExecutes this command, i.e. \fP"
.ti -1c
.RI "virtual void \fBunexecute\fP ()"
.br
.RI "\fIUndoes the execution of this command, i.e. \fP"
.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 109 of file kcommand.h.
.SH "Constructor & Destructor Documentation"
.PP 
.SS "KMacroCommand::KMacroCommand (const \fBQString\fP & name)"
.PP
Creates a macro command. You will then need to call \fBaddCommand\fP 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
Definition at line 33 of file kcommand.cpp.
.PP
References KStdAccel::name(), and QPtrList< KCommand >::setAutoDelete().
.SH "Member Function Documentation"
.PP 
.SS "void KMacroCommand::addCommand (\fBKCommand\fP * command)"
.PP
Appends a command to this macro command. The ownership is transfered to the macro command. Definition at line 38 of file kcommand.cpp.
.PP
References QPtrList< KCommand >::append().
.SS "void KMacroCommand::execute ()\fC [virtual]\fP"
.PP
Executes this command, i.e. execute all the sub-commands in the order in which they were added. 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. \fBunexecute\fP all the sub-commands in the _reverse_ order to the one in which they were added. 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.
