changes in arhitecture, some improvments, much optimising and simplify,

many bagfixes and new graphics engine
This commit is contained in:
blizer
2011-08-20 07:34:19 +04:00
committed by unknown
parent 0a9679fd99
commit f3d0ca7101
33 changed files with 1444 additions and 897 deletions

View File

@@ -7,29 +7,49 @@
#include "adcore.h"
const float cellSize = 20.f;
class AD_Graphics: public QGraphicsView
{
Q_OBJECT
Q_PROPERTY(bool building READ building WRITE setBuilding)
public:
explicit AD_Graphics(AD_Core * core, QWidget * parent = 0);
~AD_Graphics();
bool building() const
{
return m_building;
}
public slots:
void setBuilding(bool arg)
{
m_building = arg;
}
private:
void draw();
void drawBackground(QPainter * p, const QRectF &);
void mouseDoubleClickEvent(QMouseEvent *);
void drawBackground(QPainter * p, const QRectF &);
void drawForeground(QPainter *painter, const QRectF &rect);
void mousePressEvent(QMouseEvent *event);
QGraphicsScene * scene;
Game_Data * data;
AD_Core * core;
QImage * mapimg;
//QGraphicsWidget * gsw;
Game_Data * data;
bool m_building;
private slots:
protected:
void timerEvent(QTimerEvent * );
// void timerEvent(QTimerEvent * );
signals:
void cancel();
void add_tow(QPoint pnt);
void tower_select(QPoint id);
void alien_select(int id);
};
#endif // AD_GRAPHICS_H