diff options
author | Aleks Kissinger <aleks0@gmail.com> | 2018-09-23 12:30:08 +0200 |
---|---|---|
committer | Aleks Kissinger <aleks0@gmail.com> | 2018-09-23 12:30:08 +0200 |
commit | fa3d7da179b25d2ece40b56f5f9adddb3831906e (patch) | |
tree | d72e9857113920d6aeda060ec43b4dc83c4ea26f /src/gui/undocommands.h | |
parent | 1ca36f064da2a3619f0f8058f48e9f9dc6d07436 (diff) |
added reordering of nodes and edges
Diffstat (limited to 'src/gui/undocommands.h')
-rw-r--r-- | src/gui/undocommands.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/gui/undocommands.h b/src/gui/undocommands.h index 688c2ba..1836892 100644 --- a/src/gui/undocommands.h +++ b/src/gui/undocommands.h @@ -219,4 +219,22 @@ private: bool _clockwise; }; +class ReorderCommand : public GraphUpdateCommand +{ +public: + explicit ReorderCommand(TikzScene *scene, + const QVector<Node*> &oldNodeOrder, + const QVector<Node*> &newNodeOrder, + const QVector<Edge*> &oldEdgeOrder, + const QVector<Edge*> &newEdgeOrder, + QUndoCommand *parent = 0); + void undo() override; + void redo() override; +private: + QVector<Node*> _oldNodeOrder; + QVector<Node*> _newNodeOrder; + QVector<Edge*> _oldEdgeOrder; + QVector<Edge*> _newEdgeOrder; +}; + #endif // UNDOCOMMANDS_H |