summaryrefslogtreecommitdiff
path: root/src/gui/undocommands.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/undocommands.h')
-rw-r--r--src/gui/undocommands.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/gui/undocommands.h b/src/gui/undocommands.h
index 354e455..e716458 100644
--- a/src/gui/undocommands.h
+++ b/src/gui/undocommands.h
@@ -130,4 +130,20 @@ private:
QList<QGraphicsItem*> _oldSelection;
};
+class ChangeLabelCommand : public GraphUpdateCommand
+{
+public:
+ explicit ChangeLabelCommand(TikzScene *scene,
+ Graph *graph,
+ QMap<Node*,QString> oldLabels,
+ QString newLabel,
+ QUndoCommand *parent = 0);
+ void undo() override;
+ void redo() override;
+private:
+ Graph *_graph;
+ QMap<Node*,QString> _oldLabels;
+ QString _newLabel;
+};
+
#endif // UNDOCOMMANDS_H