Files
aliendefender/ad_graphics.h
buull 8fa6b8e2a6 added animation
but not full in ADeditor
2010-09-05 16:25:23 +04:00

36 lines
675 B
C++

#ifndef AD_GRAPHICS_H
#define AD_GRAPHICS_H
#include <QGraphicsView>
#include <QGraphicsWidget>
#include <QPushButton>
#include <QMouseEvent>
#include "adcore.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:
void draw();
void drawBackground(QPainter * p, const QRectF &);
void mouseDoubleClickEvent(QMouseEvent *);
void mousePressEvent(QMouseEvent *event);
QGraphicsScene * scene;
Game_Data * data;
AD_Core * core;
QImage * mapimg;
//QGraphicsWidget * gsw;
protected:
void timerEvent(QTimerEvent * );
};
#endif // AD_GRAPHICS_H