|
KanoopGuiQt 1.3.0
Qt GUI utility library
|
|
QGraphicsRectItem with an application-defined type integer and center-point helpers. More...
#include <rectanglegraphicsitem.h>
Inheritance diagram for RectangleGraphicsItem:
Collaboration diagram for RectangleGraphicsItem:Public Member Functions | |
| RectangleGraphicsItem (int type, QGraphicsItem *parent=nullptr) | |
| Construct with a type integer and optional parent item. | |
| RectangleGraphicsItem (const Rectangle &rect, int type, QGraphicsItem *parent=nullptr) | |
| Construct from a Rectangle geometry object. | |
| virtual int | type () const override |
| Return the application-defined type integer. | |
| Point | centerPoint () const |
| Return the center of the item's bounding rect in item coordinates. | |
| Point | sceneCenterPoint () const |
| Return the center of the item's bounding rect in scene coordinates. | |
Protected Member Functions | |
| virtual QVariant | itemChange (GraphicsItemChange change, const QVariant &value) override |
| Handle graphics item change notifications. | |
QGraphicsRectItem with an application-defined type integer and center-point helpers.
RectangleGraphicsItem stores a type integer (returned by type()) that allows qgraphicsitem_cast<> and scene item-type filtering to work with custom types. It also provides centerPoint() and sceneCenterPoint() convenience accessors.
Definition at line 17 of file rectanglegraphicsitem.h.
|
explicit |
Construct with a type integer and optional parent item.
| type | Application-defined graphics item type |
| parent | Optional parent QGraphicsItem |
|
explicit |
Construct from a Rectangle geometry object.
| rect | Rectangle geometry to display |
| type | Application-defined graphics item type |
| parent | Optional parent QGraphicsItem |
| Point RectangleGraphicsItem::centerPoint | ( | ) | const |
Return the center of the item's bounding rect in item coordinates.
| Point RectangleGraphicsItem::sceneCenterPoint | ( | ) | const |
Return the center of the item's bounding rect in scene coordinates.
|
inlineoverridevirtual |
Return the application-defined type integer.
Definition at line 39 of file rectanglegraphicsitem.h.