Salome HOME
Merge from V6_main (04/10/2012)
[modules/gui.git] / src / VTKViewer / VTKViewer_RenderWindowInteractor.h
index 435e5b4b8f334d0213b6bab2d710897fc3f2ce53..1f3556448d7f10f589e7bcb393967f962a3cc25e 100755 (executable)
@@ -1,29 +1,37 @@
-// Copyright (C) 2005  OPEN CASCADE, CEA/DEN, EDF R&D, PRINCIPIA R&D
-// 
+// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+//
+// Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
+//
 // 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 
+// 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 
+//
+// 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 
+// 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/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef VTKVIEWER_RENDERWINDOWINTERACTOR_H
 #define VTKVIEWER_RENDERWINDOWINTERACTOR_H
 
 #include "VTKViewer.h"
 #include "VTKViewer_Actor.h"
 
-#include <qtimer.h>
-#include <qobject.h>
+#include <QObject>
+
+class QTimer;
+class QMouseEvent;
+class QKeyEvent;
+class QContextMenuEvent;
 
 // Open CASCADE Includes
 #include <TColStd_MapOfInteger.hxx>
@@ -97,24 +105,24 @@ public:
   /** @name Selection Management */
   //@{
   bool highlightCell(const TColStd_IndexedMapOfInteger& MapIndex,
-                    VTKViewer_Actor* theMapActor,
-                    bool hilight,
-                    bool update = true );
+                     VTKViewer_Actor* theMapActor,
+                     bool hilight,
+                     bool update = true );
   bool highlightEdge(const TColStd_IndexedMapOfInteger& MapIndex,
-                    VTKViewer_Actor* theMapActor,
-                    bool hilight,
-                    bool update = true );
+                     VTKViewer_Actor* theMapActor,
+                     bool hilight,
+                     bool update = true );
   bool highlightPoint(const TColStd_IndexedMapOfInteger& MapIndex,
-                     VTKViewer_Actor* theMapActor,
-                     bool hilight,
-                     bool update = true );
+                      VTKViewer_Actor* theMapActor,
+                      bool hilight,
+                      bool update = true );
 
   void unHighlightSubSelection();
   bool unHighlightAll();
 
   //void SetSelectionMode(Selection_Mode mode);
   void SetSelectionProp(const double& theRed = 1, const double& theGreen = 1,
-                       const double& theBlue = 0, const int& theWidth = 5);
+                        const double& theBlue = 0, const int& theWidth = 5);
   void SetSelectionTolerance(const double& theTolNodes = 0.025, const double& theTolCell = 0.001);
   //@}
 
@@ -128,12 +136,14 @@ public:
   //@{
   void ChangeRepresentationToWireframe();
   void ChangeRepresentationToSurface();
+  void ChangeRepresentationToSurfaceWithEdges();
   //@}
 
   /** @name Change to wireframe or surface a list of vtkactor*/
   //@{
   void ChangeRepresentationToWireframe(vtkActorCollection* ListofActors);
   void ChangeRepresentationToSurface(vtkActorCollection* ListofActors);
+  void ChangeRepresentationToSurfaceWithEdges(vtkActorCollection* ListofActors);
   //@}
 
   /** @name Erase Display functions*/
@@ -154,19 +164,19 @@ public:
   void setViewWindow( VTKViewer_ViewWindow* theViewWnd );
 
   void setCellData(const int& theIndex,
-                  VTKViewer_Actor* theMapActor,
-                  VTKViewer_Actor* theActor) {}
+                   VTKViewer_Actor* theMapActor,
+                   VTKViewer_Actor* theActor) {}
   void setEdgeData(const int& theCellIndex,
-                  VTKViewer_Actor* theMapActor,
-                  const int& theEdgeIndex,
-                  VTKViewer_Actor* theActor ) {} //NB
+                   VTKViewer_Actor* theMapActor,
+                   const int& theEdgeIndex,
+                   VTKViewer_Actor* theActor ) {} //NB
   void setPointData(const int& theIndex,
-                   VTKViewer_Actor* theMapActor,
-                   VTKViewer_Actor* theActor) {}
+                    VTKViewer_Actor* theMapActor,
+                    VTKViewer_Actor* theActor) {}
 
   typedef void (*TUpdateActor)(const TColStd_IndexedMapOfInteger& theMapIndex,
-                              VTKViewer_Actor* theMapActor,
-                              VTKViewer_Actor* theActor);
+                               VTKViewer_Actor* theMapActor,
+                               VTKViewer_Actor* theActor);
  protected:
 
   VTKViewer_RenderWindowInteractor();
@@ -175,12 +185,12 @@ public:
   VTKViewer_InteractorStyle* myInteractorStyle;
 
   bool highlight(const TColStd_IndexedMapOfInteger& theMapIndex,
-                VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
-                TUpdateActor theFun, bool hilight, bool update);
+                 VTKViewer_Actor* theMapActor, VTKViewer_Actor* theActor,
+                 TUpdateActor theFun, bool hilight, bool update);
   void setActorData(const TColStd_IndexedMapOfInteger& theMapIndex,
-                   VTKViewer_Actor* theMapActor,
-                   VTKViewer_Actor *theActor,
-                   TUpdateActor theFun);
+                    VTKViewer_Actor* theMapActor,
+                    VTKViewer_Actor *theActor,
+                    TUpdateActor theFun);
 
   /*! Timer used during various mouse events to figure 
    * out mouse movements.