Salome HOME
INT PAL 0054211: SALOME-8.3.0: Geometry fields are displayed incorrectly
[modules/geom.git] / src / GEOMGUI / GEOM_Displayer.h
old mode 100644 (file)
new mode 100755 (executable)
index 110785e..c7c6d87
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  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
@@ -28,6 +28,7 @@
 #define GEOM_DISPLAYER_H
 
 #include "GEOM_GEOMGUI.hxx"
+#include <GEOM_AISShape.hxx>
 
 #include <SALOME_InteractiveObject.hxx>
 
@@ -44,7 +45,11 @@ class SALOME_OCCViewType;
 #include <LightApp_Displayer.h>
 #include <LightApp_Study.h>
 #include <Aspect_TypeOfMarker.hxx>
+#if OCC_VERSION_MAJOR >= 7
+  #include <AIS_ColorScale.hxx>
+#endif
 #include <TCollection_AsciiString.hxx>
+#include <TColStd_MapOfInteger.hxx>
 #include <Basics_OCCTVersion.hxx>
 #include <QList>
 
@@ -60,14 +65,11 @@ class SALOME_OCCViewType;
 
 typedef std::list<GEOM::GEOM_Object_ptr> ObjectList;
 
-class TColStd_MapOfInteger;
 class LightApp_SelectionMgr;
 class SalomeApp_Study;
 class SalomeApp_Application;
 class SUIT_SelectionFilter;
-class Handle_GEOM_AISShape;
 class gp_Ax3;
-//class SALOME_Selection;
 
 class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer
 {
@@ -228,6 +230,7 @@ public:
 
   /* Update visibility and parameters of the currently selected field step's color scale */
   void UpdateColorScale( const bool theIsRedisplayFieldSteps = false, const bool updateViewer = true );
+  void SetUpdateColorScale(bool toUpdate) { myUpdateColorScale = toUpdate; } // IPAL54049
 
 protected:
   /* internal methods */
@@ -261,6 +264,7 @@ protected:
   void           updateShapeProperties( const Handle(GEOM_AISShape)&, bool );
   void           updateActorProperties( GEOM_Actor*, bool );
   void           updateDimensions( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
+  void           updateShapeAnnotations( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
 
   PropMap getObjectProperties( SalomeApp_Study*, const QString&, SALOME_View* = 0 );
   PropMap getDefaultPropertyMap();
@@ -273,6 +277,7 @@ protected:
                                   double& theFieldStepRangeMin,
                                   double& theFieldStepRangeMax );
 
+#if OCC_VERSION_MAJOR < 7
   // Note: the method is copied from Aspect_ColorScale class
   static Standard_Integer HueFromValue( const Standard_Integer aValue,
                                         const Standard_Integer aMin,
@@ -284,6 +289,7 @@ protected:
                                      const Standard_Real aMax,
                                      const Standard_Integer ColorsCount,
                                      Quantity_Color& aColor );
+#endif
 
 protected:
   Handle(SALOME_InteractiveObject) myIO;
@@ -298,6 +304,10 @@ protected:
   std::string                      myTexture;
   int                              myType;
   SALOME_View*                     myViewFrame;
+#if OCC_VERSION_MAJOR >= 7
+  Handle(AIS_ColorScale)           myColorScale;
+#endif
+  int                              myUpdateColorScale; // IPAL54049
 
   // Attributes
   Quantity_Color                   myShadingColor;
@@ -312,6 +322,7 @@ protected:
   Aspect_TypeOfMarker              myTypeOfMarker;
   double                           myScaleOfMarker;
   double                           myTransparency;
+  bool                             myIsRedisplayed;
 
 private:
   SalomeApp_Application* myApp;