goat3d

view goatview/src/goatview.h @ 82:70b7c41a4f17

foo
author John Tsiombikas <nuclear@member.fsf.org>
date Sun, 11 May 2014 22:04:54 +0300
parents 53ea5b25426e
children 57e745dd13c2
line source
1 #ifndef GOATVIEW_H_
2 #define GOATVIEW_H_
4 #include <QtCore/QtCore>
5 #include <QtWidgets/QtWidgets>
6 #include <QtOpenGL/QGLWidget>
7 #include "goat3d.h"
9 extern goat3d *scene;
11 class GoatViewport;
13 class GoatView : public QMainWindow {
14 Q_OBJECT
15 private:
16 GoatViewport *glview;
17 QStandardItemModel *sgmodel; // scene graph model
18 QTreeWidget *scntree;
20 void closeEvent(QCloseEvent *ev);
21 bool make_menu();
22 bool make_dock();
23 bool make_center();
25 private slots:
26 void open_scene();
27 void open_anim();
29 public:
30 GoatView();
31 ~GoatView();
33 bool load_scene(const char *fname);
34 };
36 class GoatViewport : public QGLWidget {
37 private:
38 Q_OBJECT
40 QWidget *main_win;
41 bool initialized;
43 public:
44 GoatViewport(QWidget *main_win);
45 ~GoatViewport();
47 QSize sizeHint() const;
49 void initializeGL();
50 void resizeGL(int xsz, int ysz);
51 void paintGL();
53 void mousePressEvent(QMouseEvent *ev);
54 void mouseMoveEvent(QMouseEvent *ev);
55 };
57 #endif // GOATVIEW_H_