Salome HOME
Merge modifications for HYDRO project (origin/hydro/imps_2017_salome_83 branch)
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewWindow.h
index c68465fa5d0a8134e05df96995674f5232b452c1..57165f3bff5cfb7df4a4968352e164fca3dbc966 100755 (executable)
@@ -143,7 +143,7 @@ class OCCVIEWER_EXPORT OCCViewer_ViewWindow : public SUIT_ViewWindow
   Q_OBJECT
 
 public:
-  enum { DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId,
+  enum ActionId { DumpId, FitAllId, FitRectId, FitSelectionId, ZoomId, PanId, GlobalPanId,
          ChangeRotationPointId, RotationId,
          FrontId, BackId, TopId, BottomId, LeftId, RightId, ClockWiseId, AntiClockWiseId,
         ResetId, CloneId, ClippingId, MemId, RestoreId,
@@ -242,6 +242,9 @@ public:
   virtual bool                    isQuadBufferSupport() const;
   virtual void                    setQuadBufferSupport( const bool );
 
+  virtual bool                    isAutomaticZoom() const;
+  virtual void                    setAutomaticZoom( const bool );
+
   void setTransformEnabled( const OperationType, const bool );
   bool transformEnabled( const OperationType ) const;
 
@@ -270,6 +273,11 @@ public:
 
   virtual SUIT_CameraProperties   cameraProperties();
 
+  bool isActionVisible( ActionId theId ) const;
+  void setActionVisible( ActionId theId, bool isVisible );
+
+  void resetState();
+
 public slots:
   virtual void onFrontView();
   virtual void onViewFitAll();
@@ -355,7 +363,6 @@ protected:
   void vpMouseReleaseEvent(QMouseEvent* theEvent);
   void vpMouseMoveEvent(QMouseEvent* theEvent);
 
-  void resetState();
   void drawRect();
   void endDrawRect();
 
@@ -368,6 +375,8 @@ protected:
 
   bool computeGravityCenter( double& theX, double& theY, double& theZ );
 
+  void projAndPanToGravity(V3d_TypeOfOrientation CamOri);
+
   virtual void                          onSketchingStarted();
   virtual void                          onSketchingFinished();
 
@@ -406,7 +415,7 @@ protected:
   bool                  myPaintersRedrawing;  // set to draw with external painters  
   bool                  IsSketcherStyle;
   bool                  myIsKeyFree;
-  
+  bool                  myAutomaticZoom;
   QCursor               myCursor;
 
   double myCurScale;