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 updateRubberBandSelectionMode(QRect rubberBandRect, QPointF fromScenePoint, QPointF toScenePoint);
209 void createIsolatedExternalPublishedPort(
string typeName,
bool isInput);
213 void insertCommentAtPos(QPointF targetScenePos);
214 void insertSubcompositionAtPos(QPointF targetScenePos);
215 void refactorSelectedItems();
216 void restoreDefaultLeftDockedWidgetWidths();
217 void hideSelectedInternalCables();
218 void hideCables(set<VuoRendererCable *> cables);
219 void unhideCables(set<VuoRendererCable *> cables);
221 void updateCanvasOpacity();
222 void updateColor(
bool isDark);
223 void coalescedUpdateRunningComposition();
224 void handlePendingProtocolComplianceReevaluationRequests();
227 friend class TestVuoEditor;
229 static const qreal viewportStepRate;
230 static const qreal viewportStepRateMultiplier;
231 static const qreal zoomRate;
232 static const qreal pastedComponentOffset;
233 static const qreal compositionMargin;
244 string coalescedOldCompositionSnapshot;
245 string coalescedNewCompositionSnapshot;
246 vector<string> coalescedInternalPortConstantsToSync;
247 vector<string> coalescedPublishedPortConstantsToSync;
248 vector<string> coalescedNodesToUnlink;
249 vector<string> coalescedNodesToRelink;
257 QMenu *menuNewCompositionWithTemplate;
258 QMenu *menuProtocols;
261 QMenu *contextMenuTints;
262 QMenu *menuChangeNode;
263 QAction *raiseDocumentAction;
267 QUndoStack *undoStack;
271 bool zoomOutToFitOnNextShowEvent;
272 bool compositionUpgradedSinceLastSave;
273 bool canvasDragEnabled;
274 bool canvasDragInProgress;
275 bool scrollInProgress;
276 double timeOfLastScroll;
277 bool consumeNextMouseReleaseToCanvas;
278 bool lastLeftMousePressHadOptionModifier;
279 bool rubberBandSelectionInProgress;
280 QPointF cursorPosAtLastComponentCopy;
281 QPoint canvasDragMinCursorPos;
282 QPoint canvasDragMaxCursorPos;
283 QPoint lastCursorLocationDuringCanvasDrag;
284 bool previousDragMoveWasOverSidebar;
285 bool itemDragMacroInProgress;
286 vector<QGraphicsItem *> itemsBeingDragged;
290 double latestDragTime;
291 bool commentResizeMacroInProgress;
294 bool duplicationMacroInProgress;
297 bool doneInitializing;
298 bool containedPrepopulatedContent;
299 bool includeInRecentFileMenu;
300 bool publishedPortNearCursorPreviously;
302 bool forwardingEventsToCanvas;
304 Ui::VuoEditorWindow *ui;
307 int nodeLibraryMinimumWidth;
308 int nodeLibraryMaximumWidth;
310 bool protocolComplianceReevaluationPending;
311 bool ignoreItemMoveSignals;
314 bool saveFile(
const QString & savePath, QString & existingPath);
315 bool saveFileAs(
const QString & savePath);
316 QString saveCompositionAs();
317 void acceptCloseEvent();
318 string installSubcomposition(
string parentCompositionPath);
319 bool ensureThisParentCompositionSaved();
320 string sanitizeSubcompositionName(
string name);
321 void populateProtocolsMenu(QMenu *m);
322 void updateProtocolsMenu(QMenu *m);
323 void toggleActiveStatusForProtocol(
VuoProtocol *protocol);
324 void setPublishedPortSidebarVisibility(
bool visible);
325 void registerProtocolComplianceEvaluationRequest();
326 void setCompositionModified(
bool modified);
328 void pasteCompositionComponents();
329 void componentsPasted(QList<QGraphicsItem *> components,
string commandDescription=
"Paste");
330 bool containsLikelyVuoComposition(QString text);
331 string getMaximumSubcompositionFromSelection(
bool includePublishedPorts,
bool includeHeader);
333 void instantiateNewCompositionComponentsFromString(
string compositionText);
334 QList<QGraphicsItem *> mergeCompositionComponentsFromString(
string compositionText,
bool pasteAtCursorLoc,
bool pasteWithOffset,
string commandDescription=
"Paste");
336 QList<QGraphicsItem *> createAnyNecessaryMakeListComponents(
VuoPort *port);
339 void enableCanvasDrag();
340 void disableCanvasDrag();
341 void initiateCanvasDrag();
342 void concludeCanvasDrag();
343 void updateRefireAction();
345 string generateCurrentDefaultCopyright();
346 bool confirmReplacingFile(
string path);
347 bool arePublishedPortSidebarsVisible();
350 #include "pro/VuoEditorWindow_Pro.hh"