Rev | Line | |
---|
[4] | 1 | #ifndef _QSCENEVIEWERWINDOW_H_ |
---|
| 2 | #define _QSCENEVIEWERWINDOW_H_ |
---|
| 3 | |
---|
| 4 | #include "gui/QGLViewerWidget.h" |
---|
| 5 | |
---|
| 6 | namespace projection |
---|
| 7 | { |
---|
| 8 | class ProjectionModel; |
---|
| 9 | |
---|
| 10 | enum SCENEVIEWER_VIEWMODE |
---|
| 11 | { |
---|
| 12 | SCENEVIEWER_VIEWMODE_PERSPECTIVE, |
---|
| 13 | SCENEVIEWER_VIEWMODE_CENTER, |
---|
| 14 | }; |
---|
| 15 | |
---|
| 16 | class QSceneViewerWindow : public QGLViewerWidget |
---|
| 17 | { |
---|
| 18 | Q_OBJECT |
---|
| 19 | |
---|
| 20 | public: |
---|
| 21 | |
---|
| 22 | QSceneViewerWindow(QWidget* pParent=0, const QGLWidget* pSharedWidget=0, Qt::WFlags flags=0); |
---|
| 23 | |
---|
| 24 | void setModel(ProjectionModel* pModel); |
---|
| 25 | |
---|
| 26 | void setViewMode(SCENEVIEWER_VIEWMODE viewMode); |
---|
| 27 | SCENEVIEWER_VIEWMODE getViewMode() const; |
---|
| 28 | |
---|
| 29 | void resetCamera(); |
---|
| 30 | |
---|
| 31 | void initFromDOMElement(const QDomElement& element); |
---|
| 32 | QDomElement domElement(const QString& name, QDomDocument& doc) const; |
---|
| 33 | |
---|
| 34 | protected: |
---|
| 35 | |
---|
| 36 | virtual void init(); |
---|
| 37 | virtual void draw(); |
---|
| 38 | virtual void keyReleaseEvent(QKeyEvent* pEvent); |
---|
| 39 | |
---|
| 40 | protected: |
---|
| 41 | |
---|
| 42 | SCENEVIEWER_VIEWMODE m_viewMode; |
---|
| 43 | |
---|
| 44 | ProjectionModel* m_pModel; |
---|
| 45 | }; |
---|
| 46 | |
---|
| 47 | }; |
---|
| 48 | |
---|
| 49 | #endif // _QSCENEVIEWERWINDOW_H_ |
---|
Note: See
TracBrowser
for help on using the repository browser.