Salome HOME
Join modifications from branch OCC_development_for_3_2_0a2
[modules/gui.git] / src / OCCViewer / OCCViewer_ViewWindow.h
index efac118cfd1c74a160ff277ba543d55b004d61b3..b6bda965a519a1d39348da8eadcb122a12a5f6fb 100755 (executable)
@@ -1,3 +1,21 @@
+// Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
+// 
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either 
+// version 2.1 of the License.
+// 
+// This library is distributed in the hope that it will be useful 
+// but WITHOUT ANY WARRANTY; without even the implied warranty of 
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public  
+// License along with this library; if not, write to the Free Software 
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+// See http://www.salome-platform.org/
+//
 #ifndef OCCVIEWER_VIEWWINDOW_H
 #define OCCVIEWER_VIEWWINDOW_H
 
@@ -13,6 +31,8 @@
 class SUIT_Desktop;
 class OCCViewer_ViewPort3d;
 
+class OCCViewer_ClippingDlg;
+
 #ifdef WIN32
 #pragma warning( disable:4251 )
 #endif
@@ -38,6 +58,14 @@ public:
   
   virtual void initLayout();
 
+  void updateEnabledDrawMode();
+
+  void setCuttingPlane( bool on, const double x = 0 , const double y = 0 , const double z = 0,
+                                 const double dx = 0, const double dy = 0, const double dz = 1);
+
+  virtual QString   getVisualParameters();
+  virtual void      setVisualParameters( const QString& parameters );
 public slots:
   void onFrontView();
   void onViewFitAll();
@@ -48,13 +76,13 @@ public slots:
   void onRightView();
   void onResetView();
   void onFitAll();
-  void onDumpView();
   void activateZoom();
   void activateWindowFit();
   void activateRotation();
   void activatePanning();
   void activateGlobalPanning();
   void onCloneView();
+  void onClipping( bool on );
   void onMemorizeView();
   void onRestoreView();
   void onTrihedronShow();
@@ -67,11 +95,12 @@ signals:
 
 protected:
   enum { DumpId, FitAllId, FitRectId, ZoomId, PanId, GlobalPanId, RotationId,
-         FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, CloneId, MemId, RestoreId,
+         FrontId, BackId, TopId, BottomId, LeftId, RightId, ResetId, CloneId, ClippingId, MemId, RestoreId,
          TrihedronShowId };
 
   typedef QMap<int, QtxAction*> ActionsMap;
 
+  QImage dumpView();
 
   /* Transformation selected but not started yet */
   bool transformRequested() const { return ( myOperation != NOTHING ); }
@@ -93,6 +122,8 @@ protected:
  
   virtual OperationType getButtonState(QMouseEvent* theEvent);
 
+  viewAspect getViewParams() const;
+
   OperationType         myOperation;
   OCCViewer_Viewer*     myModel;
   OCCViewer_ViewPort3d* myViewPort;
@@ -117,6 +148,10 @@ protected:
   ActionsMap myActionsMap;
 
   double myCurScale;
+
+private:
+  OCCViewer_ClippingDlg* myClippingDlg;
+  
 };
 
 #ifdef WIN32