21 class VuoExportMovieDialog;
51 explicit VuoEditorWindow(QString documentIdentifier=
"", QString compositionPath=
"",
52 const string &compositionAsString=
"",
57 string nodeClassToHighlight=
"");
77 QPointF
getFittedScenePos(QPointF origPos,
int leftMargin=50,
int topMargin=50,
int rightMargin=175,
int bottomMargin=75);
88 void itemsMoved(set<VuoRendererNode *> nodes, set<VuoRendererComment *> comments, qreal dx, qreal dy,
bool movedByDragging);
103 void internalPortPublished(
VuoPort *port,
bool forceEventOnlyPublication,
string name=
"",
bool merge=
false,
VuoPort *portToSpecialize=NULL,
string specializedTypeName=
"",
string typecastToInsert=
"",
bool useUndoStackMacro=
true);
107 void componentsRemoved(QList<QGraphicsItem *> components,
string commandDescription);
157 void showUpdateHelpDialog();
159 void toggleNodeLibraryDockedState();
160 void on_zoom11_triggered();
161 void on_zoomIn_triggered();
162 void on_zoomOut_triggered();
163 void viewportFitReset();
165 void on_saveComposition_triggered();
166 bool saveFile(
const QString &file);
167 void changeActiveProtocol(
void);
168 void updateActiveProtocolDisplay(
void);
169 void evaluateCompositionForProtocolPromotion(
void);
170 void on_saveCompositionAs_triggered();
171 void on_insertComment_triggered();
172 void on_insertSubcomposition_triggered();
173 string on_installSubcomposition_triggered();
174 void on_compositionInformation_triggered();
175 void editMetadata(
int dialogResult);
176 void undoStackCleanStateChanged(
bool clean);
178 void duplicateSelectedCompositionComponentsByMenuItem();
180 void showBuildActivityIndicator();
181 void hideBuildActivityIndicator(QString buildError);
182 void hideStopActivityIndicator();
184 void on_openUserModulesFolder_triggered();
185 void on_openSystemModulesFolder_triggered();
187 void on_showPublishedPorts_triggered();
188 void on_showHiddenCables_triggered();
189 void on_showEvents_triggered();
190 void closePublishedPortSidebars();
191 void conditionallyShowPublishedPortSidebars(
bool visible);
192 void updatePublishedCableGeometry();
193 void updatePublishedPortOrder(vector<VuoPublishedPort *> ports,
bool isInput);
194 void updateWindowForNewCableDrag();
195 void displayDockedNodeLibrary();
197 void resetUndoStackMacros();
198 void updateSelectedComponentMenuItems();
199 void updateSceneRect();
200 void ensureSceneRectContainsRegion(
const QList<QRectF> ®ion);
201 void updateRubberBandSelectionMode(QRect rubberBandRect, QPointF fromScenePoint, QPointF toScenePoint);
210 void createIsolatedExternalPublishedPort(
string typeName,
bool isInput);
214 void insertCommentAtPos(QPointF targetScenePos);
215 void insertSubcompositionAtPos(QPointF targetScenePos);
216 void refactorSelectedItems();
217 void restoreDefaultLeftDockedWidgetWidths();
218 void hideSelectedInternalCables();
219 void hideCables(set<VuoRendererCable *> cables);
220 void unhideCables(set<VuoRendererCable *> cables);
222 void updateCanvasOpacity();
223 void updateColor(
bool isDark);
224 void coalescedUpdateRunningComposition();
225 void handlePendingProtocolComplianceReevaluationRequests();
228 friend class TestVuoEditor;
230 static const qreal viewportStepRate;
231 static const qreal viewportStepRateMultiplier;
232 static const qreal zoomRate;
233 static const qreal pastedComponentOffset;
234 static const qreal compositionMargin;
245 string coalescedOldCompositionSnapshot;
246 string coalescedNewCompositionSnapshot;
247 vector<string> coalescedInternalPortConstantsToSync;
248 vector<string> coalescedPublishedPortConstantsToSync;
249 vector<string> coalescedNodesToUnlink;
250 vector<string> coalescedNodesToRelink;
258 QMenu *menuNewCompositionWithTemplate;
259 QMenu *menuProtocols;
262 QMenu *contextMenuTints;
263 QMenu *menuChangeNode;
264 QAction *raiseDocumentAction;
268 QUndoStack *undoStack;
272 bool zoomOutToFitOnNextShowEvent;
273 bool compositionUpgradedSinceLastSave;
274 bool canvasDragEnabled;
275 bool canvasDragInProgress;
276 bool scrollInProgress;
277 double timeOfLastScroll;
278 bool consumeNextMouseReleaseToCanvas;
279 bool lastLeftMousePressHadOptionModifier;
280 bool rubberBandSelectionInProgress;
281 QPointF cursorPosAtLastComponentCopy;
282 QPoint canvasDragMinCursorPos;
283 QPoint canvasDragMaxCursorPos;
284 QPoint lastCursorLocationDuringCanvasDrag;
285 bool previousDragMoveWasOverSidebar;
286 bool itemDragMacroInProgress;
287 vector<QGraphicsItem *> itemsBeingDragged;
291 double latestDragTime;
292 bool commentResizeMacroInProgress;
295 bool duplicationMacroInProgress;
298 bool doneInitializing;
299 bool containedPrepopulatedContent;
300 bool includeInRecentFileMenu;
301 bool publishedPortNearCursorPreviously;
303 bool forwardingEventsToCanvas;
305 Ui::VuoEditorWindow *ui;
308 int nodeLibraryMinimumWidth;
309 int nodeLibraryMaximumWidth;
311 bool protocolComplianceReevaluationPending;
312 bool ignoreItemMoveSignals;
315 bool saveFile(
const QString & savePath, QString & existingPath);
316 bool saveFileAs(
const QString & savePath);
317 QString saveCompositionAs();
318 void acceptCloseEvent();
319 string installSubcomposition(
string parentCompositionPath);
320 bool ensureThisParentCompositionSaved();
321 string sanitizeSubcompositionName(
string name);
322 void updateToolbarElementUI();
323 void populateProtocolsMenu(QMenu *m);
324 void updateProtocolsMenu(QMenu *m);
325 void toggleActiveStatusForProtocol(
VuoProtocol *protocol);
326 void setPublishedPortSidebarVisibility(
bool visible);
327 void registerProtocolComplianceEvaluationRequest();
328 void setCompositionModified(
bool modified);
330 void pasteCompositionComponents();
331 void componentsPasted(QList<QGraphicsItem *> components,
string commandDescription=
"Paste");
332 bool containsLikelyVuoComposition(QString text);
333 string getMaximumSubcompositionFromSelection(
bool includePublishedPorts,
bool includeHeader);
335 void instantiateNewCompositionComponentsFromString(
string compositionText);
336 QList<QGraphicsItem *> mergeCompositionComponentsFromString(
string compositionText,
bool pasteAtCursorLoc,
bool pasteWithOffset,
string commandDescription=
"Paste");
338 QList<QGraphicsItem *> createAnyNecessaryMakeListComponents(
VuoPort *port);
341 void enableCanvasDrag();
342 void disableCanvasDrag();
343 void initiateCanvasDrag();
344 void concludeCanvasDrag();
345 void updateRefireAction();
347 string generateCurrentDefaultCopyright();
348 bool confirmReplacingFile(
string path);
349 bool arePublishedPortSidebarsVisible();
352 #include "pro/VuoEditorWindow_Pro.hh"