- XGUI_ViewPort(XGUI_ViewWindow* theParent,
- const Handle(V3d_Viewer)& theViewer,
- V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
- ~XGUI_ViewPort();
-
- virtual QPaintEngine* paintEngine() const { return 0; }
-
- QImage dumpView(QRect theRect = QRect(), bool toUpdate = true);
-
- Handle(V3d_View) getView() const { return activeView(); }
+ XGUI_ViewPort(XGUI_ViewWindow* theParent, const Handle(V3d_Viewer)& theViewer,
+ V3d_TypeOfView theType = V3d_ORTHOGRAPHIC);
+ ~XGUI_ViewPort();
+
+ virtual QPaintEngine* paintEngine() const
+ {
+ return 0;
+ }
+
+ QImage dumpView(QRect theRect = QRect(), bool toUpdate = true);
+
+ Handle(V3d_View) getView() const
+ {
+ return activeView();
+ }
+
+ void startRotation(int x, int y, int theRotationPointType, const gp_Pnt& theSelectedPoint);
+ void rotate(int, int, int, const gp_Pnt&);
+ void endRotation();
+
+ // TRANSFORMATIONS
+ void pan(int dx, int dy);
+ void setCenter(int x, int y);
+ void fitRect(const QRect& rect);
+ void startZoomAtPoint(int x, int y);
+ void zoom(int x0, int y0, int x, int y);
+ void fitAll(bool theKeepScale = false, bool theWithZ = true, bool theUpd = true);
+
+ void setAdvancedZoomingEnabled(const bool theState)
+ {
+ myIsAdvancedZoomingEnabled = theState;
+ }
+ bool isAdvancedZoomingEnabled() const
+ {
+ return myIsAdvancedZoomingEnabled;
+ }
+
+ XGUI_ViewBackground background() const
+ {
+ return myBackground;
+ }
+
+ void setBackground(const XGUI_ViewBackground& bgData);
+
+ void syncronizeWith( const XGUI_ViewPort* ref );