forked from Blackcatn13/houseDesigner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGLWidget.h
More file actions
38 lines (33 loc) · 896 Bytes
/
GLWidget.h
File metadata and controls
38 lines (33 loc) · 896 Bytes
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
#ifndef _GLWIDGET_H
#define _GLWIDGET_H
#include "Util.h"
#include <QtOpenGL/QGLWidget>
#include "Render.h"
#include <qglshaderprogram.h>
class GLWidget : public QGLWidget {
Q_OBJECT // must include this if you use Qt signals/slots
public:
GLWidget(QWidget *parent = NULL);
~GLWidget();
public slots:
void changeCursor(Qt::CursorShape);
protected:
void initializeGL();
void resizeGL(int w, int h);
void paintGL();
void mousePressEvent(QMouseEvent *event);
void mouseMoveEvent(QMouseEvent *event);
void wheelEvent(QWheelEvent *event);
void keyPressEvent(QKeyEvent *event);
void mouseReleaseEvent(QMouseEvent *event);
void enterEvent(QEvent *event);
private:
Modes actualMode;
float width;
float heigth;
QGLShaderProgram *shader;
Qt::CursorShape cursor;
signals:
void setMouseMove(bool);
};
#endif /* _GLWIDGET_H */