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);
43 void fitAll(bool theKeepScale = false, bool theWithZ = true, bool theUpd = true);
45 void setAdvancedZoomingEnabled(const bool theState)
47 myIsAdvancedZoomingEnabled = theState;
49 bool isAdvancedZoomingEnabled() const
51 return myIsAdvancedZoomingEnabled;
54 XGUI_ViewBackground background() const
59 void setBackground(const XGUI_ViewBackground& bgData);
61 void syncronizeWith( const XGUI_ViewPort* ref );
64 void vpChangeBackground(const XGUI_ViewBackground&);
71 virtual void paintEvent(QPaintEvent*);
72 virtual void resizeEvent(QResizeEvent*);
75 Handle(V3d_View) activeView() const
80 bool mapView(const Handle(V3d_View)& theView);
81 bool setWindow(const Handle(V3d_View)& theView);
82 bool mapped(const Handle(V3d_View)& theView) const;
83 void updateBackground();
84 void attachWindow(const Handle(V3d_View)& theView, const Handle(Aspect_Window)& theWnd);
86 Handle(V3d_View) myOrthoView;Handle(V3d_View) myPerspView;Handle(V3d_View) myActiveView;
88 Handle(Aspect_Window) myWindow;
90 bool myPaintersRedrawing;
91 bool myIsAdvancedZoomingEnabled;
95 XGUI_ViewBackground myBackground;