TinkerCell Core 1.0
TinkerCell's Core library providing all basic functionalities
Public Member Functions | Public Attributes
Tinkercell::CompositeCommand Class Reference

this command can be used to combine multiple commands into one command More...

#include <UndoCommands.h>

Inheritance diagram for Tinkercell::CompositeCommand:
Inheritance graph
[legend]
Collaboration diagram for Tinkercell::CompositeCommand:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 CompositeCommand (const QString &, const QList< QUndoCommand * > &, const QList< QUndoCommand * > &noClear=QList< QUndoCommand * >())
 Constructor. Composite command takes ownership of these commands unless specified otherwise.
 CompositeCommand (const QString &, QUndoCommand *, QUndoCommand *, bool deleteCommands=true)
 constructor for grouping two commands. Composite command takes ownership of these commands unless specified otherwise.
 ~CompositeCommand ()
 destructor automatically deletes any command not in the doNotDelete list
void redo ()
 undo
void undo ()
 undo

Public Attributes

QList< QUndoCommand * > commands
 commands grouped inside this composite command
QList< QUndoCommand * > doNotDelete
 commands that should not be deleted along with the composite command

Detailed Description

this command can be used to combine multiple commands into one command

Definition at line 522 of file UndoCommands.h.


Constructor & Destructor Documentation

Tinkercell::CompositeCommand::CompositeCommand ( const QString &  name,
const QList< QUndoCommand * > &  list,
const QList< QUndoCommand * > &  noClear = QList<QUndoCommand*>() 
)

Constructor. Composite command takes ownership of these commands unless specified otherwise.

Parameters:
QStringname of command
QList<QUndoCommand*>&the commands that make up this composite command
QList<QUndoCommand*>&the commands that should not be deleted by composite command's destructor (default = none)

Definition at line 2715 of file UndoCommands.cpp.

Tinkercell::CompositeCommand::CompositeCommand ( const QString &  name,
QUndoCommand cmd1,
QUndoCommand cmd2,
bool  deleteCommands = true 
)

constructor for grouping two commands. Composite command takes ownership of these commands unless specified otherwise.

Parameters:
QStringname of command
QUndoCommand*a command to be gouped
QUndoCommand*another command to be gouped
booldelete both commands automatically (default = true)

Definition at line 2726 of file UndoCommands.cpp.

Tinkercell::CompositeCommand::~CompositeCommand ( )

destructor automatically deletes any command not in the doNotDelete list

Definition at line 2737 of file UndoCommands.cpp.


Member Function Documentation

void Tinkercell::CompositeCommand::redo ( )

undo

Definition at line 2746 of file UndoCommands.cpp.

void Tinkercell::CompositeCommand::undo ( )

undo

Definition at line 2754 of file UndoCommands.cpp.


Member Data Documentation

commands grouped inside this composite command

Definition at line 545 of file UndoCommands.h.

commands that should not be deleted along with the composite command

Definition at line 547 of file UndoCommands.h.


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines