tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
undocommands.h
Go to the documentation of this file.
1 #ifndef UNDOCOMMANDS_H
2 #define UNDOCOMMANDS_H
3 
4 #include <QUndoCommand>
5 
6 // template
7 //class undoCommands : public QUndoCommand
8 //{
9 //public:
10 // undoCommands();
11 
12 // void undo();
13 // void redo();
14 //};
15 
16 class QString;
17 class QPoint;
18 
19 namespace tilde {
20 // -------
21 
22 class PatchWindowController;
23 class Property;
24 class PropertyList;
25 class UIObject;
26 class UIPatchcord;
27 
28 class undoCreateObject : public QUndoCommand {
29  PatchWindowController* _controller;
30  QString _objectData;
31  UIObject* _object;
32  QPoint* _pos;
33 
34 public:
35  undoCreateObject(PatchWindowController* ctrl, QString objectData, QPoint pos);
36 
37  UIObject* object();
38 
39  void undo();
40  void redo();
41 };
42 
43 // -------
44 
45 class undoCreatePatchcord : public QUndoCommand {
46  PatchWindowController* _controller;
47  UIObject* _obj1;
48  int _out1;
49  UIObject* _obj2;
50  int _in2;
51  UIPatchcord* _p;
52 
53 public:
54  undoCreatePatchcord(PatchWindowController* ctrl, UIObject* obj1, int out1, UIObject* obj2, int in2);
55 
56  // UIPatchcord* patchcord();
57 
58  void undo();
59  void redo();
60 };
61 
62 // -------
63 
64 class undoChangeProperty : public QUndoCommand {
65  Property* _property;
66  Property* _oldValue;
67  Property* _newValue;
68 
69 public:
70  undoChangeProperty(PropertyList*, Property* property, Property* oldValue, Property* newValue);
71 
72  void undo();
73  void redo();
74 };
75 
76 // -------
77 
78 class undoDeleteObject : public QUndoCommand {
79  PatchWindowController* _controller;
80  QString _objectData;
81  UIObject* _object;
82  QPoint* _pos;
83 
84 public:
86 
87  void undo();
88  void redo();
89 };
90 
91 // -------
92 
93 class undoDeletePatchcord : public QUndoCommand {
94 public:
96 
97  void undo();
98  void redo();
99 };
100 }
101 
102 #endif // UNDOCOMMANDS_H
undoCreatePatchcord(PatchWindowController *ctrl, UIObject *obj1, int out1, UIObject *obj2, int in2)
Definition: undocommands.cpp:38
Definition: undocommands.h:78
Definition: undocommands.h:64
void undo()
Definition: undocommands.cpp:108
Patchcord QGraphicsObject class.
Definition: UIPatchcord.h:36
undoCreateObject(PatchWindowController *ctrl, QString objectData, QPoint pos)
Definition: undocommands.cpp:11
Definition: undocommands.h:28
void redo()
Definition: undocommands.cpp:55
void redo()
Definition: undocommands.cpp:75
property handling class for ui object.
Definition: Property.h:44
void undo()
Definition: undocommands.cpp:93
void redo()
Definition: undocommands.cpp:109
The Patch window controller.
Definition: PatchWindowController.h:48
undoChangeProperty(PropertyList *, Property *property, Property *oldValue, Property *newValue)
Definition: undocommands.cpp:62
Property handling class for ui object - property list.
Definition: PropertyList.h:34
void undo()
Definition: undocommands.cpp:21
void undo()
Definition: undocommands.cpp:71
void redo()
Definition: undocommands.cpp:31
UIObject * object()
Definition: undocommands.cpp:26
void undo()
Definition: undocommands.cpp:50
Definition: UIObject.h:44
undoDeleteObject(PatchWindowController *ctrl, UIObject *object)
Definition: undocommands.cpp:82
Definition: undocommands.h:45
undoDeletePatchcord(PatchWindowController *ctrl, UIPatchcord *p)
Definition: undocommands.cpp:106
void redo()
Definition: undocommands.cpp:99
Definition: undocommands.h:93