1#ifndef RECTANGLEGRAPHICSITEM_H
2#define RECTANGLEGRAPHICSITEM_H
3#include <QGraphicsRectItem>
5#include <Kanoop/gui/libkanoopgui.h>
6#include <Kanoop/geometry/point.h>
39 virtual int type()
const override {
return _type; }
55 virtual QVariant
itemChange(GraphicsItemChange change,
const QVariant& value)
override;
QGraphicsRectItem with an application-defined type integer and center-point helpers.
RectangleGraphicsItem(const Rectangle &rect, int type, QGraphicsItem *parent=nullptr)
Construct from a Rectangle geometry object.
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.
virtual QVariant itemChange(GraphicsItemChange change, const QVariant &value) override
Handle graphics item change notifications.
RectangleGraphicsItem(int type, QGraphicsItem *parent=nullptr)
Construct with a type integer and optional parent item.
virtual int type() const override
Return the application-defined type integer.