fixed few critical bugs
This commit is contained in:
@@ -10,44 +10,44 @@
|
||||
|
||||
class AD_Graphics: public QGraphicsView
|
||||
{
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool building READ building WRITE setBuilding)
|
||||
Q_OBJECT
|
||||
Q_PROPERTY(bool building READ building WRITE setBuilding)
|
||||
public:
|
||||
explicit AD_Graphics(AD_Core * core, QWidget * parent = 0);
|
||||
~AD_Graphics();
|
||||
explicit AD_Graphics(AD_Core * core, QWidget * parent = 0);
|
||||
~AD_Graphics();
|
||||
|
||||
bool building() const
|
||||
{
|
||||
return m_building;
|
||||
}
|
||||
bool building() const
|
||||
{
|
||||
return m_building;
|
||||
}
|
||||
|
||||
public slots:
|
||||
void setBuilding(bool arg)
|
||||
{
|
||||
m_building = arg;
|
||||
}
|
||||
void setBuilding(bool arg)
|
||||
{
|
||||
m_building = arg;
|
||||
}
|
||||
|
||||
private:
|
||||
void drawBackground(QPainter * p, const QRectF &);
|
||||
void drawForeground(QPainter *painter, const QRectF &rect);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
void drawForeground(QPainter *painter, const QRectF &rect);
|
||||
void mousePressEvent(QMouseEvent *event);
|
||||
|
||||
QGraphicsScene * scene;
|
||||
AD_Core * core;
|
||||
QImage * mapimg;
|
||||
Game_Data * data;
|
||||
QGraphicsScene * scene;
|
||||
AD_Core * core;
|
||||
QImage * mapimg;
|
||||
Game_Data * data;
|
||||
|
||||
bool m_building;
|
||||
bool m_building;
|
||||
|
||||
private slots:
|
||||
|
||||
protected:
|
||||
|
||||
// void timerEvent(QTimerEvent * );
|
||||
void timerEvent(QTimerEvent * );
|
||||
signals:
|
||||
|
||||
void cancel();
|
||||
void add_tow(QPoint pnt);
|
||||
void cancel();
|
||||
void add_tow(QPoint pnt);
|
||||
void tower_select(QPoint id);
|
||||
void alien_select(int id);
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user