Maki
Formally verfied low-code orchestration
Loading...
Searching...
No Matches
batch_remove.h
1#pragma once
2
3#include <QUndoCommand>
4
5#include "save_info.h"
6
7class Canvas;
8class QPointF;
9
13class BatchRemoveCommand : public QUndoCommand
14{
15public:
23 BatchRemoveCommand(Canvas* canvas, const QVector<NodeSaveInfo>& nodes, const QVector<TransitionSaveInfo>& transitions,
24 QUndoCommand* parent = nullptr);
25
29 void undo() override;
30
34 void redo() override;
35
36private:
37 Canvas* mCanvas = nullptr;
38 QVector<NodeSaveInfo> mNodes;
39 QVector<TransitionSaveInfo> mTransitions;
40};
void redo() override
Redoes the removal of a node from the canvas.
Definition batch_remove.cpp:30
BatchRemoveCommand(Canvas *canvas, const QVector< NodeSaveInfo > &nodes, const QVector< TransitionSaveInfo > &transitions, QUndoCommand *parent=nullptr)
Constructs a RemoveNodeCommand object.
Definition batch_remove.cpp:6
QVector< NodeSaveInfo > mNodes
Pointer to the canvas where the node is located.
Definition batch_remove.h:38
void undo() override
Undoes the removal of a node from the canvas.
Definition batch_remove.cpp:16
The Canvas class represents the main drawing area for nodes and transitions.
Definition canvas.h:29