goat3d
annotate goatview/src/goatview.h @ 81:7458b8568463
forgot to add opengl.h/c
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 08 May 2014 23:05:29 +0300 |
parents | 9785847d52d4 |
children | 70b7c41a4f17 |
rev | line source |
---|---|
nuclear@73 | 1 #ifndef GOATVIEW_H_ |
nuclear@73 | 2 #define GOATVIEW_H_ |
nuclear@73 | 3 |
nuclear@75 | 4 #include <QtCore/QtCore> |
nuclear@73 | 5 #include <QtWidgets/QtWidgets> |
nuclear@73 | 6 #include <QtOpenGL/QGLWidget> |
nuclear@74 | 7 #include "goat3d.h" |
nuclear@74 | 8 |
nuclear@74 | 9 extern goat3d *scene; |
nuclear@75 | 10 extern QSettings *settings; |
nuclear@73 | 11 |
nuclear@76 | 12 bool load_scene(const char *fname); |
nuclear@76 | 13 |
nuclear@73 | 14 class GoatView : public QMainWindow { |
nuclear@73 | 15 Q_OBJECT |
nuclear@73 | 16 private: |
nuclear@75 | 17 void closeEvent(QCloseEvent *ev); |
nuclear@73 | 18 bool make_menu(); |
nuclear@73 | 19 bool make_dock(); |
nuclear@73 | 20 bool make_center(); |
nuclear@73 | 21 |
nuclear@73 | 22 private slots: |
nuclear@73 | 23 void open_scene(); |
nuclear@73 | 24 void open_anim(); |
nuclear@73 | 25 |
nuclear@73 | 26 public: |
nuclear@73 | 27 GoatView(); |
nuclear@73 | 28 ~GoatView(); |
nuclear@73 | 29 }; |
nuclear@73 | 30 |
nuclear@73 | 31 class GoatViewport : public QGLWidget { |
nuclear@73 | 32 Q_OBJECT |
nuclear@73 | 33 public: |
nuclear@73 | 34 GoatViewport(); |
nuclear@73 | 35 ~GoatViewport(); |
nuclear@73 | 36 |
nuclear@73 | 37 QSize sizeHint() const; |
nuclear@73 | 38 |
nuclear@73 | 39 void initializeGL(); |
nuclear@73 | 40 void resizeGL(int xsz, int ysz); |
nuclear@73 | 41 void paintGL(); |
nuclear@78 | 42 |
nuclear@78 | 43 void mousePressEvent(QMouseEvent *ev); |
nuclear@78 | 44 void mouseMoveEvent(QMouseEvent *ev); |
nuclear@73 | 45 }; |
nuclear@73 | 46 |
nuclear@73 | 47 #endif // GOATVIEW_H_ |