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

Description

A docked window displaying the list of published input and/or output ports associated with the input composition.

Definition at line 28 of file VuoPublishedPortSidebar.hh.

Public Slots

void updatePortList ()
 Populates the published port list with an up-to-date list of published ports. More...
 
void highlightEligibleDropLocations (VuoRendererPort *internalFixedPort, bool eventOnlyConnection)
 Highlights eligible drop locations within the published port sidebar for the provided internalFixedPort. More...
 
void clearEligibleDropLocationHighlighting ()
 Clears the highlighting from eligible drop locations (sidebar published ports and drop box). More...
 
void externalMoveEvent ()
 Handle notifications from external sources that an event affecting this sidebar's position relative to the composition viewport has occurred. More...
 
void updateHoverHighlighting (QMouseEvent *event, qreal tolerance=0)
 Begin and/or end hover-highlighting of components within the sidebar, given the cursor position associated with the the input mouse event. More...
 
void clearHoverHighlighting ()
 End hover-highlighting of components within the sidebar. More...
 

Signals

void newPublishedPortRequested (string typeName, bool isInput)
 Emitted when a new externally visible published port is to be added. More...
 
void publishedPortNameEditorRequested (VuoRendererPublishedPort *port, bool useUndoStack)
 Emitted in order to display a published port name editor. More...
 
void publishedPortDetailsChangeRequested (VuoRendererPublishedPort *port, json_object *newDetails)
 Emitted when a published port's details have been changed in a details editor. More...
 
void inputEditorRequested (VuoRendererPort *port)
 Emitted in order to display a published port input editor. More...
 
void externalPortUnpublicationRequested (VuoRendererPublishedPort *port)
 Emitted when an externally visible published port is to be unpublished. More...
 
void portPublicationRequestedViaDropBox (VuoPort *port, bool forceEventOnlyPublication, bool useUndoStackMacro)
 Emitted when an internal port is to be published. More...
 
void portPublicationRequestedViaSidebarPort (VuoPort *internalPort, VuoPublishedPort *externalPort, bool forceEventOnlyPublication, VuoPort *portToSpecialize, string specializedTypeName, string typecastToInsert, bool useUndoStackMacro)
 Emitted when an internal port is to be published in association with a specific external published port. More...
 
void componentsRemoved (QList< QGraphicsItem * > removedComponents, string commandDescription="Remove")
 Emitted when components are to be removed. More...
 
void publishedPortPositionsUpdated ()
 Emitted when the stored positions of the published ports within the sidebars have been updated. More...
 
void publishedPortsReordered (vector< VuoPublishedPort * > publishedPorts, bool isInput)
 Emitted when published ports are reordered by the user. More...
 
void undoStackMacroBeginRequested (QString commandName)
 Emitted when the upcoming sequence of requested operations should be coalesced in an Undo stack macro. More...
 
void undoStackMacroEndRequested ()
 Emitted when the sequence of operations to be coalesced into an Undo stack macro has completed. More...
 
void closed ()
 Emitted when the published port sidebar is closed. More...
 

Public Member Functions

 VuoPublishedPortSidebar (QWidget *parent, VuoEditorComposition *composition, bool isInput, bool enableProtocolChanges=true)
 Creates a published port list sidebar. More...
 
void updateActiveProtocol ()
 Updates the display of the active protocol. More...
 
void concludePublishedCableDrag (QMouseEvent *event, VuoCable *cableInProgress, bool cableInProgressWasNew)
 Conclude a cable drag in response to a mouse release event occurring directly over the sidebar. More...
 
QMenu * getProtocolsContextMenu ()
 Returns the "Protocols" context menu associated with the sidebar. More...
 
QAction * getRemoveProtocolAction ()
 Returns the "Remove Protocol" action associated with the sidebar. More...
 
VuoRendererPublishedPortgetPublishedPortUnderCursorForEvent (QMouseEvent *event, qreal tolerance=0, bool limitPortCollisionRange=false)
 Returns the published port under the cursor at the time of mouse event event, or NULL if no published port was under the cursor. More...
 
QPoint getGlobalPosOfPublishedPort (VuoRendererPublishedPort *port)
 Returns the global position of the center of the port circle. More...
 
bool getMenuSelectionInProgress ()
 Returns a boolean indicating whether selection from a context menu is currently in progress. More...
 
string showPublishedPortNameEditor (VuoRendererPublishedPort *port)
 Displays an input editor for a published port name. More...
 
void limitAllowedPortTypes (const set< string > &allowedPortTypes)
 Limits the menu options available for data type when creating a published port. More...
 
void limitInitialTypeOptions (bool limit)
 Limits the menu options displayed in the initial type menu to core types only, with a "More…" option to expand the menu. More...
 

Static Public Member Functions

static QColor getActiveProtocolPortColor (int protocolIndex, bool isInput)
 Returns the background color to be used for a published port belonging to an active protocol, given the index of the protocol within the sidebar. More...
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event)
 Handle context menu events. More...
 
void mouseMoveEvent (QMouseEvent *event)
 Handle mouse move events. More...
 
void mousePressEvent (QMouseEvent *event)
 Handle mouse press events. More...
 
void dragEnterEvent (QDragEnterEvent *event)
 Handle drag enter events. More...
 
void dropEvent (QDropEvent *event)
 Handle drop events. More...
 
void closeEvent (QCloseEvent *event)
 Handle close events. More...
 

Constructor & Destructor Documentation

◆ VuoPublishedPortSidebar()

VuoPublishedPortSidebar::VuoPublishedPortSidebar ( QWidget *  parent,
VuoEditorComposition composition,
bool  isInput,
bool  enableProtocolChanges = true 
)
explicit

Creates a published port list sidebar.

Definition at line 31 of file VuoPublishedPortSidebar.cc.

Member Function Documentation

◆ clearEligibleDropLocationHighlighting

void VuoPublishedPortSidebar::clearEligibleDropLocationHighlighting ( )
slot

Clears the highlighting from eligible drop locations (sidebar published ports and drop box).

Definition at line 326 of file VuoPublishedPortSidebar.cc.

◆ clearHoverHighlighting

void VuoPublishedPortSidebar::clearHoverHighlighting ( )
slot

End hover-highlighting of components within the sidebar.

Components may include:

  • externally visible published ports; or
  • the published port dropbox.

Definition at line 437 of file VuoPublishedPortSidebar.cc.

◆ closed

void VuoPublishedPortSidebar::closed ( )
signal

Emitted when the published port sidebar is closed.

◆ closeEvent()

void VuoPublishedPortSidebar::closeEvent ( QCloseEvent *  event)
protected

Handle close events.

Definition at line 660 of file VuoPublishedPortSidebar.cc.

◆ componentsRemoved

void VuoPublishedPortSidebar::componentsRemoved ( QList< QGraphicsItem * >  removedComponents,
string  commandDescription = "Remove" 
)
signal

Emitted when components are to be removed.

◆ concludePublishedCableDrag()

void VuoPublishedPortSidebar::concludePublishedCableDrag ( QMouseEvent *  event,
VuoCable cableInProgress,
bool  cableInProgressWasNew 
)

Conclude a cable drag in response to a mouse release event occurring directly over the sidebar.

This may mean:

  • completing the cable connection, if the mouse release occurred within range of an eligible published port; or
  • publishing the internal port connected to the cable, if the mouse release occured within range of the published port dropbox.

Definition at line 462 of file VuoPublishedPortSidebar.cc.

◆ contextMenuEvent()

void VuoPublishedPortSidebar::contextMenuEvent ( QContextMenuEvent *  event)
protected

Handle context menu events.

Definition at line 582 of file VuoPublishedPortSidebar.cc.

◆ dragEnterEvent()

void VuoPublishedPortSidebar::dragEnterEvent ( QDragEnterEvent *  event)
protected

Handle drag enter events.

Definition at line 635 of file VuoPublishedPortSidebar.cc.

◆ dropEvent()

void VuoPublishedPortSidebar::dropEvent ( QDropEvent *  event)
protected

Handle drop events.

Definition at line 646 of file VuoPublishedPortSidebar.cc.

◆ externalMoveEvent

void VuoPublishedPortSidebar::externalMoveEvent ( )
slot

Handle notifications from external sources that an event affecting this sidebar's position relative to the composition viewport has occurred.

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

Definition at line 627 of file VuoPublishedPortSidebar.cc.

◆ externalPortUnpublicationRequested

void VuoPublishedPortSidebar::externalPortUnpublicationRequested ( VuoRendererPublishedPort port)
signal

Emitted when an externally visible published port is to be unpublished.

◆ getActiveProtocolPortColor()

QColor VuoPublishedPortSidebar::getActiveProtocolPortColor ( int  protocolIndex,
bool  isInput 
)
static

Returns the background color to be used for a published port belonging to an active protocol, given the index of the protocol within the sidebar.

Definition at line 748 of file VuoPublishedPortSidebar.cc.

◆ getGlobalPosOfPublishedPort()

QPoint VuoPublishedPortSidebar::getGlobalPosOfPublishedPort ( VuoRendererPublishedPort port)

Returns the global position of the center of the port circle.

Definition at line 718 of file VuoPublishedPortSidebar.cc.

◆ getMenuSelectionInProgress()

bool VuoPublishedPortSidebar::getMenuSelectionInProgress ( )

Returns a boolean indicating whether selection from a context menu is currently in progress.

Definition at line 726 of file VuoPublishedPortSidebar.cc.

◆ getProtocolsContextMenu()

QMenu * VuoPublishedPortSidebar::getProtocolsContextMenu ( )

Returns the "Protocols" context menu associated with the sidebar.

Definition at line 382 of file VuoPublishedPortSidebar.cc.

◆ getPublishedPortUnderCursorForEvent()

VuoRendererPublishedPort * VuoPublishedPortSidebar::getPublishedPortUnderCursorForEvent ( QMouseEvent *  event,
qreal  tolerance = 0,
bool  limitPortCollisionRange = false 
)

Returns the published port under the cursor at the time of mouse event event, or NULL if no published port was under the cursor.

Definition at line 709 of file VuoPublishedPortSidebar.cc.

◆ getRemoveProtocolAction()

QAction * VuoPublishedPortSidebar::getRemoveProtocolAction ( )

Returns the "Remove Protocol" action associated with the sidebar.

Definition at line 390 of file VuoPublishedPortSidebar.cc.

◆ highlightEligibleDropLocations

void VuoPublishedPortSidebar::highlightEligibleDropLocations ( VuoRendererPort internalFixedPort,
bool  eventOnlyConnection 
)
slot

Highlights eligible drop locations within the published port sidebar for the provided internalFixedPort.

If eventOnlyConnection is true, operates as if the ports will be connected with a cable that is event-only regardless of the data-carrying status of the ports. Eligible drop locations may include:

  • Externally visible published ports of a type that would allow them to be associated with the internalFixedPort.
  • Published port dropboxes.

Definition at line 292 of file VuoPublishedPortSidebar.cc.

◆ inputEditorRequested

void VuoPublishedPortSidebar::inputEditorRequested ( VuoRendererPort port)
signal

Emitted in order to display a published port input editor.

◆ limitAllowedPortTypes()

void VuoPublishedPortSidebar::limitAllowedPortTypes ( const set< string > &  allowedPortTypes)

Limits the menu options available for data type when creating a published port.

Must be called before the first time the menu is shown.

Definition at line 1035 of file VuoPublishedPortSidebar.cc.

◆ limitInitialTypeOptions()

void VuoPublishedPortSidebar::limitInitialTypeOptions ( bool  limit)

Limits the menu options displayed in the initial type menu to core types only, with a "More…" option to expand the menu.

Must be called before the first time the menu is shown.

Definition at line 1046 of file VuoPublishedPortSidebar.cc.

◆ mouseMoveEvent()

void VuoPublishedPortSidebar::mouseMoveEvent ( QMouseEvent *  event)
protected

Handle mouse move events.

Definition at line 605 of file VuoPublishedPortSidebar.cc.

◆ mousePressEvent()

void VuoPublishedPortSidebar::mousePressEvent ( QMouseEvent *  event)
protected

Handle mouse press events.

Definition at line 614 of file VuoPublishedPortSidebar.cc.

◆ newPublishedPortRequested

void VuoPublishedPortSidebar::newPublishedPortRequested ( string  typeName,
bool  isInput 
)
signal

Emitted when a new externally visible published port is to be added.

◆ portPublicationRequestedViaDropBox

void VuoPublishedPortSidebar::portPublicationRequestedViaDropBox ( VuoPort port,
bool  forceEventOnlyPublication,
bool  useUndoStackMacro 
)
signal

Emitted when an internal port is to be published.

◆ portPublicationRequestedViaSidebarPort

void VuoPublishedPortSidebar::portPublicationRequestedViaSidebarPort ( VuoPort internalPort,
VuoPublishedPort externalPort,
bool  forceEventOnlyPublication,
VuoPort portToSpecialize,
string  specializedTypeName,
string  typecastToInsert,
bool  useUndoStackMacro 
)
signal

Emitted when an internal port is to be published in association with a specific external published port.

◆ publishedPortDetailsChangeRequested

void VuoPublishedPortSidebar::publishedPortDetailsChangeRequested ( VuoRendererPublishedPort port,
json_object newDetails 
)
signal

Emitted when a published port's details have been changed in a details editor.

◆ publishedPortNameEditorRequested

void VuoPublishedPortSidebar::publishedPortNameEditorRequested ( VuoRendererPublishedPort port,
bool  useUndoStack 
)
signal

Emitted in order to display a published port name editor.

◆ publishedPortPositionsUpdated

void VuoPublishedPortSidebar::publishedPortPositionsUpdated ( )
signal

Emitted when the stored positions of the published ports within the sidebars have been updated.

◆ publishedPortsReordered

void VuoPublishedPortSidebar::publishedPortsReordered ( vector< VuoPublishedPort * >  publishedPorts,
bool  isInput 
)
signal

Emitted when published ports are reordered by the user.

◆ showPublishedPortNameEditor()

string VuoPublishedPortSidebar::showPublishedPortNameEditor ( VuoRendererPublishedPort port)

Displays an input editor for a published port name.

Parameters
portThe published port whose name is to be edited.

Definition at line 762 of file VuoPublishedPortSidebar.cc.

◆ undoStackMacroBeginRequested

void VuoPublishedPortSidebar::undoStackMacroBeginRequested ( QString  commandName)
signal

Emitted when the upcoming sequence of requested operations should be coalesced in an Undo stack macro.

◆ undoStackMacroEndRequested

void VuoPublishedPortSidebar::undoStackMacroEndRequested ( )
signal

Emitted when the sequence of operations to be coalesced into an Undo stack macro has completed.

◆ updateActiveProtocol()

void VuoPublishedPortSidebar::updateActiveProtocol ( )

Updates the display of the active protocol.

Definition at line 354 of file VuoPublishedPortSidebar.cc.

◆ updateHoverHighlighting

void VuoPublishedPortSidebar::updateHoverHighlighting ( QMouseEvent *  event,
qreal  tolerance = 0 
)
slot

Begin and/or end hover-highlighting of components within the sidebar, given the cursor position associated with the the input mouse event.

Components may include:

  • externally visible published ports; or
  • the published port dropbox.

Definition at line 404 of file VuoPublishedPortSidebar.cc.

◆ updatePortList

void VuoPublishedPortSidebar::updatePortList ( )
slot

Populates the published port list with an up-to-date list of published ports.

Definition at line 113 of file VuoPublishedPortSidebar.cc.


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