goat3d

view goatview/src/goatview.h @ 83:57e745dd13c2

almost working
author John Tsiombikas <nuclear@member.fsf.org>
date Mon, 12 May 2014 07:22:52 +0300
parents 70b7c41a4f17
children 91e3aa1a60c3
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 private:
15 Q_OBJECT
17 GoatViewport *glview;
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);
35 void show_about();
36 };
38 class GoatViewport : public QGLWidget {
39 private:
40 Q_OBJECT
42 QWidget *main_win;
43 bool initialized;
45 public:
46 GoatViewport(QWidget *main_win);
47 ~GoatViewport();
49 QSize sizeHint() const;
51 void initializeGL();
52 void resizeGL(int xsz, int ysz);
53 void paintGL();
55 void toggle_lighting();
57 void mousePressEvent(QMouseEvent *ev);
58 void mouseMoveEvent(QMouseEvent *ev);
59 };
61 #endif // GOATVIEW_H_