21 class VuoExportMovieDialog;
51 explicit VuoEditorWindow(QString documentIdentifier=
"", QString compositionPath=
"",
52 const string &compositionAsString=
"",
57 string nodeClassToHighlight=
"");
78 QPointF
getFittedScenePos(QPointF origPos,
int leftMargin=50,
int topMargin=50,
int rightMargin=175,
int bottomMargin=75);
89 void itemsMoved(set<VuoRendererNode *> nodes, set<VuoRendererComment *> comments, qreal dx, qreal dy,
bool movedByDragging);
104 void internalPortPublished(
VuoPort *port,
bool forceEventOnlyPublication,
string name=
"",
bool merge=
false,
VuoPort *portToSpecialize=NULL,
string specializedTypeName=
"",
string typecastToInsert=
"",
bool useUndoStackMacro=
true);
108 void componentsRemoved(QList<QGraphicsItem *> components,
string commandDescription);
158 void showUpdateHelpDialog();
160 void toggleNodeLibraryDockedState();
161 void on_zoom11_triggered();
162 void on_zoomIn_triggered();
163 void on_zoomOut_triggered();
164 void viewportFitReset();
166 void on_saveComposition_triggered();
167 bool saveFile(
const QString &file);
168 void changeActiveProtocol(
void);
169 void updateActiveProtocolDisplay(
void);
170 void evaluateCompositionForProtocolPromotion(
void);
171 void on_saveCompositionAs_triggered();
172 void on_insertComment_triggered();
173 void on_insertSubcomposition_triggered();
174 string on_installSubcomposition_triggered();
175 void on_compositionInformation_triggered();
176 void editMetadata(
int dialogResult);
177 void undoStackCleanStateChanged(
bool clean);
179 void duplicateSelectedCompositionComponentsByMenuItem();
181 void showBuildActivityIndicator();
182 void hideBuildActivityIndicator(QString buildError);
183 void hideStopActivityIndicator();
185 void on_openUserModulesFolder_triggered();
186 void on_openSystemModulesFolder_triggered();
188 void on_showPublishedPorts_triggered();
189 void on_showHiddenCables_triggered();
190 void on_showEvents_triggered();
191 void closePublishedPortSidebars();
192 void conditionallyShowPublishedPortSidebars(
bool visible);
193 void updatePublishedCableGeometry();
194 void updatePublishedPortOrder(vector<VuoPublishedPort *> ports,
bool isInput);
195 void updateWindowForNewCableDrag();
196 void displayDockedNodeLibrary();
198 void resetUndoStackMacros();
199 void updateSelectedComponentMenuItems();
200 void updateChangeNodeMenu();
201 void updateSceneRect();
202 void ensureSceneRectContainsRegion(
const QList<QRectF> ®ion);
203 void updateRubberBandSelectionMode(QRect rubberBandRect, QPointF fromScenePoint, QPointF toScenePoint);
212 void createIsolatedExternalPublishedPort(
string typeName,
bool isInput);
216 void insertCommentAtPos(QPointF targetScenePos);
217 void insertSubcompositionAtPos(QPointF targetScenePos);
218 void refactorSelectedItems();
219 void restoreDefaultLeftDockedWidgetWidths();
220 void hideSelectedInternalCables();
221 void hideCables(set<VuoRendererCable *> cables);
222 void unhideCables(set<VuoRendererCable *> cables);
224 void updateCanvasOpacity();
225 void updateColor(
bool isDark);
226 void coalescedUpdateRunningComposition();
227 void handlePendingProtocolComplianceReevaluationRequests();
230 friend class TestVuoEditor;
231 friend class TestEditorCommands;
233 static const qreal viewportStepRate;
234 static const qreal viewportStepRateMultiplier;
235 static const qreal zoomRate;
236 static const qreal pastedComponentOffset;
237 static const qreal compositionMargin;
248 string coalescedOldCompositionSnapshot;
249 string coalescedNewCompositionSnapshot;
250 vector<string> coalescedInternalPortConstantsToSync;
251 vector<string> coalescedPublishedPortConstantsToSync;
252 vector<string> coalescedNodesToUnlink;
253 vector<string> coalescedNodesToRelink;
261 QMenu *menuNewCompositionWithTemplate;
262 QMenu *menuProtocols;
265 QMenu *contextMenuTints;
266 QMenu *menuChangeNode;
267 QAction *raiseDocumentAction;
271 QUndoStack *undoStack;
275 bool zoomOutToFitOnNextShowEvent;
276 bool compositionUpgradedSinceLastSave;
277 bool canvasDragEnabled;
278 bool canvasDragInProgress;
279 bool scrollInProgress;
280 double timeOfLastScroll;
281 bool consumeNextMouseReleaseToCanvas;
282 bool lastLeftMousePressHadOptionModifier;
283 bool rubberBandSelectionInProgress;
284 QPointF cursorPosAtLastComponentCopy;
285 QPoint canvasDragMinCursorPos;
286 QPoint canvasDragMaxCursorPos;
287 QPoint lastCursorLocationDuringCanvasDrag;
288 bool previousDragMoveWasOverSidebar;
289 bool itemDragMacroInProgress;
290 vector<QGraphicsItem *> itemsBeingDragged;
294 double latestDragTime;
295 bool commentResizeMacroInProgress;
298 bool duplicationMacroInProgress;
301 bool doneInitializing;
302 bool containedPrepopulatedContent;
303 bool includeInRecentFileMenu;
304 bool publishedPortNearCursorPreviously;
306 bool forwardingEventsToCanvas;
308 Ui::VuoEditorWindow *ui;
311 int nodeLibraryMinimumWidth;
312 int nodeLibraryMaximumWidth;
314 bool protocolComplianceReevaluationPending;
315 bool ignoreItemMoveSignals;
318 bool saveFile(
const QString & savePath, QString & existingPath);
319 bool saveFileAs(
const QString & savePath);
320 QString saveCompositionAs();
321 void acceptCloseEvent();
322 string installSubcomposition(
string parentCompositionPath);
323 bool ensureThisParentCompositionSaved();
324 string sanitizeSubcompositionName(
string name);
325 void updateToolbarElementUI();
326 void populateProtocolsMenu(QMenu *m);
327 void updateProtocolsMenu(QMenu *m);
328 void toggleActiveStatusForProtocol(
VuoProtocol *protocol);
329 void setPublishedPortSidebarVisibility(
bool visible);
330 void registerProtocolComplianceEvaluationRequest();
331 void setCompositionModified(
bool modified);
333 void pasteCompositionComponents();
334 void componentsPasted(QList<QGraphicsItem *> components,
string commandDescription=
"Paste");
335 string getMaximumSubcompositionFromSelection(
bool includePublishedPorts,
bool includeHeader);
337 void instantiateNewCompositionComponentsFromString(
string compositionText);
338 QList<QGraphicsItem *> mergeCompositionComponentsFromString(
string compositionText,
bool pasteAtCursorLoc,
bool pasteWithOffset,
string commandDescription=
"Paste");
340 QList<QGraphicsItem *> createAnyNecessaryMakeListComponents(
VuoPort *port);
343 void enableCanvasDrag();
344 void disableCanvasDrag();
345 void initiateCanvasDrag();
346 void concludeCanvasDrag();
347 void updateRefireAction();
349 string generateCurrentDefaultCopyright();
350 bool confirmReplacingFile(
string path);
351 bool arePublishedPortSidebarsVisible();
354 #include "pro/VuoEditorWindow_Pro.hh"