goat3d

view goatview/src/goatview.h @ 86:6d04caf510ab

forgot to add the new source files
author John Tsiombikas <nuclear@member.fsf.org>
date Wed, 14 May 2014 05:34:38 +0300
parents 57e745dd13c2
children 7941e89798e5
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"
8 #include "scenemodel.h"
10 extern goat3d *scene;
12 class GoatViewport;
15 class GoatView : public QMainWindow {
16 private:
17 Q_OBJECT
19 GoatViewport *glview;
20 QTreeView *treeview;
21 SceneModel *scene_model;
23 void closeEvent(QCloseEvent *ev);
24 bool make_menu();
25 bool make_dock();
26 bool make_center();
28 private slots:
29 void open_scene();
30 void open_anim();
32 public:
33 GoatView();
34 ~GoatView();
36 bool load_scene(const char *fname);
38 void show_about();
39 };
41 class GoatViewport : public QGLWidget {
42 private:
43 Q_OBJECT
45 QWidget *main_win;
46 bool initialized;
48 public:
49 GoatViewport(QWidget *main_win);
50 ~GoatViewport();
52 QSize sizeHint() const;
54 void initializeGL();
55 void resizeGL(int xsz, int ysz);
56 void paintGL();
58 void toggle_lighting();
60 void mousePressEvent(QMouseEvent *ev);
61 void mouseMoveEvent(QMouseEvent *ev);
62 };
64 #endif // GOATVIEW_H_