]> git.sur5r.net Git - fstl/blobdiff - src/canvas.h
Update upstream source from tag 'upstream/0.9.3'
[fstl] / src / canvas.h
index 33313cfcbf894c47aae09119c20398442fbe5369..4dae29891c0c3e60d14b9223b6668141dc9a65db 100644 (file)
@@ -2,6 +2,7 @@
 #define CANVAS_H
 
 #include <QWidget>
+#include <QPropertyAnimation>
 #include <QtOpenGL/QGLWidget>
 #include <QtOpenGL/QGLFunctions>
 #include <QtOpenGL/QGLShaderProgram>
@@ -22,10 +23,13 @@ public:
     void paintEvent(QPaintEvent* event);
     ~Canvas();
 
+    void view_orthographic();
+    void view_perspective();
+
 public slots:
     void set_status(const QString& s);
     void clear_status();
-    void load_mesh(Mesh* m);
+    void load_mesh(Mesh* m, bool is_reload);
 
 
 protected:
@@ -33,6 +37,9 @@ protected:
     void mouseReleaseEvent(QMouseEvent* event);
     void mouseMoveEvent(QMouseEvent* event);
     void wheelEvent(QWheelEvent* event);
+    void resizeGL(int width, int height);
+    void set_perspective(float p);
+    void view_anim(float v);
 
 
 private:
@@ -53,6 +60,10 @@ private:
     float tilt;
     float yaw;
 
+    float perspective;
+    Q_PROPERTY(float perspective WRITE set_perspective);
+    QPropertyAnimation anim;
+
     QPoint mouse_pos;
     QString status;
 };