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. | |
void | highlightEligibleDropLocations (VuoRendererPort *internalFixedPort, bool eventOnlyConnection) |
Highlights eligible drop locations within the published port sidebar for the provided internalFixedPort . | |
void | clearEligibleDropLocationHighlighting () |
Clears the highlighting from eligible drop locations (sidebar published ports and drop box). | |
void | externalMoveEvent () |
Handle notifications from external sources that an event affecting this sidebar's position relative to the composition viewport has occurred. | |
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 . | |
void | clearHoverHighlighting () |
End hover-highlighting of components within the sidebar. | |
Signals | |
void | newPublishedPortRequested (string typeName, bool isInput) |
Emitted when a new externally visible published port is to be added. | |
void | publishedPortNameEditorRequested (VuoRendererPublishedPort *port, bool useUndoStack) |
Emitted in order to display a published port name editor. | |
void | publishedPortDetailsChangeRequested (VuoRendererPublishedPort *port, json_object *newDetails) |
Emitted when a published port's details have been changed in a details editor. | |
void | inputEditorRequested (VuoRendererPort *port) |
Emitted in order to display a published port input editor. | |
void | externalPortUnpublicationRequested (VuoRendererPublishedPort *port) |
Emitted when an externally visible published port is to be unpublished. | |
void | portPublicationRequestedViaDropBox (VuoPort *port, bool forceEventOnlyPublication, bool useUndoStackMacro) |
Emitted when an internal port is to be published. | |
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. | |
void | componentsRemoved (QList< QGraphicsItem * > removedComponents, string commandDescription="Remove") |
Emitted when components are to be removed. | |
void | publishedPortPositionsUpdated () |
Emitted when the stored positions of the published ports within the sidebars have been updated. | |
void | publishedPortsReordered (vector< VuoPublishedPort * > publishedPorts, bool isInput) |
Emitted when published ports are reordered by the user. | |
void | undoStackMacroBeginRequested (QString commandName) |
Emitted when the upcoming sequence of requested operations should be coalesced in an Undo stack macro. | |
void | undoStackMacroEndRequested () |
Emitted when the sequence of operations to be coalesced into an Undo stack macro has completed. | |
void | closed () |
Emitted when the published port sidebar is closed. | |
Public Member Functions | |
VuoPublishedPortSidebar (QWidget *parent, VuoEditorComposition *composition, bool isInput, bool enableProtocolChanges=true) | |
Creates a published port list sidebar. | |
void | updateActiveProtocol () |
Updates the display of the active protocol. | |
void | concludePublishedCableDrag (QMouseEvent *event, VuoCable *cableInProgress, bool cableInProgressWasNew) |
Conclude a cable drag in response to a mouse release event occurring directly over the sidebar. | |
QMenu * | getProtocolsContextMenu () |
Returns the "Protocols" context menu associated with the sidebar. | |
QAction * | getRemoveProtocolAction () |
Returns the "Remove Protocol" action associated with the sidebar. | |
VuoRendererPublishedPort * | 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. | |
QPoint | getGlobalPosOfPublishedPort (VuoRendererPublishedPort *port) |
Returns the global position of the center of the port circle. | |
bool | getMenuSelectionInProgress () |
Returns a boolean indicating whether selection from a context menu is currently in progress. | |
string | showPublishedPortNameEditor (VuoRendererPublishedPort *port) |
Displays an input editor for a published port name. | |
void | limitAllowedPortTypes (const set< string > &allowedPortTypes) |
Limits the menu options available for data type when creating a published port. | |
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. | |
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. | |
Protected Member Functions | |
void | contextMenuEvent (QContextMenuEvent *event) |
Handle context menu events. | |
void | mouseMoveEvent (QMouseEvent *event) |
Handle mouse move events. | |
void | mousePressEvent (QMouseEvent *event) |
Handle mouse press events. | |
void | dragEnterEvent (QDragEnterEvent *event) |
Handle drag enter events. | |
void | dropEvent (QDropEvent *event) |
Handle drop events. | |
void | closeEvent (QCloseEvent *event) |
Handle close events. | |
|
explicit |
Creates a published port list sidebar.
Definition at line 32 of file VuoPublishedPortSidebar.cc.
|
slot |
Clears the highlighting from eligible drop locations (sidebar published ports and drop box).
Definition at line 325 of file VuoPublishedPortSidebar.cc.
|
slot |
End hover-highlighting of components within the sidebar.
Components may include:
Definition at line 436 of file VuoPublishedPortSidebar.cc.
|
signal |
Emitted when the published port sidebar is closed.
|
protected |
Handle close events.
Definition at line 659 of file VuoPublishedPortSidebar.cc.
|
signal |
Emitted when components are to be removed.
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:
Definition at line 461 of file VuoPublishedPortSidebar.cc.
|
protected |
Handle context menu events.
Definition at line 581 of file VuoPublishedPortSidebar.cc.
|
protected |
Handle drag enter events.
Definition at line 634 of file VuoPublishedPortSidebar.cc.
|
protected |
Handle drop events.
Definition at line 645 of file VuoPublishedPortSidebar.cc.
|
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 626 of file VuoPublishedPortSidebar.cc.
|
signal |
Emitted when an externally visible published port is to be unpublished.
|
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 747 of file VuoPublishedPortSidebar.cc.
QPoint VuoPublishedPortSidebar::getGlobalPosOfPublishedPort | ( | VuoRendererPublishedPort * | port | ) |
Returns the global position of the center of the port circle.
Definition at line 717 of file VuoPublishedPortSidebar.cc.
bool VuoPublishedPortSidebar::getMenuSelectionInProgress | ( | ) |
Returns a boolean indicating whether selection from a context menu is currently in progress.
Definition at line 725 of file VuoPublishedPortSidebar.cc.
QMenu * VuoPublishedPortSidebar::getProtocolsContextMenu | ( | ) |
Returns the "Protocols" context menu associated with the sidebar.
Definition at line 381 of file VuoPublishedPortSidebar.cc.
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 708 of file VuoPublishedPortSidebar.cc.
QAction * VuoPublishedPortSidebar::getRemoveProtocolAction | ( | ) |
Returns the "Remove Protocol" action associated with the sidebar.
Definition at line 389 of file VuoPublishedPortSidebar.cc.
|
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:
internalFixedPort
.Definition at line 293 of file VuoPublishedPortSidebar.cc.
|
signal |
Emitted in order to display a published port input editor.
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 1029 of file VuoPublishedPortSidebar.cc.
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 1040 of file VuoPublishedPortSidebar.cc.
|
protected |
Handle mouse move events.
Definition at line 604 of file VuoPublishedPortSidebar.cc.
|
protected |
Handle mouse press events.
Definition at line 613 of file VuoPublishedPortSidebar.cc.
|
signal |
Emitted when a new externally visible published port is to be added.
|
signal |
Emitted when an internal port is to be published.
|
signal |
Emitted when an internal port is to be published in association with a specific external published port.
|
signal |
Emitted when a published port's details have been changed in a details editor.
|
signal |
Emitted in order to display a published port name editor.
|
signal |
Emitted when the stored positions of the published ports within the sidebars have been updated.
|
signal |
Emitted when published ports are reordered by the user.
string VuoPublishedPortSidebar::showPublishedPortNameEditor | ( | VuoRendererPublishedPort * | port | ) |
Displays an input editor for a published port name.
port | The published port whose name is to be edited. |
Definition at line 761 of file VuoPublishedPortSidebar.cc.
|
signal |
Emitted when the upcoming sequence of requested operations should be coalesced in an Undo stack macro.
|
signal |
Emitted when the sequence of operations to be coalesced into an Undo stack macro has completed.
void VuoPublishedPortSidebar::updateActiveProtocol | ( | ) |
Updates the display of the active protocol.
Definition at line 353 of file VuoPublishedPortSidebar.cc.
|
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:
Definition at line 403 of file VuoPublishedPortSidebar.cc.
|
slot |
Populates the published port list with an up-to-date list of published ports.
Definition at line 114 of file VuoPublishedPortSidebar.cc.