00001 00004 /***************************************************************************** 00005 ** Ifdefs 00006 *****************************************************************************/ 00007 00008 #ifndef qglv_WIDGETS_COMMON_QGL_VIEWER_HPP_ 00009 #define qglv_WIDGETS_COMMON_QGL_VIEWER_HPP_ 00010 00011 /***************************************************************************** 00012 ** Includes 00013 *****************************************************************************/ 00014 00015 #include <qglv/opengl.hpp> 00016 #include <QGLViewer/qglviewer.h> 00017 #include <QString> 00018 #include <QWidget> 00019 00020 /***************************************************************************** 00021 ** Namespaces 00022 *****************************************************************************/ 00023 00024 namespace qglv { 00025 00026 /***************************************************************************** 00027 ** Interfaces 00028 *****************************************************************************/ 00029 00033 class QGLViewer : public ::QGLViewer 00034 { 00035 Q_OBJECT 00036 public : 00037 QGLViewer(QWidget *parent = nullptr); 00038 virtual ~QGLViewer(); 00039 virtual void init(); 00040 virtual QString helpString() const; // overload this 00041 00042 // virtual void keyPressEvent(QKeyEvent *e); 00043 // void mouseMoveEvent(QMouseEvent *e); 00044 // void mouseMoveEvent(QMouseEvent* const event, Camera* const camera); 00045 00046 virtual void draw(); 00047 00048 public slots: 00049 void redraw(); 00050 00051 private: 00052 qint64 last_redraw_, redraw_interval_ms_; 00053 }; 00054 00055 /***************************************************************************** 00056 ** Trailers 00057 *****************************************************************************/ 00058 00059 } // namespace qglv 00060 00061 #endif /* qglv_WIDGETS_COMMON_QGL_VIEWER_HPP_ */