|
- #ifndef ITEM_H
- #define ITEM_H
-
- #include <QGraphicsObject>
-
- class Item : public QGraphicsObject
- {
- Q_OBJECT
- public:
- explicit Item(const QString &type, QGraphicsItem *parent = nullptr);
-
- QRectF boundingRect() const override;
- void paint(QPainter *painter,
- const QStyleOptionGraphicsItem *option,
- QWidget *widget) override;
-
- private:
- QString type_;
- QColor color_;
- };
-
- #endif // ITEM_H
|