Vuo  0.4.2
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
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.

Public Slots

void nodesMoved (set< VuoRendererNode * > nodes, qreal dx, qreal dy, bool movedByDragging)
 Moves input nodes dx points horizontally and dy points vertically, meanwhile pushing the action onto the undo stack.
 
void connectionCompleted (VuoRendererCable *cableInProgress, VuoRendererPort *targetPort, VuoRendererCable *previousConnectedCable, VuoRendererPort *portToUnpublish, string typecastToInsert)
 Completes the connection for the input cableInProgress to port *targetPort, displacing the previousConnectedCable (if non-NULL), unpublishing the portToUnpublish (if non-NULL), and bridging the connection with a typecast of class name typecastToInsert (if non-empty), meanwhile pushing the action onto the undo stack.
 
void portConstantSet (VuoCompilerInputEventPort *node, QString value)
 Sets the value of the input port to value, meanwhile pushing the action onto the undo stack.
 
void portConstantSetByMenu (QAction *action)
 Allow this type to be used as a QVariant for QObject::property().
 
void nodeTitleSet (VuoCompilerNode *node, QString value)
 Sets the title (display name) of the input node to value, meanwhile pushing the action onto the undo stack.
 
void tintSelectedNodes (VuoNode::TintColor tintColor)
 Sets the tint color of the selected nodes to tintColor, meanwhile pushing the action onto the undo stack.
 
void publishedPortNameSet (VuoRendererPublishedPort *port, QString value)
 Sets the name of the published port to value, meanwhile pushing the action onto the undo stack.
 
void internalPortPublished (VuoPort *port, string name="", bool merge=false)
 Publishes the provided port, meanwhile pushing the action onto the undo stack.
 
void externalPortUnpublished (VuoRendererPublishedPort *port)
 Unpublishes the provided externally visible published port, meanwhile pushing the action onto the undo stack.
 
void internalPortUnpublished (VuoPort *port)
 Unpublishes the provided internally visible published port, meanwhile pushing the action onto the undo stack.
 
void componentsRemoved (QList< QGraphicsItem * > components, string commandDescription)
 Removes the input components from the scene, meanwhile pushing the action onto the undo stack.
 
void componentsAdded (QList< QGraphicsItem * > components, VuoEditorComposition *target)
 Adds the input components to the scene, meanwhile pushing the action onto the undo stack.
 
void cutSelectedCompositionComponents ()
 Copies currenly selected nodes and any cables connecting them internally; deletes all currently selected nodes and cables.
 
void copySelectedCompositionComponents ()
 Copies currently selected nodes and any cables connecting them internally.
 
void pasteCompositionComponents (bool pasteWithOffset=true, string commandDescription="Paste")
 Pastes composition components from the clipboard.
 
void duplicateSelectedCompositionComponents ()
 Duplicates currently selected nodes and any cables connecting them internally.
 
void cleanUpCancelledDuplication ()
 Cleans up the 'Undo' stack after a cancelled duplication.
 
void conformToGlobalNodeLibraryVisibility (VuoNodeLibrary::nodeLibraryState visibility, VuoNodeLibrary *floater, bool previousFloaterDestroyed)
 Update the display mode of the node class library to conform with global settings.
 
QAction * getRaiseDocumentAction () const
 Returns the action associated with raising the current editor window to the foreground.
 
void setAsActiveWindow ()
 Raises the current editor window to the foreground and activates it.
 

Signals

void updatedOpenDocumentList ()
 Emitted after updateUI.
 
void nodeLibraryHiddenOrUnhidden (bool unhidden)
 Emitted when the Node Library's visibility should be toggled.
 
void addedRecentFile (QString filePath)
 Emitted in order to add a recently-open file to the "File > Open Recent" menu.
 
void publishedPortModified ()
 Emitted when a port within this window's composition has just been published or unpublished, or a published port renamed.
 
void windowMoved ()
 Emitted when the window has been moved.
 

Public Member Functions

 VuoEditorWindow (VuoCompiler *compiler=NULL, QString filename="", bool existingComposition=false, VuoNodeLibrary::nodeLibraryDisplayMode nodeLibraryDisplayMode=VuoNodeLibrary::displayByClass, VuoNodeLibrary::nodeLibraryState nodeLibraryState=VuoNodeLibrary::nodeLibraryHidden, VuoNodeLibrary *floater=NULL)
 Creates a new window for editing a Vuo Composition.
 
VuoRendererNodecreateNode (QString nodeClassName, string displayName, double x, double y, bool offsetFromViewportCenter=true)
 Optionally offsets input coordinates x and y from the viewport center and initiates instantiation of a node of class name nodeClassName in the associated composition.
 
VuoNodeLibrarygetOwnedNodeLibrary ()
 Returns a pointer to the node class library owned by this editor window.
 
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.
 
void releaseSurrogateNodeLibrary (bool previousFloaterDestroyed)
 Releases any surrogate node class library currently assigned to this window.
 
VuoRecentFileMenugetRecentFileMenu ()
 Returns the "File > Open Recent" menu associated with this editor window.
 
VuoEditorCompositiongetComposition ()
 Returns the composition associated with this editor window.
 

Static Public Member Functions

static VuoEditorWindowexistingWindowWithFile (const QString &filename)
 Returns an existing window editing filename, if it exists.
 
static QList< VuoEditorWindow * > getOpenEditorWindows ()
 Returns a list of currently open editor windows.
 
static VuoEditorWindowgetMostRecentActiveEditorWindow ()
 Returns the most recent active editor window.
 

Static Public Attributes

static const QString untitledComposition = QObject::tr("untitled composition")
 The display name to use for an untitled composition.
 
static VuoEditorWindowmostRecentActiveEditorWindow = NULL
 The most recently-active VuoEditorWindow.
 

Protected Member Functions

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

Friends

class TestVuoEditor
 

Constructor & Destructor Documentation

VuoEditorWindow::VuoEditorWindow ( VuoCompiler compiler = NULL,
QString  filename = "",
bool  existingComposition = false,
VuoNodeLibrary::nodeLibraryDisplayMode  nodeLibraryDisplayMode = VuoNodeLibrary::displayByClass,
VuoNodeLibrary::nodeLibraryState  nodeLibraryState = VuoNodeLibrary::nodeLibraryHidden,
VuoNodeLibrary floater = NULL 
)
explicit

Creates a new window for editing a Vuo Composition.

If filename is not an empty string, that composition is loaded into the window.

Member Function Documentation

VuoEditorWindow * VuoEditorWindow::existingWindowWithFile ( const QString &  filename)
static

Returns an existing window editing filename, if it exists.

Otherwise returns NULL.

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.

void VuoEditorWindow::portConstantSetByMenu ( QAction *  action)
slot

Allow this type to be used as a QVariant for QObject::property().

Sets the value of the input port to the menu item that was selected.

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.


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