33 lines
655 B
C
33 lines
655 B
C
|
#ifndef UPRAVVIEW_H
|
||
|
#define UPRAVVIEW_H
|
||
|
|
||
|
#include <QGraphicsView>
|
||
|
#include <QPainter>
|
||
|
#include <QMouseEvent>
|
||
|
#include <QGraphicsRectItem>
|
||
|
#include "groundobj.h"
|
||
|
#include "airobj.h"
|
||
|
|
||
|
class upravView : public QGraphicsView
|
||
|
{
|
||
|
public:
|
||
|
upravView(QWidget *parent);
|
||
|
|
||
|
QList<groundObj*> *obj;
|
||
|
QList<airObj*> *tar;
|
||
|
|
||
|
void setLinks(QList<groundObj*> *g, QList<airObj*> *t) {obj=g;tar=t;}
|
||
|
|
||
|
private slots:
|
||
|
void msTick();
|
||
|
|
||
|
protected:
|
||
|
void drawForeground(QPainter *painter, const QRectF &rect);
|
||
|
void drawBackground(QPainter *painter, const QRectF &rect);
|
||
|
|
||
|
private:
|
||
|
virtual void mouseReleaseEvent(QMouseEvent *event);
|
||
|
};
|
||
|
|
||
|
#endif // UPRAVVIEW_H
|