1 #ifndef XGUI_ViewPort_H
2 #define XGUI_ViewPort_H
4 #include "XGUI_ViewBackground.h"
7 #include <V3d_Viewer.hxx>
8 #include <V3d_View.hxx>
11 class XGUI_ViewWindow;
13 class XGUI_ViewPort: public QWidget
17 XGUI_ViewPort(XGUI_ViewWindow* theParent, const Handle(V3d_Viewer)& theViewer,
18 V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
21 virtual QPaintEngine* paintEngine() const
26 QImage dumpView(QRect theRect = QRect(), bool toUpdate = true);
28 Handle(V3d_View) getView() const
33 void startRotation(int x, int y, int theRotationPointType, const gp_Pnt& theSelectedPoint);
34 void rotate(int, int, int, const gp_Pnt&);
38 void pan(int dx, int dy);
39 void setCenter(int x, int y);
40 void fitRect(const QRect& rect);
41 void startZoomAtPoint(int x, int y);
42 void zoom(int x0, int y0, int x, int y);
44 void setAdvancedZoomingEnabled(const bool theState)
46 myIsAdvancedZoomingEnabled = theState;
48 bool isAdvancedZoomingEnabled() const
50 return myIsAdvancedZoomingEnabled;
53 XGUI_ViewBackground background() const
57 void setBackground(const XGUI_ViewBackground& bgData);
60 void vpChangeBackground(const XGUI_ViewBackground&);
67 virtual void paintEvent(QPaintEvent*);
68 virtual void resizeEvent(QResizeEvent*);
71 Handle(V3d_View) activeView() const
76 bool mapView(const Handle(V3d_View)& theView);
77 bool setWindow(const Handle(V3d_View)& theView);
78 bool mapped(const Handle(V3d_View)& theView) const;
79 void updateBackground();
80 void attachWindow(const Handle(V3d_View)& theView, const Handle(Aspect_Window)& theWnd);
82 Handle(V3d_View) myOrthoView;Handle(V3d_View) myPerspView;Handle(V3d_View) myActiveView;
84 Handle(Aspect_Window) myWindow;
86 bool myPaintersRedrawing;
87 bool myIsAdvancedZoomingEnabled;
91 XGUI_ViewBackground myBackground;