#ifndef AGENTITEM_H #define AGENTITEM_H #include #include "agent.h" class AgentItem : public QGraphicsItem { public: explicit AgentItem(Agent *agent, QColor col); QRectF boundingRect() const; // ограничивающий прямоугольник void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget); // отрисовка void agentEvent(); // событие: обновление текущих координат private: Agent *agent; QColor color; }; #endif // AGENTITEM_H