Salome HOME
refs #1458: disable chained panning on operations
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewWindow.h
index e83fe217e196b2c0694af66308e5aafb0f0937d6..ba1a6ddad55f5246d00c4c633eabb56d2055f83f 100755 (executable)
@@ -39,6 +39,7 @@ class OCCViewer_SetRotationPointDlg;
 class OCCViewer_Viewer;
 class OCCViewer_CubeAxesDlg;
 class QtxAction;
+class gp_XYZ;
 
 struct viewAspect
 {
@@ -242,6 +243,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 +274,8 @@ public:
 
   virtual SUIT_CameraProperties   cameraProperties();
 
+  void resetState();
+
 public slots:
   virtual void onFrontView();
   virtual void onViewFitAll();
@@ -308,6 +314,7 @@ public slots:
   virtual void onRayTracing();
   virtual void onEnvTexture();
   virtual void onLightSource();
+  virtual void onPanning();
 
   virtual void activateSetRotationGravity();
   virtual void activateSetRotationSelected( double theX, double theY, double theZ );
@@ -354,7 +361,6 @@ protected:
   void vpMouseReleaseEvent(QMouseEvent* theEvent);
   void vpMouseMoveEvent(QMouseEvent* theEvent);
 
-  void resetState();
   void drawRect();
   void endDrawRect();
 
@@ -367,6 +373,10 @@ protected:
 
   bool computeGravityCenter( double& theX, double& theY, double& theZ );
 
+  bool computeGravityCenter1(gp_XYZ& gravityCenter);
+
+  void ProjAndPanToGravity(V3d_TypeOfOrientation CamOri);
+
   virtual void                          onSketchingStarted();
   virtual void                          onSketchingFinished();
 
@@ -405,7 +415,7 @@ protected:
   bool                  myPaintersRedrawing;  // set to draw with external painters  
   bool                  IsSketcherStyle;
   bool                  myIsKeyFree;
-  
+  bool                  myAutomaticZoom;
   QCursor               myCursor;
 
   double myCurScale;
@@ -430,6 +440,7 @@ private:
   Handle(V3d_Plane) myReserveClipPlane;
 
   viewAspectList myViewAspects;
+  bool myPanningByBtn;
 };
 
 #ifdef WIN32