Vuo  0.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | List of all members
VuoRendererTypecastPort Class Reference

Description

Renders a typecast port.

Public Member Functions

 VuoRendererTypecastPort (VuoRendererNode *uncollapsedTypecastNode, VuoPort *basePort, VuoRendererSignaler *signaler, bool isReceptorPort, QString sourceType, QString destinationType, VuoRendererPort *childPort)
 
QRectF boundingRect (void) const
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 
VuoRendererNodegetUncollapsedTypecastNode (void) const
 Returns the uncollapsed typecast node from which this typecast port was derived.
 
VuoRendererPortgetChildPort (void) const
 
VuoRendererPortgetReplacedPort (void) const
 Returns the target port that was replaced by this collapsed typecast.
 
void setReplacedPort (VuoRendererPort *port)
 Sets target port that was replaced by this collapsed typecast.
 
qreal getChildPortXOffset (void) const
 
QPainterPath getPortPath (qreal inset) const
 
- Public Member Functions inherited from VuoRendererPort
 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.
 
VuoTypegetDataType (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.
 
VuoRendererNodegetParentNode (void) const
 Returns the node to which this port belongs.
 
VuoRendererPortgetTypecastParentPort ()
 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.
 
- Public Member Functions inherited from VuoBaseDetail< VuoPort >
 VuoBaseDetail (string id, VuoPort *base)
 Creates a VuoNode detail class.
 
VuoPortgetBase (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.
 

Additional Inherited Members

- Static Public Member Functions inherited from VuoRendererPort
static QPointF getPlugOffset (void)
 Returns the offset creating a "plug" teminating a cable going into this port.
 
- Static Public Attributes inherited from VuoRendererPort
static const qreal portSpacing = VuoRendererNode::thickPenWidth*3.0/4.0
 Vertical distance, in pixels at 1:1 zoom, between the center points of two ports.
 
static QFont nodePortTitleFont
 Font used for rendering port titles and constant values.
 
- Protected Member Functions inherited from VuoRendererPort
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)
 
- Protected Attributes inherited from VuoRendererPort
bool isReceptorPort
 

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