added some graphics but only for debug
This commit is contained in:
38
ad_graphics.h
Normal file
38
ad_graphics.h
Normal file
@@ -0,0 +1,38 @@
|
||||
#ifndef AD_GRAPHICS_H
|
||||
#define AD_GRAPHICS_H
|
||||
#include <QGraphicsView>
|
||||
#include <QGraphicsWidget>
|
||||
#include <QPushButton>
|
||||
#include <QMouseEvent>
|
||||
|
||||
#include "adcore.h"
|
||||
#include "animation.h"
|
||||
|
||||
const float cellSize = 20.f;
|
||||
|
||||
class AD_Graphics: public QGraphicsView
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit AD_Graphics(AD_Core * core, QWidget * parent = 0);
|
||||
~AD_Graphics();
|
||||
|
||||
private:
|
||||
enum imagesType {itAliens, itTowers, itSplashes};
|
||||
|
||||
void draw();
|
||||
void drawBackground(QPainter * p, const QRectF &);
|
||||
void loadImages();
|
||||
void mouseDoubleClickEvent(QMouseEvent *);
|
||||
|
||||
QGraphicsScene * scene;
|
||||
Game_Data * data;
|
||||
AD_Core * core;
|
||||
QVector<QVector<Animation * > > images;
|
||||
//QGraphicsWidget * gsw;
|
||||
|
||||
protected:
|
||||
void timerEvent(QTimerEvent * );
|
||||
};
|
||||
|
||||
#endif // AD_GRAPHICS_H
|
||||
Reference in New Issue
Block a user