Files
DEC/DEC_GUI/Agressor/agentitem.h
2024-10-03 18:43:04 +07:00

22 lines
598 B
C++

#ifndef AGENTITEM_H
#define AGENTITEM_H
#include <QGraphicsItem>
#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