svcore
1.9
|
Command to add or remove a series of events to or from an editable, with undo. More...
#include <EventCommands.h>
Public Member Functions | |
ChangeEventsCommand (int editableId, QString name) | |
void | add (Event e) |
void | remove (Event e) |
void | addCommand (Command *command) override |
Stack an arbitrary other command in the same sequence. More... | |
ChangeEventsCommand * | finish () |
If any points have been added or deleted, return this command (so the caller can add it to the command history). More... | |
virtual void | deleteCommand (Command *command) |
virtual bool | haveCommands () const |
void | execute () override |
void | unexecute () override |
QString | getName () const override |
virtual void | setName (QString name) |
Protected Member Functions | |
virtual void | addCommand (Command *command, bool executeFirst) |
Protected Attributes | |
int | m_editableId |
QString | m_name |
std::vector< Command * > | m_commands |
Detailed Description
Command to add or remove a series of events to or from an editable, with undo.
Creates and immediately executes a sub-command for each add/remove requested. Consecutive add/remove pairs for the same point are collapsed. The id must be that of a type that can be retrieved from the AnyById store and dynamic_cast to EventEditable.
Definition at line 115 of file EventCommands.h.
Constructor & Destructor Documentation
|
inline |
Definition at line 118 of file EventCommands.h.
Member Function Documentation
|
inline |
Definition at line 121 of file EventCommands.h.
|
inline |
Definition at line 124 of file EventCommands.h.
|
inlineoverridevirtual |
Stack an arbitrary other command in the same sequence.
Reimplemented from MacroCommand.
Definition at line 131 of file EventCommands.h.
References addCommand().
Referenced by addCommand().
|
inline |
If any points have been added or deleted, return this command (so the caller can add it to the command history).
Otherwise delete the command and return NULL.
Definition at line 138 of file EventCommands.h.
|
inlineprotectedvirtual |
Definition at line 148 of file EventCommands.h.
References MacroCommand::addCommand(), Command::execute(), AddEventCommand::getEvent(), and RemoveEventCommand::getEvent().
|
virtualinherited |
Definition at line 38 of file Command.cpp.
References MacroCommand::m_commands.
|
virtualinherited |
Definition at line 52 of file Command.cpp.
References MacroCommand::m_commands.
|
overridevirtualinherited |
|
overridevirtualinherited |
|
overridevirtualinherited |
Implements Command.
Reimplemented in BundleCommand.
Definition at line 74 of file Command.cpp.
References MacroCommand::m_name.
|
virtualinherited |
Definition at line 80 of file Command.cpp.
References MacroCommand::m_name.
Member Data Documentation
|
protected |
Definition at line 171 of file EventCommands.h.
|
protectedinherited |
Definition at line 103 of file Command.h.
Referenced by MacroCommand::getName(), BundleCommand::getName(), and MacroCommand::setName().
|
protectedinherited |
Definition at line 104 of file Command.h.
Referenced by MacroCommand::addCommand(), MacroCommand::deleteCommand(), MacroCommand::execute(), BundleCommand::getName(), MacroCommand::haveCommands(), MacroCommand::unexecute(), and MacroCommand::~MacroCommand().
The documentation for this class was generated from the following file:
Generated by 1.8.11