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

#include <undoCommands.hpp>

Inheritance diagram for MoveItemCommand:
Collaboration diagram for MoveItemCommand:

Public Member Functions

 MoveItemCommand (QUndoCommand *parent=nullptr)
void addItemMove (GraphicalItem *item, const QPointF &oldPos, const QPointF &newPos)
void setWireMoves (std::vector< WireRouteChange > changes)
 Stores before and after wire routes accompanying the item moves.
void setTopologyEdit (WireEndpointEdit edit)
 Stores topology and net snapshots accompanying the item moves.
void undo () override
void redo () override

Private Attributes

DiagramScene * scene = nullptr
std::vector< ItemPositionChange > moves
std::vector< WireRouteChange > wireMoves
WireEndpointEdit topologyEdit
std::string documentPath
bool skipInitialRedo = true

Detailed Description

Definition at line 115 of file undoCommands.hpp.

Constructor & Destructor Documentation

◆ MoveItemCommand()

MoveItemCommand ( QUndoCommand * parent = nullptr)
inlineexplicit

Definition at line 117 of file undoCommands.hpp.

Member Function Documentation

◆ addItemMove()

void addItemMove ( GraphicalItem * item,
const QPointF & oldPos,
const QPointF & newPos )

Definition at line 174 of file undoCommands.cpp.

◆ redo()

void redo ( )
override

Definition at line 192 of file undoCommands.cpp.

◆ setTopologyEdit()

void setTopologyEdit ( WireEndpointEdit edit)
inline

Stores topology and net snapshots accompanying the item moves.

Definition at line 129 of file undoCommands.hpp.

◆ setWireMoves()

void setWireMoves ( std::vector< WireRouteChange > changes)
inline

Stores before and after wire routes accompanying the item moves.

Definition at line 124 of file undoCommands.hpp.

◆ undo()

void undo ( )
override

Definition at line 186 of file undoCommands.cpp.

Member Data Documentation

◆ documentPath

std::string documentPath
private

Definition at line 139 of file undoCommands.hpp.

◆ moves

std::vector<ItemPositionChange> moves
private

Definition at line 136 of file undoCommands.hpp.

◆ scene

DiagramScene* scene = nullptr
private

Definition at line 135 of file undoCommands.hpp.

◆ skipInitialRedo

bool skipInitialRedo = true
private

Definition at line 140 of file undoCommands.hpp.

◆ topologyEdit

WireEndpointEdit topologyEdit
private

Definition at line 138 of file undoCommands.hpp.

◆ wireMoves

std::vector<WireRouteChange> wireMoves
private

Definition at line 137 of file undoCommands.hpp.


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