Vuo
0.4.3
|
Renders a node in a VuoRendererComposition
.
Public Types | |
enum | Type { node, detachedConstant, detachedDrawer, detachedTypecast } |
Specifies how this node is graphically represented. | |
Public Member Functions | |
VuoRendererNode (VuoNode *baseNode, VuoRendererSignaler *signaler) | |
Creates a renderer detail for the specified base node. | |
QRectF | boundingRect (void) const |
Returns a rectangle that completely encloses the rendered node (accounting for the thick line width). | |
void | paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) |
Draws a standard node, including rectangular frame, and input and output ports. | |
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 | setPortConnected (VuoRendererPort *rendererPort, bool isOutputPort, bool isConnected, bool hasData=false) |
Changes the portConnected value for the specified port on this node. | |
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. | |
void | setCollapsedForm (VuoRendererPort *collapsedForm) |
Sets the collapsed form associated (currently or ever in the past) with this node. | |
VuoRendererPort * | getCollapsedForm (void) const |
Returns the collapsed form associated (currently or ever in the past) with this node. | |
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. | |
QRectF | getNodeTitleBoundingRect (void) const |
Returns the bounding rect for the node title box. | |
![]() | |
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 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 | |
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) |
Handle mouse hover start events. | |
void | hoverMoveEvent (QGraphicsSceneHoverEvent *event) |
Handle mouse hover move events. | |
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. | |
![]() | |
void | drawBoundingRect (QPainter *painter) |
Draws this item's bounding rect, for debugging. | |
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
.
void VuoRendererNode::paint | ( | QPainter * | painter, |
const QStyleOptionGraphicsItem * | option, | ||
QWidget * | widget | ||
) |
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.
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::setCollapsedForm | ( | VuoRendererPort * | collapsedForm | ) |
Sets the collapsed form associated (currently or ever in the past) with this node.
This form will be re-used if the node is uncollapsed and subsequently recollapsed. Useful for, e.g., attached typecast nodes.
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.