goat3d

view goatview/src/goatview.h @ 89:c1871707c678

fixed the windows build
author John Tsiombikas <nuclear@member.fsf.org>
date Fri, 16 May 2014 05:23:10 +0300
parents 91e3aa1a60c3
children 8b156bc5205b
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 void post_redisplay();
12 extern goat3d *scene;
14 class GoatViewport;
16 class GoatView : public QMainWindow {
17 private:
18 Q_OBJECT
20 GoatViewport *glview;
21 QTreeView *treeview;
22 SceneModel *scene_model;
24 void closeEvent(QCloseEvent *ev);
25 bool make_menu();
26 bool make_dock();
27 bool make_center();
29 private slots:
30 void open_scene();
31 void open_anim();
33 public:
34 GoatView();
35 ~GoatView();
37 bool load_scene(const char *fname);
39 void show_about();
40 };
42 class GoatViewport : public QGLWidget {
43 private:
44 Q_OBJECT
46 QWidget *main_win;
47 bool initialized;
49 public:
50 GoatViewport(QWidget *main_win);
51 ~GoatViewport();
53 QSize sizeHint() const;
55 void initializeGL();
56 void resizeGL(int xsz, int ysz);
57 void paintGL();
59 void toggle_lighting();
61 void mousePressEvent(QMouseEvent *ev);
62 void mouseMoveEvent(QMouseEvent *ev);
63 };
65 #endif // GOATVIEW_H_