Vuo  2.0.2
VuoCommandMove.hh
Go to the documentation of this file.
1 
10 #pragma once
11 
12 #include "VuoCommandCommon.hh"
13 
14 class VuoEditorWindow;
15 class VuoRendererComment;
16 class VuoRendererNode;
17 
22 {
23 public:
24  VuoCommandMove(set<VuoRendererNode *> movedNodes,
25  set<VuoRendererComment *> movedComments,
26  qreal dx,
27  qreal dy,
28  VuoEditorWindow *window,
29  bool movedByDragging=false);
30 
31  int id() const;
32  void undo();
33  void redo();
34  bool mergeWith(const QUndoCommand *command);
35 
36 private:
37  static const int commandID;
38  VuoEditorWindow *window;
39  string revertedSnapshot;
40  string updatedSnapshot;
41 
42  // Used only for merging Undo commands:
43  bool movedByDragging;
44  set<string> movedItemIDs;
45  qreal dx;
46  qreal dy;
47 };