71 lines
1.4 KiB
C
71 lines
1.4 KiB
C
|
#ifndef GROUNDOBJ_H
|
|||
|
#define GROUNDOBJ_H
|
|||
|
|
|||
|
#include <QGraphicsItem>
|
|||
|
#include <QGraphicsColorizeEffect>
|
|||
|
#include <QGraphicsSceneMouseEvent>
|
|||
|
#include <QPainter>
|
|||
|
#include <QPixmap>
|
|||
|
#include <QBitmap>
|
|||
|
#include <QImage>
|
|||
|
#include <cmath>
|
|||
|
|
|||
|
class groundObj : public QGraphicsItem
|
|||
|
{
|
|||
|
void initRockets(int _allR, int _activeR);
|
|||
|
public:
|
|||
|
groundObj();
|
|||
|
|
|||
|
QRectF boundingRect() const;
|
|||
|
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
|
|||
|
|
|||
|
qreal x, y;
|
|||
|
int uid;
|
|||
|
|
|||
|
int type;
|
|||
|
int n_Ab;
|
|||
|
// QString name;
|
|||
|
bool exist;
|
|||
|
bool boegotov;
|
|||
|
|
|||
|
int allR, activeR;
|
|||
|
|
|||
|
bool priznakSektor;
|
|||
|
qreal angle1, angle2;
|
|||
|
int alt_n;
|
|||
|
qreal hMin, hMax;
|
|||
|
|
|||
|
QImage pic;
|
|||
|
|
|||
|
QList<int>hasCU; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> uid <20><><EFBFBD><EFBFBD> <20><> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD> <20><>, <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> -1 <20> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD> <20><><EFBFBD> <20><>
|
|||
|
|
|||
|
|
|||
|
void setPos(qreal xp, qreal yp);
|
|||
|
void setPos(QPointF p);
|
|||
|
QPointF getPos() {return QPointF(x, y);}
|
|||
|
void setType(int t);
|
|||
|
void setBoegotov(bool b = true);
|
|||
|
void setRockets(int r);
|
|||
|
void setExist(bool b);
|
|||
|
void setPriznakSektor(bool fl = true);
|
|||
|
void setOgrH(int al, qreal min, qreal max);
|
|||
|
void setOgrH(int al);
|
|||
|
|
|||
|
int addCU(int uid);
|
|||
|
void removeCU(int uid);
|
|||
|
|
|||
|
void setSektor(qreal a1, qreal a2);
|
|||
|
void clearSektor();
|
|||
|
|
|||
|
private:
|
|||
|
virtual void mousePressEvent ( QGraphicsSceneMouseEvent * event );
|
|||
|
|
|||
|
signals:
|
|||
|
|
|||
|
public slots:
|
|||
|
|
|||
|
|
|||
|
};
|
|||
|
|
|||
|
#endif // GROUNDOBJ_H
|