Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
MoveNodeCommand Class Reference

Command to move a node on the canvas. More...

#include <move_node.h>

Inheritance diagram for MoveNodeCommand:

Public Member Functions

 MoveNodeCommand (Canvas *canvas, const QString &nodeId, const QPointF &previousPosition, const QPointF &currentPosition, QUndoCommand *parent=nullptr)
 Constructs a MoveNodeCommand object.
void undo () override
 Undoes the move operation.
void redo () override
 Redoes the move operation.

Private Attributes

const QString mNodeId
 Pointer to the canvas where the node is located.
const QPointF mPreviousPosition
 ID of the node to be moved.
const QPointF mCurrentPosition
 The previous position of the node.

Detailed Description

Command to move a node on the canvas.

Constructor & Destructor Documentation

◆ MoveNodeCommand()

MoveNodeCommand::MoveNodeCommand ( Canvas * canvas,
const QString & nodeId,
const QPointF & previousPosition,
const QPointF & currentPosition,
QUndoCommand * parent = nullptr )

Constructs a MoveNodeCommand object.

Parameters
canvasPointer to the canvas where the node is located.
nodeIdID of the node to be moved.
previousPositionThe previous position of the node.
currentPositionThe new position of the node.
parentPointer to the parent command, if any.

The documentation for this class was generated from the following files:
  • /__w/maki/maki/app/system/undo_commands/move_node.h
  • /__w/maki/maki/app/system/undo_commands/move_node.cpp