Vuo  2.0.0
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
VuoRendererComment Class Reference

Description

Renders a comment in a VuoRendererComposition.

Definition at line 23 of file VuoRendererComment.hh.

Public Member Functions

 VuoRendererComment (VuoComment *baseComment, VuoRendererSignaler *signaler)
 Creates a renderer detail for the specified base comment. More...
 
QRectF boundingRect (void) const
 Returns a rectangle that completely encloses the rendered comment. More...
 
QPainterPath shape (void) const
 
void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget)
 Draws a standard comment, including a rectangular frame with rounded corners. More...
 
QVariant itemChange (GraphicsItemChange change, const QVariant &value)
 Updates the comment to reflect changes in state. More...
 
void updateGeometry (void)
 Schedules a redraw of this comment. More...
 
void updateColor (void)
 Regenerates the text and background to use the currently active light/dark style. More...
 
void setContent (string content)
 Sets the text content for this comment. More...
 
void setBodySelectable (bool bodySelectable)
 Sets the boolean indicating whether the comment should respond to mouse events such as rubberband drag selection that occur within the main body of the comment, outside of the comment's title handle. More...
 
- Public Member Functions inherited from VuoRendererItem
void setSelectable (bool selectable)
 Enables or disables selection for the item. More...
 
- Public Member Functions inherited from VuoBaseDetail< VuoComment >
 VuoBaseDetail (string description, VuoComment *base)
 Creates a detail class. More...
 
VuoCommentgetBase (void) const
 Returns the detail class instance's base class instance. More...
 
void setBase (VuoComment *base)
 Sets the detail class instance's base class instance. More...
 

Protected Member Functions

bool sceneEventFilter (QGraphicsItem *watched, QEvent *event) VuoWarnUnusedResult
 Filter events on watched graphics items. More...
 
void hoverEnterEvent (QGraphicsSceneHoverEvent *event)
 Handle mouse hover start events. More...
 
void hoverMoveEvent (QGraphicsSceneHoverEvent *event)
 Handle mouse hover move events. More...
 
void hoverLeaveEvent (QGraphicsSceneHoverEvent *event)
 Handle mouse hover leave events. More...
 
void mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event)
 Handle mouse double-click events. More...
 
void mousePressEvent (QGraphicsSceneMouseEvent *event)
 Handle mouse press events. More...
 
void mouseMoveEvent (QGraphicsSceneMouseEvent *event)
 Handle mouse move events. More...
 
void mouseReleaseEvent (QGraphicsSceneMouseEvent *event)
 Handle mouse release events. More...
 
- Protected Member Functions inherited from VuoRendererItem
void drawBoundingRect (QPainter *painter)
 Draws this item's bounding rect, for debugging. More...
 
bool getRenderActivity () const
 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. More...
 
bool getRenderHiddenCables () const
 Retrieves the composition-wide boolean indicating whether hidden ("wireless") cables should be rendered as if they were not hidden. More...
 
QGraphicsItem::CacheMode getCurrentDefaultCacheMode () const
 Returns the current default cache mode for components of this composition. More...
 

Protected Attributes

VuoRendererSignalersignaler
 The object that sends signals on behalf of this renderer comment. More...
 

Additional Inherited Members

- Public Types inherited from VuoRendererItem
enum  activityState { notTrackingActivity = -1, activityInProgress = 0 }
 Special composition component activity states. More...
 
enum  zValues {
  triggerAnimationZValue = 1, nodeZValue = 0, portZValue = -1, attachmentZValue = -2,
  cableZValue = -3, errorMarkZValue = -4, commentZValue = -5
}
 Stacking order for canvas elements. More...
 
- Static Public Member Functions inherited from VuoRendererItem
static void setSnapToGrid (bool snap)
 Specifies whether graphics items should be snapped to a grid. More...
 
static void setDrawBoundingRects (bool drawBoundingRects)
 Specifies whether bounding rects will be shown the next time the QGraphicsScene is rendered. More...
 
static bool shouldDrawBoundingRects (void)
 Returns whether bounding rects are currently being shown. More...
 
static void drawRect (QPainter *painter, QRectF rect)
 Draws a rect, for debugging. More...
 
static bool getSnapToGrid ()
 Retrieves the boolean indicating whether graphics items should be snapped to a grid. More...
 
- Static Protected Member Functions inherited from VuoRendererItem
static void addRoundedCorner (QPainterPath &path, bool drawLine, QPointF sharpCornerPoint, qreal radius, bool isTop, bool isLeft)
 Appends a line (or move) and curve to path, to produce a clockwise-wound rounded corner near sharpCornerPoint. More...
 

Constructor & Destructor Documentation

◆ VuoRendererComment()

VuoRendererComment::VuoRendererComment ( VuoComment baseComment,
VuoRendererSignaler signaler 
)

Creates a renderer detail for the specified base comment.

Definition at line 24 of file VuoRendererComment.cc.

Member Function Documentation

◆ boundingRect()

QRectF VuoRendererComment::boundingRect ( void  ) const

Returns a rectangle that completely encloses the rendered comment.

Definition at line 108 of file VuoRendererComment.cc.

◆ hoverEnterEvent()

void VuoRendererComment::hoverEnterEvent ( QGraphicsSceneHoverEvent *  event)
protected

Handle mouse hover start events.

Definition at line 374 of file VuoRendererComment.cc.

◆ hoverLeaveEvent()

void VuoRendererComment::hoverLeaveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Handle mouse hover leave events.

Definition at line 396 of file VuoRendererComment.cc.

◆ hoverMoveEvent()

void VuoRendererComment::hoverMoveEvent ( QGraphicsSceneHoverEvent *  event)
protected

Handle mouse hover move events.

Definition at line 382 of file VuoRendererComment.cc.

◆ itemChange()

QVariant VuoRendererComment::itemChange ( GraphicsItemChange  change,
const QVariant &  value 
)

Updates the comment to reflect changes in state.

Definition at line 231 of file VuoRendererComment.cc.

◆ mouseDoubleClickEvent()

void VuoRendererComment::mouseDoubleClickEvent ( QGraphicsSceneMouseEvent *  event)
protected

Handle mouse double-click events.

Definition at line 409 of file VuoRendererComment.cc.

◆ mouseMoveEvent()

void VuoRendererComment::mouseMoveEvent ( QGraphicsSceneMouseEvent *  event)
protected

Handle mouse move events.

< The minimum width and height of a comment.

Definition at line 436 of file VuoRendererComment.cc.

◆ mousePressEvent()

void VuoRendererComment::mousePressEvent ( QGraphicsSceneMouseEvent *  event)
protected

Handle mouse press events.

Definition at line 420 of file VuoRendererComment.cc.

◆ mouseReleaseEvent()

void VuoRendererComment::mouseReleaseEvent ( QGraphicsSceneMouseEvent *  event)
protected

Handle mouse release events.

Definition at line 498 of file VuoRendererComment.cc.

◆ paint()

void VuoRendererComment::paint ( QPainter *  painter,
const QStyleOptionGraphicsItem *  option,
QWidget *  widget 
)

Draws a standard comment, including a rectangular frame with rounded corners.

Definition at line 145 of file VuoRendererComment.cc.

◆ sceneEventFilter()

bool VuoRendererComment::sceneEventFilter ( QGraphicsItem *  watched,
QEvent *  event 
)
protected

Filter events on watched graphics items.

Definition at line 291 of file VuoRendererComment.cc.

◆ setBodySelectable()

void VuoRendererComment::setBodySelectable ( bool  bodySelectable)

Sets the boolean indicating whether the comment should respond to mouse events such as rubberband drag selection that occur within the main body of the comment, outside of the comment's title handle.

Definition at line 549 of file VuoRendererComment.cc.

◆ setContent()

void VuoRendererComment::setContent ( string  content)

Sets the text content for this comment.

Definition at line 520 of file VuoRendererComment.cc.

◆ shape()

QPainterPath VuoRendererComment::shape ( void  ) const
  • * Returns the shape of the rendered comment, for use in collision detection,
  • * hit tests, and QGraphicsScene::items() functions.

Definition at line 122 of file VuoRendererComment.cc.

◆ updateColor()

void VuoRendererComment::updateColor ( void  )

Regenerates the text and background to use the currently active light/dark style.

Definition at line 636 of file VuoRendererComment.cc.

◆ updateGeometry()

void VuoRendererComment::updateGeometry ( void  )

Schedules a redraw of this comment.

Definition at line 512 of file VuoRendererComment.cc.

Member Data Documentation

◆ signaler

VuoRendererSignaler* VuoRendererComment::signaler
protected

The object that sends signals on behalf of this renderer comment.

Definition at line 49 of file VuoRendererComment.hh.


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