You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 rivejä
435 B

  1. #ifndef ITEM_H
  2. #define ITEM_H
  3. #include <QGraphicsObject>
  4. class Item : public QGraphicsObject
  5. {
  6. Q_OBJECT
  7. public:
  8. explicit Item(const QString &type, QGraphicsItem *parent = nullptr);
  9. QRectF boundingRect() const override;
  10. void paint(QPainter *painter,
  11. const QStyleOptionGraphicsItem *option,
  12. QWidget *widget) override;
  13. private:
  14. QString type_;
  15. QColor color_;
  16. };
  17. #endif // ITEM_H