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

30 lines
1.1 KiB
C++

#ifndef MANAGERITEM_H
#define MANAGERITEM_H
#include <QGraphicsItem>
#include <QObject>
#include "agent.h"
#include "agentitem.h"
class ManagerItem : public QObject {
Q_OBJECT
public:
explicit ManagerItem(QList<Agent*> agents, QGraphicsScene *sceneParameter, int CM, int CN, int PM/*, int PN*/);
void drawLinks(); // отрисовать связи
void drawArrow(); // отрисовать направление связей
void fillingScene(int CM, int CN, int PM); // заполнение сцены
void clearScene(); // очистка сцены
private:
QList <Agent*> agent;
QList <AgentItem *> agentItems;
QList <QGraphicsLineItem *> links;
QList <QGraphicsPolygonItem *> arrows;
bool link; // флаг: отображать ли связи
QGraphicsScene *scene;
public slots:
void setLink(bool val);
void gameEvent(); // событие игры: перерисовка всех элементов сцены, графика
};
#endif // MANAGERITEM_H