Vuo  0.4.1
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | List of all members
VuoRendererNode Class Reference

Description

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.
 
VuoRendererNodegetProxyNode (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.
 
VuoRendererPortgetCollapsedForm (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.
 
VuoRendererPortListgetInputPorts (void)
 Returns this node's input ports, as a VuoRendererPortList.
 
VuoRendererPortListgetOutputPorts (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.
 
- Public Member Functions inherited from VuoBaseDetail< VuoNode >
 VuoBaseDetail (string description, VuoNode *base)
 Creates a VuoNode detail class.
 
VuoNodegetBase (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

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.
 
- Protected Member Functions inherited from VuoRendererItem
void drawBoundingRect (QPainter *painter)
 Draws this item's bounding rect, for debugging.
 

Constructor & Destructor Documentation

VuoRendererNode::VuoRendererNode ( VuoNode baseNode,
VuoRendererSignaler signaler 
)

Creates a renderer detail for the specified base node.

Member Function Documentation

void VuoRendererNode::addInputPort ( VuoRendererPort newPort)

Adds input port port to the node.

Affects only renderer detail ports (not base or compiler ports).

QString VuoRendererNode::generateNodeClassToolTip ( VuoNodeClass nodeClass)
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:

  • Cables connected to any of the node's input ports.
  • Cables connected to the child port of any collapsed typecast attached to an input port.
  • Cables connected to any of the node's output ports.
set< VuoCable * > VuoRendererNode::getConnectedInputCables ( bool  includePublishedCables)

Returns the set of input cables connected to this node.

This includes:

  • Cables connected to any of the node's input ports.
  • Cables connected to the child port of any collapsed typecast attached to an input port.
set< VuoCable * > VuoRendererNode::getConnectedOutputCables ( bool  includePublishedCables)

Returns the set of output cables connected to this node.

This includes:

  • Cables connected to any of the node's output ports.
VuoRendererPortList * VuoRendererNode::getInputPorts ( void  )

Returns this node's input ports, as a VuoRendererPortList.

See Also
VuoNode::getInputPorts()
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.

See Also
VuoNode::getInputPorts()
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.


The documentation for this class was generated from the following files: