#include <SparseModel.h>
Inherits MacroCommand.
Inheritance diagram for SparseModel< PointType >::EditCommand:


Consecutive add/remove pairs for the same point are collapsed.
Definition at line 204 of file SparseModel.h.
Public Member Functions | |
| EditCommand (SparseModel< PointType > *model, QString commandName) | |
| virtual void | addPoint (const PointType &point) |
| virtual void | deletePoint (const PointType &point) |
| virtual void | addCommand (Command *command) |
| Stack an arbitrary other command in the same sequence. | |
| virtual void | finish () |
| If any points have been added or deleted, add this command to the command history. | |
| virtual void | deleteCommand (Command *command) |
| virtual bool | haveCommands () const |
| virtual void | execute () |
| virtual void | unexecute () |
| virtual QString | getName () const |
| virtual void | setName (QString name) |
Protected Member Functions | |
| virtual void | addCommand (Command *command, bool executeFirst) |
Protected Attributes | |
| SparseModel< PointType > * | m_model |
| QString | m_name |
| std::vector< Command * > | m_commands |
| SparseModel< PointType >::EditCommand::EditCommand | ( | SparseModel< PointType > * | model, | |
| QString | commandName | |||
| ) |
Definition at line 581 of file SparseModel.h.
| void SparseModel< PointType >::EditCommand::addPoint | ( | const PointType & | point | ) | [virtual] |
Definition at line 590 of file SparseModel.h.
References SparseModel< PointType >::EditCommand::addCommand(), and SparseModel< PointType >::EditCommand::m_model.
| void SparseModel< PointType >::EditCommand::deletePoint | ( | const PointType & | point | ) | [virtual] |
Definition at line 597 of file SparseModel.h.
References SparseModel< PointType >::EditCommand::addCommand(), and SparseModel< PointType >::EditCommand::m_model.
| virtual void SparseModel< PointType >::EditCommand::addCommand | ( | Command * | command | ) | [inline, virtual] |
Stack an arbitrary other command in the same sequence.
Reimplemented from MacroCommand.
Definition at line 215 of file SparseModel.h.
Referenced by SparseModel< PointType >::EditCommand::addPoint(), and SparseModel< PointType >::EditCommand::deletePoint().
| void SparseModel< PointType >::EditCommand::finish | ( | ) | [virtual] |
If any points have been added or deleted, add this command to the command history.
Otherwise delete the command.
Definition at line 604 of file SparseModel.h.
References CommandHistory::addCommand(), CommandHistory::getInstance(), and MacroCommand::m_commands.
| void SparseModel< PointType >::EditCommand::addCommand | ( | Command * | command, | |
| bool | executeFirst | |||
| ) | [protected, virtual] |
Definition at line 615 of file SparseModel.h.
References MacroCommand::addCommand(), MacroCommand::deleteCommand(), Command::execute(), SparseModel< PointType >::AddPointCommand::getPoint(), and MacroCommand::m_commands.
| void MacroCommand::deleteCommand | ( | Command * | command | ) | [virtual, inherited] |
Definition at line 37 of file Command.cpp.
References MacroCommand::m_commands.
Referenced by SparseModel< PointType >::EditCommand::addCommand().
| bool MacroCommand::haveCommands | ( | ) | const [virtual, inherited] |
Definition at line 51 of file Command.cpp.
References MacroCommand::m_commands.
Referenced by CommandHistory::endCompoundOperation().
| void MacroCommand::execute | ( | ) | [virtual, inherited] |
| void MacroCommand::unexecute | ( | ) | [virtual, inherited] |
| QString MacroCommand::getName | ( | ) | const [virtual, inherited] |
Implements Command.
Definition at line 73 of file Command.cpp.
References MacroCommand::m_name.
Referenced by CommandHistory::startCompoundOperation().
| void MacroCommand::setName | ( | QString | name | ) | [virtual, inherited] |
SparseModel<PointType>* SparseModel< PointType >::EditCommand::m_model [protected] |
Definition at line 226 of file SparseModel.h.
Referenced by SparseModel< PointType >::EditCommand::addPoint(), and SparseModel< PointType >::EditCommand::deletePoint().
QString MacroCommand::m_name [protected, inherited] |
Definition at line 49 of file Command.h.
Referenced by MacroCommand::getName(), and MacroCommand::setName().
std::vector<Command *> MacroCommand::m_commands [protected, inherited] |
Definition at line 50 of file Command.h.
Referenced by SparseModel< PointType >::EditCommand::addCommand(), MacroCommand::addCommand(), MacroCommand::deleteCommand(), MacroCommand::execute(), SparseModel< PointType >::EditCommand::finish(), MacroCommand::haveCommands(), MacroCommand::unexecute(), and MacroCommand::~MacroCommand().
1.5.1