Vuo
0.5.5
|
Renders a cable in a VuoRendererComposition
.
Public Member Functions | |
VuoRendererCable (VuoCable *baseCable) | |
Creates a renderer detail for the specified baseCable . | |
QRectF | boundingRect (void) const |
Returns a rectangle containing the rendered cable (including thick cable width). | |
QPainterPath | shape (void) const |
Returns the shape of the rendered cable, for use in collision detection, hit tests, and QGraphicsScene::items() functions. | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
Draws the cable on painter . | |
QPointF | getFloatingEndpointLoc () |
Returns the coordinates of the cable's floating endpoint, or a NULL QPointF if none. | |
void | setFloatingEndpointLoc (QPointF loc) |
Sets the coordinates of the cable's floating endpoint. | |
void | removeFromScene () |
Removes a cable from the canvas and performs other necessary cleanup. | |
void | extendedHoverEnterEvent () |
Handle mouse hover start events generated by custom code making use of an extended hover range. | |
void | extendedHoverMoveEvent () |
Handle mouse hover move events generated by custom code making use of an extended hover range. | |
void | extendedHoverLeaveEvent () |
Handle mouse hover leave events generated by custom code making use of an extended hover range. | |
bool | yankZoneIncludes (QPointF scenePos) |
Returns a boolean indicating whether the cable may be disconnected by by dragging from scenePos . | |
VuoPort * | getFloatingEndpointPreviousToPort () |
Returns the cable's previous 'To' port (if the cable has since been disconnected from that port by dragging), or NULL if not applicable. | |
void | setFloatingEndpointPreviousToPort (VuoPort *port) |
Sets the cable's previous 'To' port (if the cable has since been disconnected from that port by dragging), or NULL if not applicable. | |
void | setHovered (bool hovered) |
Sets the boolean indicating that the cable is tinted to represent mouse hovering. | |
void | updateGeometry (void) |
Schedules a redraw of this cable. | |
void | resetTimeLastEventPropagated () |
Resets the time that the last event was propagated through this cable to a value that causes the cable to be painted as if activity-rendering were disabled. | |
VuoNode::TintColor | getTintColor (void) |
Returns the tint color of the cable. | |
bool | paintingDisabled (void) const |
Returns a boolean indicating whether painting is currently disabled for this cable. | |
![]() | |
VuoBaseDetail (string description, VuoCable *base) | |
Creates a VuoCable detail class. | |
VuoCable * | getBase (void) const |
Returns the VuoCable detail class instance's base class instance. | |
void | setBase (VuoCable *base) |
Sets the VuoCable detail class instance's base class instance. | |
Static Public Attributes | |
static const qreal | cableWidth = VuoRendererFonts::thickPenWidth / 5. |
The width of a data-event cable. (Event-only cables are half this width.) | |
static const qreal | cableHighlightWidth = VuoRendererCable::cableWidth / 3. |
The width of the highlight on a data-event cable. | |
static const qreal | cableHighlightOffset = VuoRendererCable::cableHighlightWidth * 5./8. |
How far from the center of the data-event cable the highlight should be rendered. | |
static const qreal | cableYankRadius = VuoRendererFonts::thickPenWidth |
Radius from the endpoints of the cable in which yanking is permitted. | |
Additional Inherited Members | |
![]() | |
enum | activityState { notTrackingActivity = -1, activityInProgress = 0 } |
Special composition component activity states. More... | |
![]() | |
static void | setDrawBoundingRects (bool drawBoundingRects) |
Specifies whether bounding rects will be shown the next time the QGraphicsScene is rendered. | |
static void | drawRect (QPainter *painter, QRectF rect) |
Draws a rect, for debugging. | |
![]() | |
void | drawBoundingRect (QPainter *painter) |
Draws this item's bounding rect, for debugging. | |
bool | getRenderActivity () |
Retrieves the composition-wide boolean indicating whether recent activity (e.g., a node execution or event firing) by this item should be reflected in its rendering. | |
VuoRendererCable::VuoRendererCable | ( | VuoCable * | baseCable | ) |
Creates a renderer detail for the specified baseCable
.
QRectF VuoRendererCable::boundingRect | ( | void | ) | const |
Returns a rectangle containing the rendered cable (including thick cable width).
void VuoRendererCable::extendedHoverEnterEvent | ( | ) |
Handle mouse hover start events generated by custom code making use of an extended hover range.
void VuoRendererCable::extendedHoverLeaveEvent | ( | ) |
Handle mouse hover leave events generated by custom code making use of an extended hover range.
void VuoRendererCable::extendedHoverMoveEvent | ( | ) |
Handle mouse hover move events generated by custom code making use of an extended hover range.
QPointF VuoRendererCable::getFloatingEndpointLoc | ( | ) |
Returns the coordinates of the cable's floating endpoint, or a NULL QPointF if none.
VuoPort * VuoRendererCable::getFloatingEndpointPreviousToPort | ( | ) |
Returns the cable's previous 'To' port (if the cable has since been disconnected from that port by dragging), or NULL if not applicable.
VuoNode::TintColor VuoRendererCable::getTintColor | ( | void | ) |
Returns the tint color of the cable.
If the nodes on both sides of the cable have the same tint color, tint the cable with that color, too.
void VuoRendererCable::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget | ||
) |
Draws the cable on painter
.
bool VuoRendererCable::paintingDisabled | ( | void | ) | const |
Returns a boolean indicating whether painting is currently disabled for this cable.
void VuoRendererCable::removeFromScene | ( | ) |
Removes a cable from the canvas and performs other necessary cleanup.
void VuoRendererCable::resetTimeLastEventPropagated | ( | ) |
Resets the time that the last event was propagated through this cable to a value that causes the cable to be painted as if activity-rendering were disabled.
void VuoRendererCable::setFloatingEndpointLoc | ( | QPointF | loc | ) |
Sets the coordinates of the cable's floating endpoint.
void VuoRendererCable::setFloatingEndpointPreviousToPort | ( | VuoPort * | port | ) |
Sets the cable's previous 'To' port (if the cable has since been disconnected from that port by dragging), or NULL if not applicable.
void VuoRendererCable::setHovered | ( | bool | hovered | ) |
Sets the boolean indicating that the cable is tinted to represent mouse hovering.
QPainterPath VuoRendererCable::shape | ( | void | ) | const |
Returns the shape of the rendered cable, for use in collision detection, hit tests, and QGraphicsScene::items() functions.
void VuoRendererCable::updateGeometry | ( | void | ) |
Schedules a redraw of this cable.
bool VuoRendererCable::yankZoneIncludes | ( | QPointF | scenePos | ) |
Returns a boolean indicating whether the cable may be disconnected by by dragging from scenePos
.
|
static |
How far from the center of the data-event cable the highlight should be rendered.
|
static |
The width of the highlight on a data-event cable.
|
static |
The width of a data-event cable. (Event-only cables are half this width.)
|
static |
Radius from the endpoints of the cable in which yanking is permitted.