![]() |
Olympe Engine 2.0
2D Game Engine with ECS Architecture
|
Moves a node to a new position. More...
#include <MoveNodeCommand.h>
Inheritance diagram for Olympe::NodeGraph::MoveNodeCommand:
Collaboration diagram for Olympe::NodeGraph::MoveNodeCommand:Public Member Functions | |
| MoveNodeCommand (GraphDocument *graph, NodeId nodeId, Vector2 oldPos, Vector2 newPos) | |
| void | Execute () override |
| Execute the command. | |
| void | Undo () override |
| Undo the command. | |
| std::string | GetDescription () const override |
| Get description of the command. | |
Public Member Functions inherited from Olympe::NodeGraph::ICommand | |
| virtual | ~ICommand ()=default |
Private Attributes | |
| GraphDocument * | m_graph |
| NodeId | m_nodeId |
| Vector2 | m_oldPosition |
| Vector2 | m_newPosition |
Moves a node to a new position.
Definition at line 20 of file MoveNodeCommand.h.
| Olympe::NodeGraph::MoveNodeCommand::MoveNodeCommand | ( | GraphDocument * | graph, |
| NodeId | nodeId, | ||
| Vector2 | oldPos, | ||
| Vector2 | newPos | ||
| ) |
Definition at line 13 of file MoveNodeCommand.cpp.
|
overridevirtual |
Execute the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 21 of file MoveNodeCommand.cpp.
References m_graph, m_newPosition, m_nodeId, and Olympe::NodeGraph::GraphDocument::UpdateNodePosition().
Here is the call graph for this function:
|
overridevirtual |
Get description of the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 37 of file MoveNodeCommand.cpp.
|
overridevirtual |
Undo the command.
Implements Olympe::NodeGraph::ICommand.
Definition at line 29 of file MoveNodeCommand.cpp.
References m_graph, m_nodeId, m_oldPosition, and Olympe::NodeGraph::GraphDocument::UpdateNodePosition().
Here is the call graph for this function:
|
private |
Definition at line 29 of file MoveNodeCommand.h.
|
private |
Definition at line 32 of file MoveNodeCommand.h.
Referenced by Execute().
|
private |
Definition at line 30 of file MoveNodeCommand.h.
|
private |
Definition at line 31 of file MoveNodeCommand.h.
Referenced by Undo().