-
Notifications
You must be signed in to change notification settings - Fork 1
/
GameDisplayWidget.h
43 lines (31 loc) · 843 Bytes
/
GameDisplayWidget.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef GAME_DISPLAY_WIDGET_H
#define GAME_DISPLAY_WIDGET_H
#include <QGLWidget>
#include "AbstractRenderer.h"
#include "InputMapper.h"
namespace QtGameEngine {
using namespace RenderingEngine;
using namespace InputEngine;
namespace UI {
class GameDisplayWidget : public QGLWidget
{
Q_OBJECT
public:
explicit GameDisplayWidget(QWidget *parent = 0);
signals:
public slots:
void setRenderer(AbstractRenderer* renderer);
void setInputMapper(InputMapper* mapper);
protected:
virtual void initializeGL();
virtual void resizeGL(int w, int h);
virtual void paintGL();
virtual void mousePressEvent(QMouseEvent *e);
virtual void keyPressEvent(QKeyEvent *e);
private:
AbstractRenderer* renderer;
InputMapper* mapper;
};
}
}
#endif // GAMEDISPLAYWIDGET_H