Vuo  2.0.2
Public Slots | Signals | Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
VuoPublishedPortList Class Reference

Description

A widget displaying published input and/or output ports.

Definition at line 20 of file VuoPublishedPortList.hh.

Public Slots

void updatePublishedPortLocs ()
 Updates the stored coordinates, relative to the composition viewport, of each VuoRenderPublishedPort * port in the list. More...
 

Signals

void publishedPortModified ()
 Emitted when any published port within this list has been unpublished or renamed. More...
 
void publishedPortNameEditorRequested (VuoRendererPublishedPort *port, bool useUndoStack)
 Emitted in order to display a published port name editor. More...
 
void publishedPortDetailsEditorRequested (VuoRendererPublishedPort *port)
 Emitted in order to display a published port 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 publishedPortPositionsUpdated ()
 Emitted when the stored positions of the published ports within the sidebars have been updated. More...
 
void mouseMoveEventReceived (QMouseEvent *event, qreal hoverTolerance)
 Emitted when this published port list has received a mouseMove event. More...
 
void publishedPortsReordered (vector< VuoPublishedPort * > publishedPorts, bool isInput)
 Emitted when published ports are reordered by the user. More...
 

Public Member Functions

 VuoPublishedPortList (QWidget *parent=0)
 Creates a published port list widget. More...
 
bool getInput ()
 Returns a boolean indicating whether this published port list contains input ports (as opposed to output ports). More...
 
void setInput (bool isInput)
 Sets the boolean indicating whether this published port list contains input ports (as opposed to output ports). More...
 
void setComposition (VuoEditorComposition *composition)
 Sets the composition associated with this published port list. More...
 
QSize sizeHint () const
 
VuoRendererPublishedPortgetPublishedPortAtGlobalPos (QPoint globalPos, qreal xTolerance=0, bool limitPortCollisionRange=false)
 Returns the published port at global position globalPos, or NULL if no published port is at that position. More...
 
QPoint getGlobalPosOfPublishedPort (VuoRendererPublishedPort *port)
 Returns the global position of the center of the port circle. More...
 
void clearSelection ()
 De-selects all items in the list. More...
 
void setFillVerticalSpace (bool fill)
 Sets the boolean indicating whether this list should expand to fill all available vertical space. More...
 
void adoptDropEvent (QDropEvent *event)
 Calls the published port list's private dropEvent() function. More...
 
bool getMenuSelectionInProgress ()
 Returns a boolean indicating whether selection from a context menu is currently in progress. More...
 

Static Public Attributes

static const int publishedPortPointerIndex = Qt::UserRole
 A VuoRendererPublishedPort instance. More...
 
static const qreal componentCollisionRange = 6
 The search range used in locating ports near the cursor. More...
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event)
 Displays a context menu tailored to the published port list item associated with the event (i.e., the right-clicked item). More...
 
void mouseDoubleClickEvent (QMouseEvent *event)
 Handle mouse double-click events. More...
 
void mousePressEvent (QMouseEvent *event)
 Handle mouse press events. More...
 
void mouseMoveEvent (QMouseEvent *event)
 Handle mouse move events. More...
 
void mouseReleaseEvent (QMouseEvent *event)
 Handle mouse release events. More...
 
void dragMoveEvent (QDragMoveEvent *event)
 Handle drag move events. More...
 
void dropEvent (QDropEvent *event)
 Handle drop events. More...
 
void keyPressEvent (QKeyEvent *event)
 Handle keypress events. More...
 
void keyReleaseEvent (QKeyEvent *event)
 Handle key release events. More...
 

Constructor & Destructor Documentation

◆ VuoPublishedPortList()

VuoPublishedPortList::VuoPublishedPortList ( QWidget *  parent = 0)
explicit

Creates a published port list widget.

Definition at line 49 of file VuoPublishedPortList.cc.

Member Function Documentation

◆ adoptDropEvent()

void VuoPublishedPortList::adoptDropEvent ( QDropEvent *  event)

Calls the published port list's private dropEvent() function.

For use by the parent sidebar in forwarding drop events whose drag events originated within this port list.

Definition at line 331 of file VuoPublishedPortList.cc.

◆ clearSelection()

void VuoPublishedPortList::clearSelection ( )

De-selects all items in the list.

Definition at line 627 of file VuoPublishedPortList.cc.

◆ contextMenuEvent()

void VuoPublishedPortList::contextMenuEvent ( QContextMenuEvent *  event)
protected

Displays a context menu tailored to the published port list item associated with the event (i.e., the right-clicked item).

Definition at line 110 of file VuoPublishedPortList.cc.

◆ dragMoveEvent()

void VuoPublishedPortList::dragMoveEvent ( QDragMoveEvent *  event)
protected

Handle drag move events.

Definition at line 310 of file VuoPublishedPortList.cc.

◆ dropEvent()

void VuoPublishedPortList::dropEvent ( QDropEvent *  event)
protected

Handle drop events.

Definition at line 347 of file VuoPublishedPortList.cc.

◆ externalPortUnpublicationRequested

void VuoPublishedPortList::externalPortUnpublicationRequested ( VuoRendererPublishedPort port)
signal

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

◆ getGlobalPosOfPublishedPort()

QPoint VuoPublishedPortList::getGlobalPosOfPublishedPort ( VuoRendererPublishedPort port)

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

Definition at line 604 of file VuoPublishedPortList.cc.

◆ getInput()

bool VuoPublishedPortList::getInput ( )

Returns a boolean indicating whether this published port list contains input ports (as opposed to output ports).

Definition at line 84 of file VuoPublishedPortList.cc.

◆ getMenuSelectionInProgress()

bool VuoPublishedPortList::getMenuSelectionInProgress ( )

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

Definition at line 339 of file VuoPublishedPortList.cc.

◆ getPublishedPortAtGlobalPos()

VuoRendererPublishedPort * VuoPublishedPortList::getPublishedPortAtGlobalPos ( QPoint  globalPos,
qreal  xTolerance = 0,
bool  limitPortCollisionRange = false 
)

Returns the published port at global position globalPos, or NULL if no published port is at that position.

If limitPortCollisionRange is false, a published port is considered to be at a given position if the position is contained anywhere within the visual rectangle representing that port within the list, extended by tolerance pixels to the left and right.

If limitPortCollisionRange is true, a published port is considered to be at a given position if the position is contained within the bounding rect of the port shape only, extended by tolerance pixels to the left and right.

Definition at line 568 of file VuoPublishedPortList.cc.

◆ inputEditorRequested

void VuoPublishedPortList::inputEditorRequested ( VuoRendererPort port)
signal

Emitted in order to display a published port input editor.

◆ keyPressEvent()

void VuoPublishedPortList::keyPressEvent ( QKeyEvent *  event)
protected

Handle keypress events.

Pressing 'Return' while the published port list has keyboard focus and at least one published port within the sidebar is selected opens the "Edit Value" input editor for the selected ports.

Definition at line 383 of file VuoPublishedPortList.cc.

◆ keyReleaseEvent()

void VuoPublishedPortList::keyReleaseEvent ( QKeyEvent *  event)
protected

Handle key release events.

Definition at line 412 of file VuoPublishedPortList.cc.

◆ mouseDoubleClickEvent()

void VuoPublishedPortList::mouseDoubleClickEvent ( QMouseEvent *  event)
protected

Handle mouse double-click events.

Double-clicking on an eligible port invokes the input editor for that port.

Definition at line 210 of file VuoPublishedPortList.cc.

◆ mouseMoveEvent()

void VuoPublishedPortList::mouseMoveEvent ( QMouseEvent *  event)
protected

Handle mouse move events.

Definition at line 261 of file VuoPublishedPortList.cc.

◆ mouseMoveEventReceived

void VuoPublishedPortList::mouseMoveEventReceived ( QMouseEvent *  event,
qreal  hoverTolerance 
)
signal

Emitted when this published port list has received a mouseMove event.

◆ mousePressEvent()

void VuoPublishedPortList::mousePressEvent ( QMouseEvent *  event)
protected

Handle mouse press events.

Definition at line 228 of file VuoPublishedPortList.cc.

◆ mouseReleaseEvent()

void VuoPublishedPortList::mouseReleaseEvent ( QMouseEvent *  event)
protected

Handle mouse release events.

Definition at line 286 of file VuoPublishedPortList.cc.

◆ publishedPortDetailsEditorRequested

void VuoPublishedPortList::publishedPortDetailsEditorRequested ( VuoRendererPublishedPort port)
signal

Emitted in order to display a published port details editor.

◆ publishedPortModified

void VuoPublishedPortList::publishedPortModified ( )
signal

Emitted when any published port within this list has been unpublished or renamed.

◆ publishedPortNameEditorRequested

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

Emitted in order to display a published port name editor.

◆ publishedPortPositionsUpdated

void VuoPublishedPortList::publishedPortPositionsUpdated ( )
signal

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

◆ publishedPortsReordered

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

Emitted when published ports are reordered by the user.

◆ setComposition()

void VuoPublishedPortList::setComposition ( VuoEditorComposition composition)

Sets the composition associated with this published port list.

Definition at line 101 of file VuoPublishedPortList.cc.

◆ setFillVerticalSpace()

void VuoPublishedPortList::setFillVerticalSpace ( bool  fill)

Sets the boolean indicating whether this list should expand to fill all available vertical space.

Definition at line 640 of file VuoPublishedPortList.cc.

◆ setInput()

void VuoPublishedPortList::setInput ( bool  isInput)

Sets the boolean indicating whether this published port list contains input ports (as opposed to output ports).

Definition at line 93 of file VuoPublishedPortList.cc.

◆ sizeHint()

QSize VuoPublishedPortList::sizeHint ( ) const
Returns
The recommended size for the published port list.

Definition at line 511 of file VuoPublishedPortList.cc.

◆ updatePublishedPortLocs

void VuoPublishedPortList::updatePublishedPortLocs ( )
slot

Updates the stored coordinates, relative to the composition viewport, of each VuoRenderPublishedPort * port in the list.

Definition at line 531 of file VuoPublishedPortList.cc.

Member Data Documentation

◆ componentCollisionRange

const qreal VuoPublishedPortList::componentCollisionRange = 6
static

The search range used in locating ports near the cursor.

Definition at line 37 of file VuoPublishedPortList.hh.

◆ publishedPortPointerIndex

const int VuoPublishedPortList::publishedPortPointerIndex = Qt::UserRole
static

A VuoRendererPublishedPort instance.

Definition at line 36 of file VuoPublishedPortList.hh.


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