Vuo
0.4.7
|
Renders a node in a VuoRendererComposition
.
Public Types | |
enum | Type { node, detachedConstant, detachedDrawer, detachedTypecast } |
Specifies how this node is graphically represented. | |
Public Types inherited from VuoRendererItem | |
enum | activityState { notTrackingActivity = -1, activityInProgress = 0 } |
Special composition component activity states. | |
Public Member Functions | |
VuoRendererNode (VuoNode *baseNode, VuoRendererSignaler *signaler) | |
Creates a renderer detail for the specified base node. | |
virtual QRectF | boundingRect (void) const |
Returns a rectangle that completely encloses the rendered node (accounting for the thick line width). | |
virtual void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
Draws a standard node, including rectangular frame, and input and output ports. | |
vector< VuoRendererMakeListNode * > | getAttachedInputDrawers (void) const |
Returns a vector containing all of the drawers attached to any of this node's input ports. | |
qreal | getInputDrawerOffset (unsigned int portIndex) const |
Returns the horizontal offset necessary to prevent the drawer at portIndex from overlapping any drawers beneath it. | |
QRectF | getNodeFrameRect (void) const |
Determines and returns the size of the inner frame of a node having the specified attributes. | |
void | setMissingImplementation (bool missingImplementation) |
Sets whether the node is rendered as though its implementation is missing. | |
void | setProxyNode (VuoRendererNode *proxyNode) |
If set, this node will not be drawn; its drawing will be handled by proxyNode . | |
VuoRendererNode * | getProxyNode (void) const |
Returns this node's rendering proxy. | |
QVariant | itemChange (GraphicsItemChange change, const QVariant &value) |
Updates the node and its connected cables to reflect changes in state. | |
void | updateGeometry (void) |
Schedules a redraw of this node. | |
void | updateConnectedCableGeometry (void) |
Schedules a redraw of this node's connected cables. | |
set< VuoCable * > | getConnectedCables (bool includePublishedCables) |
Returns the set of cables connected to this node. | |
set< VuoCable * > | getConnectedInputCables (bool includePublishedCables) |
Returns the set of input cables connected to this node. | |
set< VuoCable * > | getConnectedOutputCables (bool includePublishedCables) |
Returns the set of output cables connected to this node. | |
VuoRendererPortList * | getInputPorts (void) |
Returns this node's input ports, as a VuoRendererPortList . | |
VuoRendererPortList * | getOutputPorts (void) |
Returns this node's output ports, as a VuoRendererPortList . | |
void | replaceInputPort (VuoRendererPort *oldPort, VuoRendererPort *newPort) |
Replaces input port old with new . | |
void | addInputPort (VuoRendererPort *newPort) |
Adds input port port to the node. | |
void | setDisplayName (string displayName) |
Sets the displayName for this node; re-lays-out its ports to accommodate the new name. | |
QRectF | getNodeTitleBoundingRect (void) const |
Returns the bounding rect for the node title box. | |
void | resetTimeLastExecuted () |
Resets the time last executed to a value that causes the node to be painted as if activity-rendering were disabled. | |
void | setExecutionEnded () |
Updates the node's execution state to indicate that it has just finished executing. | |
void | setExecutionBegun () |
Updates the node's execution state to indicate that it is currently executing. | |
qint64 | getTimeLastExecutionEnded () |
Returns the time, in ms since epoch, that this node's most recent node execution ended, or if applicable, a special VuoRendererItem::activityState. | |
void | layoutConnectedInputDrawers (void) |
Calculates and sets the positions of the node's connected input drawers relative to the node. | |
void | layoutConnectedInputDrawersAtAndAbovePort (VuoRendererPort *port) |
Calculates and sets the positions of any input drawers connected to this node's ports beginning with the provided port and iterating through the ports rendered above (i.e., with indices lower than) that port. | |
Public Member Functions inherited from VuoBaseDetail< VuoNode > | |
VuoBaseDetail (string description, VuoNode *base) | |
Creates a VuoNode detail class. | |
VuoNode * | getBase (void) const |
Returns the VuoNode detail class instance's base class instance. | |
void | setBase (VuoNode *base) |
Sets the VuoNode detail class instance's base class instance. | |
Static Public Member Functions | |
static QString | generateNodeClassToolTip (VuoNodeClass *nodeClass) |
Generates a descriptive tooltip containing information about the input nodeClass . | |
Static Public Member Functions inherited from VuoRendererItem | |
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. | |
Static Public Attributes | |
static const qreal | nodeTitleHeight = VuoRendererFonts::thickPenWidth |
The height of the node's title. | |
Protected Member Functions | |
virtual void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
Handle mouse hover start events. | |
virtual void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) |
Handle mouse hover move events. | |
virtual void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) |
Handle mouse hover leave events. | |
void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) |
Handle mouse double-click events. | |
void | keyPressEvent (QKeyEvent *event) |
Handle key-press events. | |
virtual void | layoutPorts (void) |
Calculates and sets the positions of the node's child ports relative to the node. | |
Protected Member Functions inherited from VuoRendererItem | |
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. | |
Protected Attributes | |
VuoRendererSignaler * | signaler |
The object that sends signals on behalf of this renderer node. | |
VuoRendererPortList * | inputPorts |
The list of input renderer ports belonging to this renderer node. | |
VuoRendererPortList * | outputPorts |
The list of output renderer ports belonging to this renderer node. | |
qint64 | timeLastExecutionEnded |
The time at which this node's running counterpart last completed an execution. | |
QString | nodeClassToolTip |
A descriptive tooltip containing information about this node's class. | |
VuoRendererNode::VuoRendererNode | ( | VuoNode * | baseNode, |
VuoRendererSignaler * | signaler | ||
) |
Creates a renderer detail for the specified base node.
void VuoRendererNode::addInputPort | ( | VuoRendererPort * | newPort | ) |
Adds input port port
to the node.
Affects only renderer detail ports (not base or compiler ports).
|
static |
Generates a descriptive tooltip containing information about the input nodeClass
.
set< VuoCable * > VuoRendererNode::getConnectedCables | ( | bool | includePublishedCables | ) |
Returns the set of cables connected to this node.
This includes:
set< VuoCable * > VuoRendererNode::getConnectedInputCables | ( | bool | includePublishedCables | ) |
Returns the set of input cables connected to this node.
This includes:
set< VuoCable * > VuoRendererNode::getConnectedOutputCables | ( | bool | includePublishedCables | ) |
Returns the set of output cables connected to this node.
This includes:
VuoRendererPortList * VuoRendererNode::getInputPorts | ( | void | ) |
Returns this node's input ports, as a VuoRendererPortList
.
QRectF VuoRendererNode::getNodeFrameRect | ( | void | ) | const |
Determines and returns the size of the inner frame of a node having the specified attributes.
The "inner frame" is the light grey rect in the middle of the node. It doesn't include the node's header or footer.
VuoRendererPortList * VuoRendererNode::getOutputPorts | ( | void | ) |
Returns this node's output ports, as a VuoRendererPortList
.
|
virtual |
Draws a standard node, including rectangular frame, and input and output ports.
The node is drawn with (0,0) as the top left inner margin, so you should use a QPainter transform if you want to position the node.
Reimplemented in VuoRendererMakeListNode.
void VuoRendererNode::replaceInputPort | ( | VuoRendererPort * | oldPort, |
VuoRendererPort * | newPort | ||
) |
Replaces input port old
with new
.
Affects only renderer detail ports (not base or compiler ports).
void VuoRendererNode::setProxyNode | ( | VuoRendererNode * | proxyNode | ) |
If set, this node will not be drawn; its drawing will be handled by proxyNode
.
Useful for, e.g., attached typecast nodes.