A graphical text object that wraps a Text.
More...
#include <gtext.h>
|
| Text * | get () override |
| | Return the object that is being wrapped by this class. More...
|
| |
| void | reloadFromModel () override |
| | Update the graphical representation to match the object from the model. More...
|
| |
| void | applyToModel () override |
| | Apply changes to the underlying model object. More...
|
| |
| | GObject (Object *obj) |
| | Construct a wrapper around obj. More...
|
| |
| virtual | ~GObject () |
| |
|
bool | isHovered () const |
| | Return whether the mouse is over this object.
|
| |
| virtual void | setCosmetic (bool cosmetic) |
| | Make the object's pen independent of any transformations. More...
|
| |
| virtual void | showHandles (bool show=true) |
| | Display/hide the handles for this item. More...
|
| |
| virtual void | handleChanged (GObjectHandle *handle) |
| | Called when a handle's position has changed. More...
|
| |
|
void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
| | Set hovered=true so that it can be used by paint.
|
| |
|
void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
| | Disable the bool hovered so that it can be used by paint.
|
| |
|
QRectF | boundingRect () const override |
| | Default implementation that returns childrenBoundingRect().
|
| |
| void | paint (QPainter *, const QStyleOptionGraphicsItem *, QWidget *) override |
| |
|
GCompositeObject * | parentItem () const |
| | Return the parent item cast to a GObject*.
|
| |
|
| void | mouseDoubleClickEvent (QGraphicsSceneMouseEvent *event) override |
| |
| void | hoverEnterEvent (QGraphicsSceneHoverEvent *event) override |
| |
| void | hoverLeaveEvent (QGraphicsSceneHoverEvent *event) override |
| |
| void | mouseMoveEvent (QGraphicsSceneMouseEvent *event) override |
| |
| QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
| | Process item changes that should behave uniformly across different object types. More...
|
| |
A graphical text object that wraps a Text.
The GText has a child item of type GDisplayText that displays the text to the user and handles text editing.
GText is responsible for:
- synchronization with the model
- manipulation of
GDisplayText flags to enter/leave edit mode
- any interaction that doesn't involve text editing, e.g object selection, displaying context menus, etc.
◆ applyToModel()
| void GText::applyToModel |
( |
| ) |
|
|
overridevirtual |
Apply changes to the underlying model object.
- Note
- The base implementation does nothing and should be implemented in derived classes.
Reimplemented from GObject.
◆ get()
Return the object that is being wrapped by this class.
- Note
- Derived classes should change the return type of this method to match the type of the object that is wrapped by them.
Reimplemented from GObject.
◆ hoverEnterEvent()
| void GText::hoverEnterEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
overrideprotected |
◆ hoverLeaveEvent()
| void GText::hoverLeaveEvent |
( |
QGraphicsSceneHoverEvent * |
event | ) |
|
|
overrideprotected |
◆ mouseDoubleClickEvent()
| void GText::mouseDoubleClickEvent |
( |
QGraphicsSceneMouseEvent * |
event | ) |
|
|
overrideprotected |
On double left click: enable editing, change to IBeam cursor and hide cursor guides.
◆ reloadFromModel()
| void GText::reloadFromModel |
( |
| ) |
|
|
overridevirtual |
Update the graphical representation to match the object from the model.
- Note
- The base implementation does nothing and should be implemented in derived classes.
Reimplemented from GObject.
The documentation for this class was generated from the following file: