The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a parent of it's child commands)
More...
#include <undocommandgroup.h>
The UndoCommandGroup class makes it possible to pack multiple undo commands together (it acts as a parent of it's child commands)
◆ UndoCommandGroup() [1/3]
◆ UndoCommandGroup() [2/3]
◆ UndoCommandGroup() [3/3]
◆ ~UndoCommandGroup()
◆ getChildCount()
int getChildCount |
( |
| ) |
const |
|
inlinenoexcept |
◆ appendChild()
Append a new command to the list of child commands.
- Parameters
-
cmd | The command to add (must not be executed already) |
- Return values
-
true | If the command was executed and has done some changes |
false | If the command was not executed or has done nothing |
- Note
- If this command was already executed (execute() called), this method will also immediately execute the newly added child command. Otherwise, it will be executed as soon as execute() is called.
- Warning
- This method must not be called after undo() was called the first time.
◆ operator=()
◆ performExecute()
Execute the command the first time.
- Note
- This method must be implemented in all derived classes. If the first time execution is exactly identical to an "redo" action, you can simple call librepcb::editor::UndoCommand::performRedo() in the implementation of this method.
- Return values
-
true | If the command has done some changes |
false | If the command has done nothing (the command can be deleted) |
Implements UndoCommand.
Reimplemented in CmdDragSelectedFootprintItems, CmdDragSelectedSymbolItems, CmdPasteFootprintItems, CmdPasteSymbolItems, CmdRemoveSelectedFootprintItems, CmdRemoveSelectedSymbolItems, CmdAddComponentToCircuit, CmdAddDeviceToBoard, CmdAddSymbolToSchematic, CmdBoardSpecctraImport, CmdBoardSplitNetLine, CmdChangeNetSignalOfSchematicNetSegment, CmdCombineAllNetSignalsUnderSchematicNetPoint, CmdCombineBoardNetSegments, CmdCombineNetSignals, CmdCombineSchematicNetSegments, CmdDeviceStrokeTextsReset, CmdDragSelectedBoardItems, CmdDragSelectedSchematicItems, CmdFlipSelectedBoardItems, CmdPasteBoardItems, CmdPasteSchematicItems, CmdRemoveBoardItems, CmdRemoveSelectedSchematicItems, CmdRemoveUnusedLibraryElements, CmdRemoveUnusedNetSignals, CmdReplaceDevice, and CmdSymbolInstanceTextsReset.
◆ performUndo()
Undo the command.
- Note
- This method must be implemented in all derived classes.
Implements UndoCommand.
◆ performRedo()
Redo the command.
- Note
- This method must be implemented in all derived classes.
Implements UndoCommand.
◆ performPostExecution()
virtual void performPostExecution |
( |
| ) |
|
|
inlineprotectedvirtualnoexcept |
◆ execNewChildCmd()
Helper method for derived classes to execute and add new child commands.
- Parameters
-
cmd | The command to execute and add (must not be executed already) |
◆ mHasDoneSomething
◆ mChilds
All child commands.
The child which is executed first is at index zero, the last executed command is at the top of the list.
The documentation for this class was generated from the following files: