4 #ifndef PATCHWINDOWCONTROLLER
5 #define PATCHWINDOWCONTROLLER
15 class QGraphicsSceneMouseEvent;
38 class ApplicationController;
41 class PatchWindowController;
55 ObserverPtr _observer;
58 CanvasPtr _serverCanvas;
60 vector<PatchWindow*> _windows;
61 QGraphicsScene* _scene;
67 void doSave(QString fileName);
68 void doCreateObject(
UIObject* uiObject);
71 QGraphicsScene* _boxOnlyScene;
77 QUndoStack* _undoStack;
85 ProcessPtr serverInstance();
86 ObjectId serverCanvasAsObject();
87 CanvasPtr serverCanvas();
96 vector<PatchWindow*> windows();
101 UIObject* createObject(
string name, QPoint pos);
102 UIObject* createObjectWithoutUndo(
string name, QPoint pos);
111 void syncObjectsOnParent();
113 void addObjectToParent(
UIObject* src);
117 void enableObjectsOnParent(
UIObject* parentObject);
118 void disableObjectsOnParent();
122 QUndoStack* undoStack();
126 void openFile(QString fileName);
127 void saveFile(QString fileName);
128 void saveFileDialog();
130 void deleteSelectedPatchcords();
131 void deletePatchcordsFor(
UIItem* obj);
132 void deletePatchcordsForObject(
UIObject* o);
135 void deleteObjectWithoutUndo(
UIObject* o);
137 void deleteSelectedObjects(vector<UIObject*>);
138 void deleteSelectedObjects();
141 void deleteSelectedPatchcords(vector<UIPatchcord*>);
143 void selectPatchcordsForSelectedBoxes();
148 void dataDuplicate();
150 void dataSelectAllObjects();
153 void updateViewports();
156 void setFileName(QString fname);
157 void setNewFileName(QString fname);
160 void selectBox(
UIItem* box);
161 void moveSelectedBoxes(QPoint eventPos);
166 void enableUndo(
bool v);
170 void sendMessageToObject(ObjectId
object, QString msg);
179 void menuDuplicate();
181 void menuSelectAll();
186 void openPropertiesWindow();
189 void slotAlignLeft();
190 void slotAlignRight();
193 void slotAlignBottom();
195 void slotAlignCenter();
197 void slotHDistribute();
198 void slotVDistribute();
200 void slotRecentMenuAction();
202 void slotObjectHoverEnter();
203 void slotObjectHoverLeave();
207 void slotSelectObject(
UIObject*
object);
210 void slotMousePress(QPoint pos);
211 void slotMouseMove(QPoint pos);
212 void slotMouseRelease(QPoint pos);
214 void slotDeselectObjects();
216 void slotSelectionFrame(QPoint start, QPoint end);
217 void slotMoveSelectedBoxes(QPoint eventPos);
219 void slotResizeBoxes(
int dx,
int dy);
223 Object* signalCreateObject(Canvas* canvas,
string name);
225 void signalEnableUndo(
bool v);
226 void signalEnableRedo(
bool v);
230 #endif // CM_PDLINK_H
CanvasData * canvasData()
Definition: PatchWindowController.h:92
shared canvas data model - boxes, patchcords
Definition: CanvasData.h:22
Patch window. Creates scroll view and cm_canvas; Creates menu commands, forwards them to cm_canvas...
Definition: PatchWindow.h:14
The Application Controller class.
Definition: ApplicationController.h:44
UIItem QGraphicsObject class.
Definition: UIItem.h:15
Patchcord QGraphicsObject class.
Definition: UIPatchcord.h:36
ApplicationController * appController()
Definition: PatchWindowController.h:90
The Patch window controller.
Definition: PatchWindowController.h:48
Definition: UIObject.h:44
Canvas View - used by Patch window controller.
Definition: CanvasView.h:36
gui object: standard object box
Definition: UIBox.h:46