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... | |
VuoComment * | getBase (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 | |
VuoRendererSignaler * | signaler |
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... | |
VuoRendererComment::VuoRendererComment | ( | VuoComment * | baseComment, |
VuoRendererSignaler * | signaler | ||
) |
Creates a renderer detail for the specified base comment.
Definition at line 24 of file VuoRendererComment.cc.
QRectF VuoRendererComment::boundingRect | ( | void | ) | const |
Returns a rectangle that completely encloses the rendered comment.
Definition at line 108 of file VuoRendererComment.cc.
|
protected |
Handle mouse hover start events.
Definition at line 374 of file VuoRendererComment.cc.
|
protected |
Handle mouse hover leave events.
Definition at line 396 of file VuoRendererComment.cc.
|
protected |
Handle mouse hover move events.
Definition at line 382 of file VuoRendererComment.cc.
QVariant VuoRendererComment::itemChange | ( | GraphicsItemChange | change, |
const QVariant & | value | ||
) |
Updates the comment to reflect changes in state.
Definition at line 231 of file VuoRendererComment.cc.
|
protected |
Handle mouse double-click events.
Definition at line 409 of file VuoRendererComment.cc.
|
protected |
Handle mouse move events.
< The minimum width and height of a comment.
Definition at line 436 of file VuoRendererComment.cc.
|
protected |
Handle mouse press events.
Definition at line 420 of file VuoRendererComment.cc.
|
protected |
Handle mouse release events.
Definition at line 498 of file VuoRendererComment.cc.
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.
|
protected |
Filter events on watched graphics items.
Definition at line 291 of file VuoRendererComment.cc.
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.
void VuoRendererComment::setContent | ( | string | content | ) |
Sets the text
content for this comment.
Definition at line 520 of file VuoRendererComment.cc.
QPainterPath VuoRendererComment::shape | ( | void | ) | const |
Definition at line 122 of file VuoRendererComment.cc.
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.
void VuoRendererComment::updateGeometry | ( | void | ) |
Schedules a redraw of this comment.
Definition at line 512 of file VuoRendererComment.cc.
|
protected |
The object that sends signals on behalf of this renderer comment.
Definition at line 49 of file VuoRendererComment.hh.