Init version
This commit is contained in:
29
DEC_GUI/Agressor/manageritem.h
Normal file
29
DEC_GUI/Agressor/manageritem.h
Normal file
@@ -0,0 +1,29 @@
|
||||
#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
|
||||
Reference in New Issue
Block a user