SILICON
Loading...
Searching...
No Matches
EditWireRouteCommand Class Reference

#include <undoCommands.hpp>

Inheritance diagram for EditWireRouteCommand:
Collaboration diagram for EditWireRouteCommand:

Public Member Functions

 EditWireRouteCommand (GraphicalWireSegment *segment, std::vector< WireRouteChange > changes, WireDragKind kind, WireEndpointEdit endpointEdit={}, QUndoCommand *parent=nullptr)
 Captures an already applied wire gesture for undo and redo.
void undo () override
 Restores the wire routes from before the gesture.
void redo () override
 Restores the gesture's final routes, skipping the first invocation.

Private Attributes

DiagramScene * scene
std::string documentPath
std::vector< WireRouteChange > changes
WireEndpointEdit endpointEdit
bool skipInitialRedo = true

Detailed Description

Definition at line 143 of file undoCommands.hpp.

Constructor & Destructor Documentation

◆ EditWireRouteCommand()

EditWireRouteCommand ( GraphicalWireSegment * segment,
std::vector< WireRouteChange > changes,
WireDragKind kind,
WireEndpointEdit endpointEdit = {},
QUndoCommand * parent = nullptr )
explicit

Captures an already applied wire gesture for undo and redo.

Parameters
segmentEdited segment used to locate the scene and document.
changesBefore and after route snapshots for affected segments.
kindHandle type used to label the command.
endpointEditContact, topology, and net snapshots for the gesture.
parentOptional parent undo command.
Note
The first redo is skipped because the gesture is already applied.

Definition at line 204 of file undoCommands.cpp.

Member Function Documentation

◆ redo()

void redo ( )
override

Restores the gesture's final routes, skipping the first invocation.

Definition at line 231 of file undoCommands.cpp.

◆ undo()

void undo ( )
override

Restores the wire routes from before the gesture.

Definition at line 222 of file undoCommands.cpp.

Member Data Documentation

◆ changes

std::vector<WireRouteChange> changes
private

Definition at line 167 of file undoCommands.hpp.

◆ documentPath

std::string documentPath
private

Definition at line 166 of file undoCommands.hpp.

◆ endpointEdit

WireEndpointEdit endpointEdit
private

Definition at line 168 of file undoCommands.hpp.

◆ scene

DiagramScene* scene
private

Definition at line 165 of file undoCommands.hpp.

◆ skipInitialRedo

bool skipInitialRedo = true
private

Definition at line 169 of file undoCommands.hpp.


The documentation for this class was generated from the following files: