summaryrefslogtreecommitdiff
path: root/src/gui/undocommands.h
diff options
context:
space:
mode:
authorAleks Kissinger <aleks0@gmail.com>2018-04-05 15:07:57 +0200
committerAleks Kissinger <aleks0@gmail.com>2018-04-05 15:07:57 +0200
commit9e2116497660509afd417cc3b952ea80bbb72ce5 (patch)
tree040d4bed1ec5891d2eccaaeb42c7e12935263b07 /src/gui/undocommands.h
parente57923c7d767f5a532bc35571d74a5470eb76314 (diff)
can now edit node labels
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