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();
187 void on_showConsole_triggered();
189 void on_showPublishedPorts_triggered();
190 void on_showHiddenCables_triggered();
191 void on_showEvents_triggered();
192 void closePublishedPortSidebars();
193 void conditionallyShowPublishedPortSidebars(
bool visible);
194 void updatePublishedCableGeometry();
195 void updatePublishedPortOrder(vector<VuoPublishedPort *> ports,
bool isInput);
196 void updateWindowForNewCableDrag();
197 void displayDockedNodeLibrary();
199 void resetUndoStackMacros();
200 void updateSelectedComponentMenuItems();
201 void updateChangeNodeMenu();
202 void updateSceneRect();
203 void ensureSceneRectContainsRegion(
const QList<QRectF> ®ion);
204 void updateRubberBandSelectionMode(QRect rubberBandRect, QPointF fromScenePoint, QPointF toScenePoint);
213 void createIsolatedExternalPublishedPort(
string typeName,
bool isInput);
217 void insertCommentAtPos(QPointF targetScenePos);
218 void insertSubcompositionAtPos(QPointF targetScenePos);
219 void refactorSelectedItems();
220 void restoreDefaultLeftDockedWidgetWidths();
221 void hideSelectedInternalCables();
222 void hideCables(set<VuoRendererCable *> cables);
223 void unhideCables(set<VuoRendererCable *> cables);
225 void updateCanvasOpacity();
226 void updateColor(
bool isDark);
227 void coalescedUpdateRunningComposition();
228 void handlePendingProtocolComplianceReevaluationRequests();
231 friend class TestVuoEditor;
232 friend class TestEditorCommands;
234 static const qreal viewportStepRate;
235 static const qreal viewportStepRateMultiplier;
236 static const qreal zoomRate;
237 static const qreal pastedComponentOffset;
238 static const qreal compositionMargin;
249 string coalescedOldCompositionSnapshot;
250 string coalescedNewCompositionSnapshot;
251 vector<string> coalescedInternalPortConstantsToSync;
252 vector<string> coalescedPublishedPortConstantsToSync;
253 vector<string> coalescedNodesToUnlink;
254 vector<string> coalescedNodesToRelink;
262 QMenu *menuNewCompositionWithTemplate;
263 QMenu *menuProtocols;
266 QMenu *contextMenuTints;
267 QMenu *menuChangeNode;
268 QAction *raiseDocumentAction;
272 QUndoStack *undoStack;
276 bool zoomOutToFitOnNextShowEvent;
277 bool compositionUpgradedSinceLastSave;
278 bool canvasDragEnabled;
279 bool canvasDragInProgress;
280 bool scrollInProgress;
281 double timeOfLastScroll;
282 bool consumeNextMouseReleaseToCanvas;
283 bool lastLeftMousePressHadOptionModifier;
284 bool rubberBandSelectionInProgress;
285 QPointF cursorPosAtLastComponentCopy;
286 QPoint canvasDragMinCursorPos;
287 QPoint canvasDragMaxCursorPos;
288 QPoint lastCursorLocationDuringCanvasDrag;
289 bool previousDragMoveWasOverSidebar;
290 bool itemDragMacroInProgress;
291 vector<QGraphicsItem *> itemsBeingDragged;
295 double latestDragTime;
296 bool commentResizeMacroInProgress;
299 bool duplicationMacroInProgress;
302 bool doneInitializing;
303 bool containedPrepopulatedContent;
304 bool includeInRecentFileMenu;
305 bool publishedPortNearCursorPreviously;
307 bool forwardingEventsToCanvas;
309 Ui::VuoEditorWindow *ui;
312 int nodeLibraryMinimumWidth;
313 int nodeLibraryMaximumWidth;
315 bool protocolComplianceReevaluationPending;
316 bool ignoreItemMoveSignals;
319 bool saveFile(
const QString & savePath, QString & existingPath);
320 bool saveFileAs(
const QString & savePath);
321 QString saveCompositionAs();
322 void acceptCloseEvent();
323 string installSubcomposition(
string parentCompositionPath);
324 bool ensureThisParentCompositionSaved();
325 string sanitizeSubcompositionName(
string name);
326 void updateToolbarElementUI();
327 void populateProtocolsMenu(QMenu *m);
328 void updateProtocolsMenu(QMenu *m);
329 void toggleActiveStatusForProtocol(
VuoProtocol *protocol);
330 void setPublishedPortSidebarVisibility(
bool visible);
331 void registerProtocolComplianceEvaluationRequest();
332 void setCompositionModified(
bool modified);
334 void pasteCompositionComponents();
335 void componentsPasted(QList<QGraphicsItem *> components,
string commandDescription=
"Paste");
336 string getMaximumSubcompositionFromSelection(
bool includePublishedPorts,
bool includeHeader);
338 void instantiateNewCompositionComponentsFromString(
string compositionText);
339 QList<QGraphicsItem *> mergeCompositionComponentsFromString(
string compositionText,
bool pasteAtCursorLoc,
bool pasteWithOffset,
string commandDescription=
"Paste");
341 QList<QGraphicsItem *> createAnyNecessaryMakeListComponents(
VuoPort *port);
344 void enableCanvasDrag();
345 void disableCanvasDrag();
346 void initiateCanvasDrag();
347 void concludeCanvasDrag();
348 void updateRefireAction();
350 string generateCurrentDefaultCopyright();
351 bool confirmReplacingFile(
string path);
352 bool arePublishedPortSidebarsVisible();
355#include "pro/VuoEditorWindow_Pro.hh"