Vuo  2.3.2
Public Slots | Signals | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Friends | List of all members
VuoEditorWindow Class Reference

Description

Represents a window for editing a Vuo Composition.

One instance per composition.

Definition at line 46 of file VuoEditorWindow.hh.

Public Slots

void updateLatestDragTime ()
 Call this to indicate that a drag is in progress or has just completed. More...
 
void updateUI ()
 Updates the UI elements (e.g., enables/disables buttons) based on the application's state. More...
 
void itemsMoved (set< VuoRendererNode * > nodes, set< VuoRendererComment * > comments, qreal dx, qreal dy, bool movedByDragging)
 Moves input nodes and comments dx points horizontally and dy points vertically, meanwhile pushing the action onto the undo stack. More...
 
void commentResized (VuoRendererComment *comment, qreal dx, qreal dy)
 Resizes the input comment by dx points horizontally and dy points vertically, meanwhile pushing the action onto the undo stack. More...
 
void connectionCompleted (VuoRendererCable *cableInProgress, VuoRendererPort *targetPort, pair< VuoRendererCable *, VuoRendererCable * > cableArgs, VuoRendererNode *typecastNodeToDelete, pair< string, string > typeArgs, pair< VuoRendererPort *, VuoRendererPort * > portArgs)
 Completes the connection for the input cableInProgress to port targetPort. More...
 
void setTriggerThrottling (VuoPort *triggerPort, enum VuoPortClass::EventThrottling eventThrottling)
 Updates the trigger port's event-throttling behavior. More...
 
void adjustInputPortCountForNode (VuoRendererNode *node, int inputPortCountDelta, bool adjustmentRequestedByDragging)
 Adjusts the input port count for the provided node by inputPortCountDelta , provided the node is of a class (e.g., "Make List") eligible for such an operation. More...
 
void swapNodes (VuoRendererNode *node, string newNodeClass)
 Replaces the provided composition node with another node of the specified class, preserving whatever connections possible. More...
 
VuoRendererNodespecializePortNetwork (VuoRendererPort *port, string specializedTypeName)
 Specializes the provided port by replacing all networked ports of its generic type with ports of type specializedTypeName, meanwhile pushing the action onto the undo stack. More...
 
VuoRendererNodespecializePortNetwork (VuoRendererPort *port, string specializedTypeName, bool encapsulateInMacro)
 Specializes the provided port by replacing all networked ports of its generic type with ports of type specializedTypeName, meanwhile pushing the action onto the undo stack. More...
 
VuoRendererNodeunspecializePortNetwork (VuoRendererPort *port)
 Reverts the provided port and all ports within its connected network to their original generic origins, meanwhile pushing the action onto the Undo stack. More...
 
VuoRendererNodeunspecializePortNetwork (VuoRendererPort *port, bool encapsulateInMacro)
 Reverts the provided port and all ports within its connected network to their original generic origins, meanwhile pushing the action onto the Undo stack. More...
 
VuoRendererNoderespecializePortNetwork (VuoRendererPort *port, string specializedTypeName)
 Re-specializes the provided port by replacing all networked ports of its re-specialized type with ports of type specializedTypeName. More...
 
VuoRendererNoderespecializePortNetwork (VuoRendererPort *port, string specializedTypeName, bool encapsulateInMacro)
 Re-specializes the provided port by replacing all networked ports of its re-specialized type with ports of type specializedTypeName. More...
 
void tintSelectedItems (VuoNode::TintColor tintColor)
 Sets the tint color of the selected nodes and comments to tintColor, meanwhile pushing the action onto the undo stack. More...
 
void internalExternalPortPairPublished (VuoPort *internalPort, VuoPublishedPort *externalPort, bool forceEventOnlyPublication, VuoPort *portToSpecialize=NULL, string specializedTypeName="", string typecastToInsert="", bool useUndoStackMacro=true)
 Publishes the provided internalPort in association with the provided externalPort, meanwhile pushing the action onto the undo stack. More...
 
void internalPortPublishedViaDropBox (VuoPort *port, bool forceEventOnlyPublication, bool useUndoStackMacro)
 Publishes the provided port, meanwhile pushing the action onto the undo stack. More...
 
void internalPortPublished (VuoPort *port, bool forceEventOnlyPublication, string name="", bool merge=false, VuoPort *portToSpecialize=NULL, string specializedTypeName="", string typecastToInsert="", bool useUndoStackMacro=true)
 Publishes the provided port, meanwhile pushing the action onto the undo stack. More...
 
void externalPortUnpublished (VuoRendererPublishedPort *port)
 Unpublishes the provided externally visible published port, meanwhile pushing the action onto the undo stack. More...
 
void internalPortUnpublished (VuoPort *port)
 Unpublishes the provided internally visible published port, meanwhile pushing the action onto the undo stack. More...
 
void makeProtocolPortChanges (map< VuoPublishedPort *, string > publishedPortsToRename, set< VuoPublishedPort * > publishedPortsToRemove, vector< VuoPublishedPort * > publishedPortsToAdd, bool beginUndoStackMacro, bool endUndoStackMacro)
 Renames, removes, and adds the provided sets of published ports, in that order, pushing each operation onto the Undo stack. More...
 
void componentsRemoved (QList< QGraphicsItem * > components, string commandDescription)
 Removes the input components from the scene, meanwhile pushing the action onto the undo stack. More...
 
void componentsAdded (QList< QGraphicsItem * > components, VuoEditorComposition *target)
 Adds the input components to the scene, meanwhile pushing the action onto the undo stack. More...
 
void cutSelectedCompositionComponents ()
 Copies currenly selected comments, nodes, and any cables connecting those nodes internally; deletes all currently selected comments, nodes, and cables. More...
 
void copySelectedCompositionComponents ()
 Copies the currently selected content. More...
 
void disambiguatePasteRequest ()
 Attempts to determine whether or not the clipboard contains .vuo composition source text. More...
 
void duplicateSelectedCompositionComponentsByDrag ()
 Duplicates the currently selected comments, nodes, and any cables connecting those nodes internally. More...
 
void cleanUpCancelledDuplication ()
 Cleans up the 'Undo' stack after a cancelled duplication. More...
 
void conformToGlobalNodeLibraryVisibility (VuoNodeLibrary::nodeLibraryState visibility, VuoNodeLibrary *floater, bool previousFloaterDestroyed)
 Update the display mode of the node class library to conform with global settings. More...
 
void displayAppropriateDocumentation ()
 Displays the composition metadata in the node library documentation panel, if appropriate. More...
 
QAction * getRaiseDocumentAction () const
 Returns the action associated with raising the current editor window to the foreground. More...
 
QAction * getShowEventsAction () const
 Returns the Show Events action. More...
 
QAction * getZoomOutAction () const
 Returns a zoom action. More...
 
QAction * getZoom11Action () const
 Returns a zoom action. More...
 
QAction * getZoomToFitAction () const
 Returns a zoom action. More...
 
QAction * getZoomInAction () const
 Returns a zoom action. More...
 
void on_zoomToFit_triggered ()
 Unconditionally zooms to fit the composition. More...
 
void setAsActiveWindow ()
 Raises the current editor window to the foreground and activates it. More...
 
void on_runComposition_triggered ()
 Implements the Run action to run the composition. More...
 
void on_stopComposition_triggered ()
 Implements the Stop action to stop the composition. More...
 
void on_restartComposition_triggered ()
 Implements the Restart action to restart the running composition. More...
 
void on_refireEvent_triggered ()
 Re-fires the most recently manually fired trigger port. More...
 
void on_showNodeLibrary_triggered ()
 Shows the Node Class Library browser for this editor window and focuses its text filter. More...
 
void on_selectNone_triggered ()
 De-selects all composition components and resets the documentation panel content. More...
 
void on_find_triggered ()
 Finds and selects nodes that contain the user-entered search term within their display names or node class names. More...
 
void on_findNext_triggered ()
 Advances to the next search result. More...
 
void on_findPrevious_triggered ()
 Returns to the previous search result. More...
 
void coalesceSnapshots (string oldCompositionSnapshot, string newCompositionSnapshot, VuoCompilerCompositionDiff *diffInfo=nullptr)
 Coalesces the provided composition modifications with previously recorded modifications. More...
 
void coalesceInternalPortConstantsToSync (string portID)
 Adds the provided port to the previously recorded list of internal ports to be synced in the running composition. More...
 
void coalescePublishedPortConstantsToSync (string portID)
 Adds the provided port to the previously recorded list of published ports to be synced in the running composition. More...
 
void coalesceNodesToUnlink (string nodeID)
 Adds the provided node to the previously recorded list of nodes to unlink. More...
 
void coalesceNodesToRelink (string nodeID)
 Adds the provided node to the previously recorded list of nodes to relink. More...
 
void beginUndoStackMacro (QString commandName)
 Initiates an Undo stack macro with the provided commandName. More...
 
void endUndoStackMacro ()
 Concludes the Undo stack macro currently being composed. More...
 
static string deriveBaseNodeClassNameFromDisplayName (string displayName)
 Derives a base node class name from the provided node display name, for use in installing user-named subcomposition nodes. More...
 

Signals

void windowActivated ()
 Emitted when the window has been activated. More...
 
void windowDeactivated ()
 Emitted when the window has been de-activated. More...
 

Public Member Functions

 VuoEditorWindow (QString documentIdentifier="", QString compositionPath="", const string &compositionAsString="", VuoNodeLibrary::nodeLibraryDisplayMode nodeLibraryDisplayMode=VuoNodeLibrary::displayByClass, VuoNodeLibrary::nodeLibraryState nodeLibraryState=VuoNodeLibrary::nodeLibraryHidden, VuoNodeLibrary *floater=NULL, VuoProtocol *activeProtocol=NULL, string nodeClassToHighlight="")
 Creates a new window for editing a Vuo Composition. More...
 
bool isScrollInProgress ()
 Returns true if a scroll gesture is currently being performed. More...
 
bool isItemDragInProgress ()
 Returns true if items are currently being dragged around the canvas. More...
 
double getLatestDragTime ()
 Returns the timestamp of the most recent drag event. More...
 
void highlightNodeClass (string nodeClass)
 Calls attention to nodes of class nodeClass within the composition by selecting them and centering the view on them. More...
 
VuoNodeLibrarygetOwnedNodeLibrary ()
 Returns a pointer to the node class library owned by this editor window. More...
 
VuoNodeLibrarygetCurrentNodeLibrary ()
 Returns a pointer to the node class library currently in use by this editor window. More...
 
void assignSurrogateNodeLibrary (VuoNodeLibrary *library)
 Assigns a surrogate node class library to be used instead of the library owned by this window, e.g., when in global floating-node-library mode and the library owned by this window is hidden. More...
 
void releaseSurrogateNodeLibrary (bool previousFloaterDestroyed)
 Releases any surrogate node class library currently assigned to this window. More...
 
QMenu * getFileMenu ()
 Returns the "File" menu associated with this editor window. More...
 
VuoRecentFileMenugetRecentFileMenu ()
 Returns the "File > Open Recent" menu associated with this editor window. More...
 
void setIncludeInRecentFileMenu (bool include)
 Sets the boolean indicating whether this file should be added to the "File > Open Recent" list when saved. More...
 
VuoEditorCompositiongetComposition ()
 Returns the composition associated with this editor window. More...
 
QPointF getCursorScenePos ()
 Returns the current position of the cursor in scene coordinates. More...
 
VuoCompositionMetadataPanelgetMetadataPanel ()
 Returns the metadata panel for this composition. More...
 
QPointF getFittedScenePos (QPointF origPos, int leftMargin=50, int topMargin=50, int rightMargin=175, int bottomMargin=75)
 Clamps the provided scene coordinates to the viewport bounds and avoids returning coordinates that exactly match the position of any existing node, for use, e.g., in positioning new nodes near the cursor but within the viewport. More...
 
void showPublishedPortSidebars ()
 Shows the Published Ports side panels for this editor window if they are not already visible. More...
 
void resetCompositionWithSnapshot (string snapshot)
 Clears the composition of its current components and re-populates it from the provided snapshot. More...
 
void zoomOutToFit ()
 Zooms to fit if the composition is too large to be displayed in full within the current viewport. More...
 
- Public Member Functions inherited from VuoMainWindow
QString getWindowTitleWithoutPlaceholder ()
 Returns the window title, minus the [*] window-modified placeholder. More...
 

Static Public Member Functions

static VuoEditorWindowexistingWindowWithNewFile ()
 Returns an existing window displaying an unsaved composition that was contentless when initialized and unmodified currently, if one exists. More...
 
static bool containsLikelyVuoComposition (QString text)
 Performs a quick check to determine whether the clipboard contains the text of a likely .vuo composition. More...
 
static VuoEditorWindowgetMostRecentActiveEditorWindow ()
 Returns the most recent active editor window. More...
 
static QString getNodeClassNameForDisplayNameAndCategory (QString compositionName, QString category, QString defaultCompositionName, QString defaultCategory)
 Returns the node class name derived from the provided composition name and category (subcomposition prefix), or defaults if either derivation is empty. More...
 

Static Public Attributes

static QString untitledComposition
 The display name to use for an untitled composition. More...
 
static VuoEditorWindowmostRecentActiveEditorWindow = NULL
 The most recent active VuoEditorWindow. More...
 

Protected Member Functions

bool event (QEvent *event) VuoWarnUnusedResult
 Handles events for the editor window. More...
 
bool eventFilter (QObject *object, QEvent *event) VuoWarnUnusedResult
 Filters events on watched objects. More...
 
void keyPressEvent (QKeyEvent *event)
 Handle keypress events. More...
 
void keyReleaseEvent (QKeyEvent *event)
 Handle key release events. More...
 
void mouseMoveEvent (QMouseEvent *event)
 Handle mouse move events. More...
 
void closeEvent (QCloseEvent *event)
 Implement the Close action to close the composition. More...
 
void moveEvent (QMoveEvent *event)
 Receive widget move events passed in the event parameter. More...
 
void resizeEvent (QResizeEvent *event)
 Receive widget resize events passed in the event parameter. More...
 

Friends

class TestVuoEditor
 
class TestEditorCommands
 

Constructor & Destructor Documentation

◆ VuoEditorWindow()

VuoEditorWindow::VuoEditorWindow ( QString  documentIdentifier = "",
QString  compositionPath = "",
const string &  compositionAsString = "",
VuoNodeLibrary::nodeLibraryDisplayMode  nodeLibraryDisplayMode = VuoNodeLibrary::displayByClass,
VuoNodeLibrary::nodeLibraryState  nodeLibraryState = VuoNodeLibrary::nodeLibraryHidden,
VuoNodeLibrary floater = NULL,
VuoProtocol activeProtocol = NULL,
string  nodeClassToHighlight = "" 
)
explicit

Creates a new window for editing a Vuo Composition.

If compositionAsString is not empty, that composition is loaded into the window.

The title of the composition is based on documentIdentifier, which can be either the path of the composition or something like "Untitled Composition".

The compiler is configured with compositionPath, which can be the full path of the composition, the path of the directory containing the composition, or empty if no path is known yet.

Definition at line 109 of file VuoEditorWindow.cc.

Member Function Documentation

◆ adjustInputPortCountForNode

void VuoEditorWindow::adjustInputPortCountForNode ( VuoRendererNode node,
int  inputPortCountDelta,
bool  adjustmentRequestedByDragging 
)
slot

Adjusts the input port count for the provided node by inputPortCountDelta , provided the node is of a class (e.g., "Make List") eligible for such an operation.

Definition at line 2106 of file VuoEditorWindow.cc.

◆ assignSurrogateNodeLibrary()

void VuoEditorWindow::assignSurrogateNodeLibrary ( VuoNodeLibrary library)

Assigns a surrogate node class library to be used instead of the library owned by this window, e.g., when in global floating-node-library mode and the library owned by this window is hidden.

Definition at line 6210 of file VuoEditorWindow.cc.

◆ beginUndoStackMacro

void VuoEditorWindow::beginUndoStackMacro ( QString  commandName)
slot

Initiates an Undo stack macro with the provided commandName.

Definition at line 6636 of file VuoEditorWindow.cc.

◆ cleanUpCancelledDuplication

void VuoEditorWindow::cleanUpCancelledDuplication ( )
slot

Cleans up the 'Undo' stack after a cancelled duplication.

Definition at line 1449 of file VuoEditorWindow.cc.

◆ closeEvent()

void VuoEditorWindow::closeEvent ( QCloseEvent *  event)
protected

Implement the Close action to close the composition.

Definition at line 4888 of file VuoEditorWindow.cc.

◆ coalesceInternalPortConstantsToSync

void VuoEditorWindow::coalesceInternalPortConstantsToSync ( string  portID)
slot

Adds the provided port to the previously recorded list of internal ports to be synced in the running composition.

Definition at line 6515 of file VuoEditorWindow.cc.

◆ coalesceNodesToRelink

void VuoEditorWindow::coalesceNodesToRelink ( string  nodeID)
slot

Adds the provided node to the previously recorded list of nodes to relink.

Definition at line 6539 of file VuoEditorWindow.cc.

◆ coalesceNodesToUnlink

void VuoEditorWindow::coalesceNodesToUnlink ( string  nodeID)
slot

Adds the provided node to the previously recorded list of nodes to unlink.

Definition at line 6531 of file VuoEditorWindow.cc.

◆ coalescePublishedPortConstantsToSync

void VuoEditorWindow::coalescePublishedPortConstantsToSync ( string  portID)
slot

Adds the provided port to the previously recorded list of published ports to be synced in the running composition.

Definition at line 6523 of file VuoEditorWindow.cc.

◆ coalesceSnapshots

void VuoEditorWindow::coalesceSnapshots ( string  oldCompositionSnapshot,
string  newCompositionSnapshot,
VuoCompilerCompositionDiff diffInfo = nullptr 
)
slot

Coalesces the provided composition modifications with previously recorded modifications.

Definition at line 6499 of file VuoEditorWindow.cc.

◆ commentResized

void VuoEditorWindow::commentResized ( VuoRendererComment comment,
qreal  dx,
qreal  dy 
)
slot

Resizes the input comment by dx points horizontally and dy points vertically, meanwhile pushing the action onto the undo stack.

Definition at line 1082 of file VuoEditorWindow.cc.

◆ componentsAdded

void VuoEditorWindow::componentsAdded ( QList< QGraphicsItem * >  components,
VuoEditorComposition target 
)
slot

Adds the input components to the scene, meanwhile pushing the action onto the undo stack.

Definition at line 1094 of file VuoEditorWindow.cc.

◆ componentsRemoved

void VuoEditorWindow::componentsRemoved ( QList< QGraphicsItem * >  components,
string  commandDescription 
)
slot

Removes the input components from the scene, meanwhile pushing the action onto the undo stack.

Definition at line 2087 of file VuoEditorWindow.cc.

◆ conformToGlobalNodeLibraryVisibility

void VuoEditorWindow::conformToGlobalNodeLibraryVisibility ( VuoNodeLibrary::nodeLibraryState  visibility,
VuoNodeLibrary floater,
bool  previousFloaterDestroyed 
)
slot

Update the display mode of the node class library to conform with global settings.

Definition at line 4805 of file VuoEditorWindow.cc.

◆ connectionCompleted

void VuoEditorWindow::connectionCompleted ( VuoRendererCable cableInProgress,
VuoRendererPort targetPort,
pair< VuoRendererCable *, VuoRendererCable * >  cableArgs,
VuoRendererNode typecastNodeToDelete,
pair< string, string >  typeArgs,
pair< VuoRendererPort *, VuoRendererPort * >  portArgs 
)
slot

Completes the connection for the input cableInProgress to port targetPort.

This operation may also involve:

  • Specializing or re-specializing the portToSpecialize (if non-NULL) by assigning it a type of specializedTypeName;
  • Displacing the dataCableToDisplace (if non-NULL);
  • Replacing the cableToReplace (if non-NULL);
  • Deleting the typecastNodeToDelete (if non-NULL);
  • Unpublishing the portToUnpublish (if non-NULL); and
  • Bridging the connection with a typecast of class name typecastToInsert (if non-empty).

The cableArgs pair is expected to contain (dataCableToDisplace, cableToReplace). The typeArgs pair is expected to contain (typecastToInsert, specializedTypeName). The portArgs pair is expected to contain (portToUnpublish, portToSpecialize).

Pushes the sequence of operations onto the Undo stack, without coalescing them into a macro. To do so, call beginUndoStackMacro() and endUndoStackMacro() before and after calling this function.

Definition at line 1846 of file VuoEditorWindow.cc.

◆ containsLikelyVuoComposition()

bool VuoEditorWindow::containsLikelyVuoComposition ( QString  text)
static

Performs a quick check to determine whether the clipboard contains the text of a likely .vuo composition.

Definition at line 5149 of file VuoEditorWindow.cc.

◆ copySelectedCompositionComponents

void VuoEditorWindow::copySelectedCompositionComponents ( )
slot

Copies the currently selected content.

If the node library documentation pane currently has selected text (only possible if it is the active widget), copies that text. Otherwise, copies the currently selected comments, nodes, and any cables connecting those nodes internally.

Definition at line 1298 of file VuoEditorWindow.cc.

◆ cutSelectedCompositionComponents

void VuoEditorWindow::cutSelectedCompositionComponents ( )
slot

Copies currenly selected comments, nodes, and any cables connecting those nodes internally; deletes all currently selected comments, nodes, and cables.

Definition at line 1821 of file VuoEditorWindow.cc.

◆ deriveBaseNodeClassNameFromDisplayName

string VuoEditorWindow::deriveBaseNodeClassNameFromDisplayName ( string  displayName)
staticslot

Derives a base node class name from the provided node display name, for use in installing user-named subcomposition nodes.

Similar to VuoStringUtilities::transcodeToIdentifier, but we can't use that as-is since it permits non-RDNS-compatible characters (e.g., underscores), removes dots, and doesn't apply camelCase.

Definition at line 4030 of file VuoEditorWindow.cc.

◆ disambiguatePasteRequest

void VuoEditorWindow::disambiguatePasteRequest ( )
slot

Attempts to determine whether or not the clipboard contains .vuo composition source text.

If so, pastes it onto the canvas; if not, activates the node library text filter and pastes the clipboard contents there.

Definition at line 1320 of file VuoEditorWindow.cc.

◆ displayAppropriateDocumentation

void VuoEditorWindow::displayAppropriateDocumentation ( )
slot

Displays the composition metadata in the node library documentation panel, if appropriate.

Otherwise, displays the documentation for the node class currently selected within the node library.

Definition at line 4864 of file VuoEditorWindow.cc.

◆ duplicateSelectedCompositionComponentsByDrag

void VuoEditorWindow::duplicateSelectedCompositionComponentsByDrag ( )
slot

Duplicates the currently selected comments, nodes, and any cables connecting those nodes internally.

Should be called when the duplication is to be performed as part of a mouse drag, and the operations should be aggregated on the Undo stack.

Definition at line 1382 of file VuoEditorWindow.cc.

◆ endUndoStackMacro

void VuoEditorWindow::endUndoStackMacro ( )
slot

Concludes the Undo stack macro currently being composed.

Definition at line 6644 of file VuoEditorWindow.cc.

◆ event()

bool VuoEditorWindow::event ( QEvent *  event)
protected

Handles events for the editor window.

Definition at line 2867 of file VuoEditorWindow.cc.

◆ eventFilter()

bool VuoEditorWindow::eventFilter ( QObject *  object,
QEvent *  event 
)
protected

Filters events on watched objects.

Definition at line 2987 of file VuoEditorWindow.cc.

◆ existingWindowWithNewFile()

VuoEditorWindow * VuoEditorWindow::existingWindowWithNewFile ( )
static

Returns an existing window displaying an unsaved composition that was contentless when initialized and unmodified currently, if one exists.

Otherwise returns NULL.

Compositions that contain only the default "Fire on Start" node are considered contentless; compositions initialized from a protocol or window template are not.

Definition at line 1034 of file VuoEditorWindow.cc.

◆ externalPortUnpublished

void VuoEditorWindow::externalPortUnpublished ( VuoRendererPublishedPort port)
slot

Unpublishes the provided externally visible published port, meanwhile pushing the action onto the undo stack.

Definition at line 2732 of file VuoEditorWindow.cc.

◆ getComposition()

VuoEditorComposition * VuoEditorWindow::getComposition ( )

Returns the composition associated with this editor window.

Definition at line 6245 of file VuoEditorWindow.cc.

◆ getCurrentNodeLibrary()

VuoNodeLibrary * VuoEditorWindow::getCurrentNodeLibrary ( )

Returns a pointer to the node class library currently in use by this editor window.

This may be the library docked into the window or the single floating library.

Definition at line 6200 of file VuoEditorWindow.cc.

◆ getCursorScenePos()

QPointF VuoEditorWindow::getCursorScenePos ( )

Returns the current position of the cursor in scene coordinates.

Definition at line 6574 of file VuoEditorWindow.cc.

◆ getFileMenu()

QMenu * VuoEditorWindow::getFileMenu ( )

Returns the "File" menu associated with this editor window.

Definition at line 6229 of file VuoEditorWindow.cc.

◆ getFittedScenePos()

QPointF VuoEditorWindow::getFittedScenePos ( QPointF  origPos,
int  leftMargin = 50,
int  topMargin = 50,
int  rightMargin = 175,
int  bottomMargin = 75 
)

Clamps the provided scene coordinates to the viewport bounds and avoids returning coordinates that exactly match the position of any existing node, for use, e.g., in positioning new nodes near the cursor but within the viewport.

Enforces the provided margins around the edges of the viewport. Current defaults are approximations in an effort to make nodes fully visible within the viewport.

Definition at line 6596 of file VuoEditorWindow.cc.

◆ getLatestDragTime()

double VuoEditorWindow::getLatestDragTime ( )

Returns the timestamp of the most recent drag event.

Definition at line 3315 of file VuoEditorWindow.cc.

◆ getMetadataPanel()

VuoCompositionMetadataPanel * VuoEditorWindow::getMetadataPanel ( )

Returns the metadata panel for this composition.

Definition at line 6582 of file VuoEditorWindow.cc.

◆ getMostRecentActiveEditorWindow()

VuoEditorWindow * VuoEditorWindow::getMostRecentActiveEditorWindow ( )
static

Returns the most recent active editor window.

Definition at line 6183 of file VuoEditorWindow.cc.

◆ getNodeClassNameForDisplayNameAndCategory()

QString VuoEditorWindow::getNodeClassNameForDisplayNameAndCategory ( QString  compositionName,
QString  category,
QString  defaultCompositionName,
QString  defaultCategory 
)
static

Returns the node class name derived from the provided composition name and category (subcomposition prefix), or defaults if either derivation is empty.

Definition at line 4006 of file VuoEditorWindow.cc.

◆ getOwnedNodeLibrary()

VuoNodeLibrary * VuoEditorWindow::getOwnedNodeLibrary ( )

Returns a pointer to the node class library owned by this editor window.

Definition at line 6191 of file VuoEditorWindow.cc.

◆ getRaiseDocumentAction

QAction * VuoEditorWindow::getRaiseDocumentAction ( ) const
slot

Returns the action associated with raising the current editor window to the foreground.

Definition at line 6121 of file VuoEditorWindow.cc.

◆ getRecentFileMenu()

VuoRecentFileMenu * VuoEditorWindow::getRecentFileMenu ( )

Returns the "File > Open Recent" menu associated with this editor window.

Definition at line 6237 of file VuoEditorWindow.cc.

◆ getShowEventsAction

QAction * VuoEditorWindow::getShowEventsAction ( ) const
slot

Returns the Show Events action.

Definition at line 6129 of file VuoEditorWindow.cc.

◆ getZoom11Action

QAction * VuoEditorWindow::getZoom11Action ( ) const
slot

Returns a zoom action.

Definition at line 6145 of file VuoEditorWindow.cc.

◆ getZoomInAction

QAction * VuoEditorWindow::getZoomInAction ( ) const
slot

Returns a zoom action.

Definition at line 6161 of file VuoEditorWindow.cc.

◆ getZoomOutAction

QAction * VuoEditorWindow::getZoomOutAction ( ) const
slot

Returns a zoom action.

Definition at line 6137 of file VuoEditorWindow.cc.

◆ getZoomToFitAction

QAction * VuoEditorWindow::getZoomToFitAction ( ) const
slot

Returns a zoom action.

Definition at line 6153 of file VuoEditorWindow.cc.

◆ highlightNodeClass()

void VuoEditorWindow::highlightNodeClass ( string  nodeClass)

Calls attention to nodes of class nodeClass within the composition by selecting them and centering the view on them.

Definition at line 1404 of file VuoEditorWindow.cc.

◆ internalExternalPortPairPublished

void VuoEditorWindow::internalExternalPortPairPublished ( VuoPort internalPort,
VuoPublishedPort externalPort,
bool  forceEventOnlyPublication,
VuoPort portToSpecialize = NULL,
string  specializedTypeName = "",
string  typecastToInsert = "",
bool  useUndoStackMacro = true 
)
slot

Publishes the provided internalPort in association with the provided externalPort, meanwhile pushing the action onto the undo stack.

Definition at line 2531 of file VuoEditorWindow.cc.

◆ internalPortPublished

void VuoEditorWindow::internalPortPublished ( VuoPort port,
bool  forceEventOnlyPublication,
string  name = "",
bool  merge = false,
VuoPort portToSpecialize = NULL,
string  specializedTypeName = "",
string  typecastToInsert = "",
bool  useUndoStackMacro = true 
)
slot

Publishes the provided port, meanwhile pushing the action onto the undo stack.

Definition at line 2547 of file VuoEditorWindow.cc.

◆ internalPortPublishedViaDropBox

void VuoEditorWindow::internalPortPublishedViaDropBox ( VuoPort port,
bool  forceEventOnlyPublication,
bool  useUndoStackMacro 
)
slot

Publishes the provided port, meanwhile pushing the action onto the undo stack.

Definition at line 2539 of file VuoEditorWindow.cc.

◆ internalPortUnpublished

void VuoEditorWindow::internalPortUnpublished ( VuoPort port)
slot

Unpublishes the provided internally visible published port, meanwhile pushing the action onto the undo stack.

Definition at line 2764 of file VuoEditorWindow.cc.

◆ isItemDragInProgress()

bool VuoEditorWindow::isItemDragInProgress ( )

Returns true if items are currently being dragged around the canvas.

Definition at line 3299 of file VuoEditorWindow.cc.

◆ isScrollInProgress()

bool VuoEditorWindow::isScrollInProgress ( )

Returns true if a scroll gesture is currently being performed.

Definition at line 3291 of file VuoEditorWindow.cc.

◆ itemsMoved

void VuoEditorWindow::itemsMoved ( set< VuoRendererNode * >  nodes,
set< VuoRendererComment * >  comments,
qreal  dx,
qreal  dy,
bool  movedByDragging 
)
slot

Moves input nodes and comments dx points horizontally and dy points vertically, meanwhile pushing the action onto the undo stack.

Definition at line 1049 of file VuoEditorWindow.cc.

◆ keyPressEvent()

void VuoEditorWindow::keyPressEvent ( QKeyEvent *  event)
protected

Handle keypress events.

Definition at line 3378 of file VuoEditorWindow.cc.

◆ keyReleaseEvent()

void VuoEditorWindow::keyReleaseEvent ( QKeyEvent *  event)
protected

Handle key release events.

Definition at line 3456 of file VuoEditorWindow.cc.

◆ makeProtocolPortChanges

void VuoEditorWindow::makeProtocolPortChanges ( map< VuoPublishedPort *, string >  publishedPortsToRename,
set< VuoPublishedPort * >  publishedPortsToRemove,
vector< VuoPublishedPort * >  publishedPortsToAdd,
bool  beginUndoStackMacro,
bool  endUndoStackMacro 
)
slot

Renames, removes, and adds the provided sets of published ports, in that order, pushing each operation onto the Undo stack.

Definition at line 2787 of file VuoEditorWindow.cc.

◆ mouseMoveEvent()

void VuoEditorWindow::mouseMoveEvent ( QMouseEvent *  event)
protected

Handle mouse move events.

Definition at line 3476 of file VuoEditorWindow.cc.

◆ moveEvent()

void VuoEditorWindow::moveEvent ( QMoveEvent *  event)
protected

Receive widget move events passed in the event parameter.

When the widget receives this event, it is already at the new position.

Definition at line 6322 of file VuoEditorWindow.cc.

◆ on_find_triggered

void VuoEditorWindow::on_find_triggered ( )
slot

Finds and selects nodes that contain the user-entered search term within their display names or node class names.

Definition at line 4110 of file VuoEditorWindow.cc.

◆ on_findNext_triggered

void VuoEditorWindow::on_findNext_triggered ( )
slot

Advances to the next search result.

Definition at line 4121 of file VuoEditorWindow.cc.

◆ on_findPrevious_triggered

void VuoEditorWindow::on_findPrevious_triggered ( )
slot

Returns to the previous search result.

Definition at line 4130 of file VuoEditorWindow.cc.

◆ on_refireEvent_triggered

void VuoEditorWindow::on_refireEvent_triggered ( )
slot

Re-fires the most recently manually fired trigger port.

Definition at line 4535 of file VuoEditorWindow.cc.

◆ on_restartComposition_triggered

void VuoEditorWindow::on_restartComposition_triggered ( )
slot

Implements the Restart action to restart the running composition.

Definition at line 4526 of file VuoEditorWindow.cc.

◆ on_runComposition_triggered

void VuoEditorWindow::on_runComposition_triggered ( )
slot

Implements the Run action to run the composition.

Definition at line 4498 of file VuoEditorWindow.cc.

◆ on_selectNone_triggered

void VuoEditorWindow::on_selectNone_triggered ( )
slot

De-selects all composition components and resets the documentation panel content.

Definition at line 3554 of file VuoEditorWindow.cc.

◆ on_showNodeLibrary_triggered

void VuoEditorWindow::on_showNodeLibrary_triggered ( void  )
slot

Shows the Node Class Library browser for this editor window and focuses its text filter.

Definition at line 4597 of file VuoEditorWindow.cc.

◆ on_stopComposition_triggered

void VuoEditorWindow::on_stopComposition_triggered ( )
slot

Implements the Stop action to stop the composition.

Definition at line 4513 of file VuoEditorWindow.cc.

◆ on_zoomToFit_triggered

void VuoEditorWindow::on_zoomToFit_triggered ( )
slot

Unconditionally zooms to fit the composition.

Definition at line 3615 of file VuoEditorWindow.cc.

◆ releaseSurrogateNodeLibrary()

void VuoEditorWindow::releaseSurrogateNodeLibrary ( bool  previousFloaterDestroyed)

Releases any surrogate node class library currently assigned to this window.

Definition at line 6220 of file VuoEditorWindow.cc.

◆ resetCompositionWithSnapshot()

void VuoEditorWindow::resetCompositionWithSnapshot ( string  snapshot)

Clears the composition of its current components and re-populates it from the provided snapshot.

Definition at line 1461 of file VuoEditorWindow.cc.

◆ resizeEvent()

void VuoEditorWindow::resizeEvent ( QResizeEvent *  event)
protected

Receive widget resize events passed in the event parameter.

When the widget receives this event, it already has its new geometry.

Definition at line 6334 of file VuoEditorWindow.cc.

◆ respecializePortNetwork [1/2]

VuoRendererNode * VuoEditorWindow::respecializePortNetwork ( VuoRendererPort port,
string  specializedTypeName 
)
slot

Re-specializes the provided port by replacing all networked ports of its re-specialized type with ports of type specializedTypeName.

Coalesces all port re-specializations into a single Undo stack macro.

Returns a pointer to the new parent node of the given port after re-specialization.

Definition at line 2368 of file VuoEditorWindow.cc.

◆ respecializePortNetwork [2/2]

VuoRendererNode * VuoEditorWindow::respecializePortNetwork ( VuoRendererPort port,
string  specializedTypeName,
bool  encapsulateInMacro 
)
slot

Re-specializes the provided port by replacing all networked ports of its re-specialized type with ports of type specializedTypeName.

If encapsulateInMacro is true, coalesces all port re-specializations into a single Undo stack macro.

Returns a pointer to the new parent node of the given port after re-specialization.

Definition at line 2382 of file VuoEditorWindow.cc.

◆ setAsActiveWindow

void VuoEditorWindow::setAsActiveWindow ( )
slot

Raises the current editor window to the foreground and activates it.

Definition at line 6169 of file VuoEditorWindow.cc.

◆ setIncludeInRecentFileMenu()

void VuoEditorWindow::setIncludeInRecentFileMenu ( bool  include)

Sets the boolean indicating whether this file should be added to the "File > Open Recent" list when saved.

Definition at line 5634 of file VuoEditorWindow.cc.

◆ setTriggerThrottling

void VuoEditorWindow::setTriggerThrottling ( VuoPort triggerPort,
enum VuoPortClass::EventThrottling  eventThrottling 
)
slot

Updates the trigger port's event-throttling behavior.

Definition at line 2096 of file VuoEditorWindow.cc.

◆ showPublishedPortSidebars()

void VuoEditorWindow::showPublishedPortSidebars ( void  )

Shows the Published Ports side panels for this editor window if they are not already visible.

Returns a boolean indicating whether they did in fact need to be shown (were previously hidden).

Definition at line 4618 of file VuoEditorWindow.cc.

◆ specializePortNetwork [1/2]

VuoRendererNode * VuoEditorWindow::specializePortNetwork ( VuoRendererPort port,
string  specializedTypeName 
)
slot

Specializes the provided port by replacing all networked ports of its generic type with ports of type specializedTypeName, meanwhile pushing the action onto the undo stack.

Coalesces all port specializations into a single Undo stack macro.

Returns a pointer to the new parent node of the given port after specialization.

Definition at line 2170 of file VuoEditorWindow.cc.

◆ specializePortNetwork [2/2]

VuoRendererNode * VuoEditorWindow::specializePortNetwork ( VuoRendererPort port,
string  specializedTypeName,
bool  encapsulateInMacro 
)
slot

Specializes the provided port by replacing all networked ports of its generic type with ports of type specializedTypeName, meanwhile pushing the action onto the undo stack.

If encapsulateInMacro is true, coalesces all port specializations into a single Undo stack macro.

Returns a pointer to the new parent node of the given port after specialization.

Definition at line 2183 of file VuoEditorWindow.cc.

◆ swapNodes

void VuoEditorWindow::swapNodes ( VuoRendererNode node,
string  newNodeClass 
)
slot

Replaces the provided composition node with another node of the specified class, preserving whatever connections possible.

Definition at line 2152 of file VuoEditorWindow.cc.

◆ tintSelectedItems

void VuoEditorWindow::tintSelectedItems ( VuoNode::TintColor  tintColor)
slot

Sets the tint color of the selected nodes and comments to tintColor, meanwhile pushing the action onto the undo stack.

Definition at line 2429 of file VuoEditorWindow.cc.

◆ unspecializePortNetwork [1/2]

VuoRendererNode * VuoEditorWindow::unspecializePortNetwork ( VuoRendererPort port)
slot

Reverts the provided port and all ports within its connected network to their original generic origins, meanwhile pushing the action onto the Undo stack.

Coalesces all port specializations into a single Undo stack macro.

Returns a pointer to the new parent node of the given port after unspecialization.

Definition at line 2288 of file VuoEditorWindow.cc.

◆ unspecializePortNetwork [2/2]

VuoRendererNode * VuoEditorWindow::unspecializePortNetwork ( VuoRendererPort port,
bool  encapsulateInMacro 
)
slot

Reverts the provided port and all ports within its connected network to their original generic origins, meanwhile pushing the action onto the Undo stack.

If encapsulateInMacro is true, coalesces all port specializations into a single Undo stack macro.

Returns a pointer to the new parent node of the given port after unspecialization.

Definition at line 2301 of file VuoEditorWindow.cc.

◆ updateLatestDragTime

void VuoEditorWindow::updateLatestDragTime ( )
slot

Call this to indicate that a drag is in progress or has just completed.

Definition at line 3307 of file VuoEditorWindow.cc.

◆ updateUI

void VuoEditorWindow::updateUI ( )
slot

Updates the UI elements (e.g., enables/disables buttons) based on the application's state.

Definition at line 820 of file VuoEditorWindow.cc.

◆ windowActivated

void VuoEditorWindow::windowActivated ( )
signal

Emitted when the window has been activated.

◆ windowDeactivated

void VuoEditorWindow::windowDeactivated ( )
signal

Emitted when the window has been de-activated.

◆ zoomOutToFit()

void VuoEditorWindow::zoomOutToFit ( )

Zooms to fit if the composition is too large to be displayed in full within the current viewport.

Definition at line 3632 of file VuoEditorWindow.cc.

Member Data Documentation

◆ mostRecentActiveEditorWindow

VuoEditorWindow * VuoEditorWindow::mostRecentActiveEditorWindow = NULL
static

The most recent active VuoEditorWindow.

Definition at line 84 of file VuoEditorWindow.hh.

◆ untitledComposition

QString VuoEditorWindow::untitledComposition
static

The display name to use for an untitled composition.

Definition at line 83 of file VuoEditorWindow.hh.


The documentation for this class was generated from the following files: