source: projectionDesigner/trunk/projdesigner/include/gui/QSceneViewerWindow.h @ 393

Last change on this file since 393 was 4, checked in by Torben Dannhauer, 15 years ago
File size: 957 bytes
Line 
1#ifndef _QSCENEVIEWERWINDOW_H_
2#define _QSCENEVIEWERWINDOW_H_
3
4#include "gui/QGLViewerWidget.h"
5
6namespace projection
7{
8class ProjectionModel;
9
10enum SCENEVIEWER_VIEWMODE
11{
12    SCENEVIEWER_VIEWMODE_PERSPECTIVE,
13    SCENEVIEWER_VIEWMODE_CENTER,
14};
15
16class QSceneViewerWindow : public QGLViewerWidget
17{
18        Q_OBJECT
19
20public:
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
34protected:
35
36    virtual void init();
37    virtual void draw();
38    virtual void keyReleaseEvent(QKeyEvent* pEvent);
39
40protected:
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.