1 // File : OCCViewer_ViewPort3d.h
2 // Created : Wed Mar 20 10:48:51 2002
3 // Author : Nicolas REJNERI
6 // Copyright : Open CASCADE 2002
9 #ifndef OCCViewer_ViewPort3d_H
10 #define OCCViewer_ViewPort3d_H
12 #include "OCCViewer_ViewPort.h"
13 #include "OCCViewer_VService.h"
17 // Open CASCADE Includes
18 #include <Standard.hxx>
19 #include <V3d_View.hxx>
20 #include <V3d_Viewer.hxx>
27 #include <qapplication.h>
29 class QAD_EXPORT OCCViewer_ViewPort3d: public OCCViewer_ViewPort
34 OCCViewer_ViewPort3d( QWidget* parent, const Handle( V3d_Viewer)& viewer,
35 V3d_TypeOfView viewType = V3d_ORTHOGRAPHIC,
36 OCCViewer_ViewPort* prevView = 0,
37 const QRect* magnify = 0 );
38 ~OCCViewer_ViewPort3d();
40 /* view 3D management */
41 Handle (V3d_View) setView( const Handle( V3d_View )& );
42 Handle (V3d_View) getView() const;
43 Handle (V3d_Viewer) getViewer() const;
44 V3d_TypeOfView setViewType( V3d_TypeOfView type );
46 /* popup management */
49 /* view transformations */
50 void activateGlobalPanning();
51 void fitAll( bool withZ = true );
55 void setBackgroundColor( const QColor& color);
56 QColor backgroundColor() const;
59 void onChangeBackgroundColor();
62 void paintEvent(QPaintEvent *ev);
67 void pan(int dx, int dy);
68 void setCenter(int x, int y);
69 void fitWindow( const QRect& rect);
70 void zoom(int x0, int y0, int x, int y);
71 void startRotation(int x0, int y0);
72 void rotate(int x, int y);
76 Handle (V3d_View) myActiveView;