Renders a node's port in a QGraphicsScene
.
Typically automatically created by a VuoRendererNode
instance.
|
| VuoRendererPort (VuoPort *basePort, VuoRendererSignaler *signaler, bool isOutput, bool isReceptorPort=false, bool isFunctionPort=false) |
| Creates a renderer detail for the specified base port.
|
|
QRectF | boundingRect (void) const |
| Returns the bounding rectangle of this port (and its optional name and plug).
|
|
QPainterPath | shape (void) const |
| Returns the shape of the rendered port, for use in collision detection, hit tests, and QGraphicsScene::items() functions.
|
|
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
| Draws an input or output port (both standard ports and receptor/function ports).
|
|
void | setEligibleForConnection (bool eligible) |
| Sets the boolean indicating whether this port is eligible for connection to the cable currently being dragged between ports.
|
|
bool | canConnectTo (VuoRendererPort *toPort) |
| Returns a boolean indicating whether there may be a cable attached from this port to toPort , taking into account the respective port types (input vs.
|
|
bool | isConnectedTo (VuoRendererPort *toPort) |
| Returns a boolean indicating whether there is a cable connecting this port to toPort .
|
|
bool | getInput (void) const |
| Returns a boolean indicating whether this port is an input port.
|
|
bool | getOutput (void) const |
| Returns a boolean indicating whether this port is an output port.
|
|
bool | getFunctionPort (void) const |
| Returns a boolean indicating whether this port is a function port.
|
|
bool | hasConnectedCable (void) const |
| Returns a boolean indicating whether this port has any attached cables.
|
|
bool | hasConnectedDataCable (void) const |
| Returns a boolean indicating whether this port has any attached data+event cables.
|
|
bool | grabRangeIncludes (QPointF scenePos) |
| Returns a boolean indicating whether a cable connected to this port as its 'To' port would be permitted to be disconnected by dragging from scenePos , taking into account the distance between scenePos and this port.
|
|
void | updateGeometry () |
| Schedules a redraw of this port.
|
|
QPainterPath | getPortPath (qreal inset, qreal drawerOffset) const |
| Returns a closed path representing the port's circle, constant flag, or attached drawer.
|
|
QRectF | getPortRect (void) const |
| Returns a rectangle encompassing the port's circle.
|
|
VuoType * | getDataType (void) const |
| Returns the data type associated with this port, or NULL if there is no associated data type.
|
|
bool | isConstant (void) const |
| Returns true if this port has a constant data value.
|
|
string | getConstantAsString (void) const |
| Returns the string representation of this port's constant data value, or an empty string if it has none.
|
|
VuoRendererNode * | getParentNode (void) const |
| Returns the node to which this port belongs.
|
|
VuoRendererPort * | getTypecastParentPort () |
| Returns this node's typecast parent port, or NULL if it has none.
|
|
void | setTypecastParentPort (VuoRendererPort *typecastParentPort) |
| Sets this node's typecast parent port.
|
|
bool | supportsDisconnectionByDragging (void) |
| Returns a boolean indicating whether this port supports cable disconnection by dragging from the port.
|
|
| VuoBaseDetail (string id, VuoPort *base) |
| Creates a VuoNode detail class.
|
|
VuoPort * | getBase (void) const |
| Returns the VuoNode detail class instance's base class instance.
|
|
void | setBase (VuoPort *base) |
| Sets the VuoNode detail class instance's base class instance.
|
|
|
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
| Handle mouse double-click events.
|
|
void | keyPressEvent (QKeyEvent *event) |
| Handle key-press events.
|
|
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
| Handle mouse hover start events.
|
|
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
| Handle mouse hover leave events.
|
|
QRectF | getNameRect () const |
|
QPainterPath | getPortConstantPath (QRectF innerPortRect, QString text) const |
|
QRectF | getPortConstantTextRect (QString text, bool isConnected, bool isTypecast) const |
| Returns the drawer attached to this port, or NULL if none.
|
|
QPainterPath | getFunctionPortGlyph (void) const |
| Returns a path representing the glyph for function ports.
|
|
void | paintPortName (QPainter *painter) |
|
void | drawBoundingRect (QPainter *painter) |
| Draws this item's bounding rect, for debugging.
|
|