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 |
VuoRendererPublishedPort * | 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. 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... | |
|
explicit |
Creates a published port list widget.
Definition at line 49 of file VuoPublishedPortList.cc.
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.
void VuoPublishedPortList::clearSelection | ( | ) |
De-selects all items in the list.
Definition at line 627 of file VuoPublishedPortList.cc.
|
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.
|
protected |
Handle drag move events.
Definition at line 310 of file VuoPublishedPortList.cc.
|
protected |
Handle drop events.
Definition at line 347 of file VuoPublishedPortList.cc.
|
signal |
Emitted when an externally visible published port is to be unpublished.
QPoint VuoPublishedPortList::getGlobalPosOfPublishedPort | ( | VuoRendererPublishedPort * | port | ) |
Returns the global position of the center of the port circle.
Definition at line 604 of file VuoPublishedPortList.cc.
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.
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.
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.
|
signal |
Emitted in order to display a published port input editor.
|
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.
|
protected |
Handle key release events.
Definition at line 412 of file VuoPublishedPortList.cc.
|
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.
|
protected |
Handle mouse move events.
Definition at line 261 of file VuoPublishedPortList.cc.
|
signal |
Emitted when this published port list has received a mouseMove event.
|
protected |
Handle mouse press events.
Definition at line 228 of file VuoPublishedPortList.cc.
|
protected |
Handle mouse release events.
Definition at line 286 of file VuoPublishedPortList.cc.
|
signal |
Emitted in order to display a published port details editor.
|
signal |
Emitted when any published port within this list has been unpublished or renamed.
|
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.
void VuoPublishedPortList::setComposition | ( | VuoEditorComposition * | composition | ) |
Sets the composition associated with this published port list.
Definition at line 101 of file VuoPublishedPortList.cc.
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.
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.
QSize VuoPublishedPortList::sizeHint | ( | ) | const |
Definition at line 511 of file VuoPublishedPortList.cc.
|
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.
|
static |
The search range used in locating ports near the cursor.
Definition at line 37 of file VuoPublishedPortList.hh.
|
static |
A VuoRendererPublishedPort
instance.
Definition at line 36 of file VuoPublishedPortList.hh.