Salome HOME
compilation SALOME 9.5, OCC 7.4
authorPaul RASCLE <paul.rascle@openfields.fr>
Sun, 28 Jun 2020 21:12:12 +0000 (23:12 +0200)
committerYOANN AUDOUIN <B61570@dsp0851742.postes.calibre.edf.fr>
Fri, 30 Oct 2020 16:08:09 +0000 (17:08 +0100)
12 files changed:
src/HYDROData/HYDROData_ShapesGroup.cxx
src/HYDROData/HYDROData_Transform.cxx
src/HYDROGUI/HYDROGUI_AISShape.cxx
src/HYDROGUI/HYDROGUI_BathymetrySelectionOp.cxx
src/HYDROGUI/HYDROGUI_MeasurementToolOp.cxx
src/HYDROGUI/HYDROGUI_OCCSelector.cxx
src/HYDROGUI/HYDROGUI_Polyline.cxx
src/HYDROGUI/HYDROGUI_Shape.cxx
src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx
src/HYDROGUI/HYDROGUI_SplitPolylinesOp.cxx
src/HYDROGUI/HYDROGUI_ZLayers.cxx
src/HYDRO_tests/TestViewer.cxx

index c0d0c7614ea2cccfdac2106f692a0a3c142cb265..0944f54589d7f1bb4e4cefdeeeb5b1e7eecc9ca2 100644 (file)
@@ -27,6 +27,7 @@
 #include <TopoDS.hxx>
 #include <TopoDS_Edge.hxx>
 
+#include <Precision.hxx>
 #include <TopTools_ListOfShape.hxx>
 #include <TopTools_ListIteratorOfListOfShape.hxx>
 #include <ShapeUpgrade_UnifySameDomain.hxx>
@@ -105,20 +106,20 @@ void HYDROData_ShapesGroup::GroupDefinition::Update( SeqOfGroupsDefs*
         const TopTools_ListOfShape& listModified = theAlgo->History()->Modified(aShape);
         if (listModified.Extent() > 0)
         {
-          aModifSh = listModified.First(); 
+          aModifSh = listModified.First();
           // Edge has been modified
           aShapesToAdd.Append( aModifSh );
           aGroupDef.Shapes.Remove( i );
-          --i;      
+          --i;
         }
         else if ( theAlgo->History()->IsRemoved(aShape) )
-        {    
+        {
           // Edge has been removed
           aGroupDef.Shapes.Remove( i );
           --i;
         }
-  
-      }      
+
+      }
    }
 
     HYDROData_ShapesTool::AddShapes( aGroupDef.Shapes, aShapesToAdd );
@@ -156,7 +157,7 @@ void HYDROData_ShapesGroup::GroupDefinition::Update( SeqOfGroupsDefs*
         aShapesToAdd.Append( aGeneratedByAlgo );
         aGroupDef.Shapes.Remove( i );
         --i;
-      }      
+      }
     }
 
     HYDROData_ShapesTool::AddShapes( aGroupDef.Shapes, aShapesToAdd );
@@ -246,7 +247,7 @@ void HYDROData_ShapesGroup::GetShapes( TopTools_SequenceOfShape& theShapes ) con
   TDF_ChildIDIterator aChildIt( aLabel, TNaming_NamedShape::GetID() );
   for ( ; aChildIt.More(); aChildIt.Next() )
   {
-    Handle(TNaming_NamedShape) aNamedShape = 
+    Handle(TNaming_NamedShape) aNamedShape =
       Handle(TNaming_NamedShape)::DownCast( aChildIt.Value() );
     if ( aNamedShape.IsNull() )
       continue;
index 5b01d0d4d154fbe743d001efff5b4603ada45893..3bf968c51f04f58559a445bdeb816afbd4207a31 100644 (file)
@@ -53,7 +53,7 @@ void HYDROData_Transform::SetFileName(const TCollection_AsciiString& theNameAfte
 }
 //=======================================================================
 //function : HYDROData_Transform
-//purpose  : 
+//purpose  :
 //=======================================================================
 HYDROData_Transform::HYDROData_Transform()
 :
@@ -69,7 +69,7 @@ HYDROData_Transform::HYDROData_Transform()
 }
 //=======================================================================
 //function : ~
-//purpose  : 
+//purpose  :
 //=======================================================================
 HYDROData_Transform::~HYDROData_Transform()
 {
@@ -77,7 +77,7 @@ HYDROData_Transform::~HYDROData_Transform()
 }
 //=======================================================================
 //function : Clear
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::Clear()
 {
@@ -96,11 +96,11 @@ void HYDROData_Transform::Clear()
     myBuilder=NULL;
   }
   //
-  BOPAlgo_BuilderShape::PrepareHistory();
+  //BOPAlgo_BuilderShape::PrepareHistory();
 }
 //=======================================================================
 //function : SetArgument
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::SetArgument(const TopoDS_Shape& theShape)
 {
@@ -108,7 +108,7 @@ void HYDROData_Transform::SetArgument(const TopoDS_Shape& theShape)
 }
 //=======================================================================
 //function : AddArgument
-//purpose  : 
+//purpose  :
 //=======================================================================
 const TopoDS_Shape& HYDROData_Transform::Argument()const
 {
@@ -116,7 +116,7 @@ const TopoDS_Shape& HYDROData_Transform::Argument()const
 }
 //=======================================================================
 //function : SetTreshold
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::SetTreshold(const Standard_Real theTreshold)
 {
@@ -124,15 +124,15 @@ void HYDROData_Transform::SetTreshold(const Standard_Real theTreshold)
 }
 //=======================================================================
 //function : Treshold
-//purpose  : 
+//purpose  :
 //=======================================================================
-Standard_Real HYDROData_Transform::Treshold()const 
+Standard_Real HYDROData_Transform::Treshold()const
 {
   return myTreshold;
 }
 //=======================================================================
 //function : SetToTransform
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::SetToTransform(const Standard_Boolean theFlag)
 {
@@ -140,7 +140,7 @@ void HYDROData_Transform::SetToTransform(const Standard_Boolean theFlag)
 }
 //=======================================================================
 //function : ToTransform
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean HYDROData_Transform::ToTransform()const
 {
@@ -148,7 +148,7 @@ Standard_Boolean HYDROData_Transform::ToTransform()const
 }
 //=======================================================================
 //function : CheckData
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::CheckData()
 {
@@ -158,7 +158,7 @@ void HYDROData_Transform::CheckData()
 }
 //=======================================================================
 //function : Prepare
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::Prepare()
 {
@@ -170,7 +170,7 @@ void HYDROData_Transform::Prepare()
 }
 //=======================================================================
 //function : Perform
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::Perform()
 {
@@ -205,13 +205,13 @@ void HYDROData_Transform::Perform()
 }
 //=======================================================================
 //function : Detect
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::Detect()
 {
   Standard_Real aXmin, aYmin, aZmin, aXmax, aYmax, aZmax;
   Standard_Real aXc, aYc, aZc;
-  Bnd_Box aBox; 
+  Bnd_Box aBox;
   gp_Vec aVec;
   //
   myErrorStatus=0;
@@ -226,11 +226,11 @@ void HYDROData_Transform::Detect()
   //printf(" aVc : { %lf %lf %lf }\n", aXc, aYc, aZc);
   //
   myToTransform=Standard_False;
-  if (fabs(aXc)>myTreshold || 
-      fabs(aYc)>myTreshold || 
+  if (fabs(aXc)>myTreshold ||
+      fabs(aYc)>myTreshold ||
       fabs(aZc)>myTreshold) {
     myToTransform=!myToTransform;
-  }  
+  }
   //
   aVec.SetCoord(-aXc, -aYc, -aZc);
   myTrsf1.SetTranslation(aVec);
@@ -240,7 +240,7 @@ void HYDROData_Transform::Detect()
 }
 //=======================================================================
 //function : ComputeTrsf
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::ComputeTrsf()
 {
@@ -253,10 +253,10 @@ void HYDROData_Transform::ComputeTrsf()
 }
 //=======================================================================
 //function : Transform1
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::Transform1()
-{ 
+{
   myErrorStatus=0;
   //
   if (myToTransform) {//pkv ft
@@ -275,7 +275,7 @@ void HYDROData_Transform::Transform1()
 }
 //=======================================================================
 //function : BuildFuse
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::BuildFuse()
 {
@@ -306,7 +306,7 @@ void HYDROData_Transform::BuildFuse()
   aPF.SetArguments(aLC);
   //
   aPF.Perform();
-  if (aPF.HasErrors()) 
+  if (aPF.HasErrors())
   {
     myErrorStatus=20;
     return;
@@ -329,7 +329,7 @@ void HYDROData_Transform::BuildFuse()
 }
 //=======================================================================
 //function : Transform2
-//purpose  : 
+//purpose  :
 //=======================================================================
 void HYDROData_Transform::Transform2()
 {
@@ -358,7 +358,7 @@ void HYDROData_Transform::Transform2()
 //
 //=======================================================================
 //function : Modified
-//purpose  : 
+//purpose  :
 //=======================================================================
 const TopTools_ListOfShape& HYDROData_Transform::Modified
   (const TopoDS_Shape& aS)
@@ -403,7 +403,7 @@ const TopTools_ListOfShape& HYDROData_Transform::Modified
 }
 //=======================================================================
 //function : Generated
-//purpose  : 
+//purpose  :
 //=======================================================================
 const TopTools_ListOfShape& HYDROData_Transform::Generated
   (const TopoDS_Shape& aS)
@@ -447,7 +447,7 @@ const TopTools_ListOfShape& HYDROData_Transform::Generated
 }
 //=======================================================================
 //function : IsDeleted
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean HYDROData_Transform::IsDeleted(const TopoDS_Shape& aS)
 {
@@ -467,7 +467,7 @@ Standard_Boolean HYDROData_Transform::IsDeleted(const TopoDS_Shape& aS)
 }
 //=======================================================================
 //function : HasDeleted
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean HYDROData_Transform::HasDeleted()
 {
@@ -475,7 +475,7 @@ Standard_Boolean HYDROData_Transform::HasDeleted()
 }
 //=======================================================================
 //function : HasGenerated
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean HYDROData_Transform::HasGenerated()
 {
@@ -483,7 +483,7 @@ Standard_Boolean HYDROData_Transform::HasGenerated()
 }
 //=======================================================================
 //function : HasModified
-//purpose  : 
+//purpose  :
 //=======================================================================
 Standard_Boolean HYDROData_Transform::HasModified()
 {
index e714a2e68b31d88c3c0e5070151ce69f66842bd3..d3a160e0b56dd411ab2b0be64c467fcb637b1aaf 100644 (file)
@@ -17,6 +17,7 @@
 //
 
 #include <HYDROGUI_AISShape.h>
+#include <PrsMgr_PresentationManager.hxx>
 #include <AIS_DisplayMode.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
@@ -46,7 +47,7 @@ void HYDROGUI_AISShape::SetBorderColor( const Quantity_Color& theBorderColor )
 }
 
 void HYDROGUI_AISShape::Compute( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
-                                 const Handle(Prs3d_Presentation)& thePresentation, 
+                                 const Handle(Prs3d_Presentation)& thePresentation,
                                  const Standard_Integer theMode )
 {
   thePresentation->Clear();
index dd5fb3cf0faeec51bdbb8ffbc704afde292179a3..e9ec399b97124cc10c3469318109bff6b15b333a 100644 (file)
@@ -99,7 +99,7 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
   if( isActive )
   {
     const int aSelectionMode = 1;
-    ctx->OpenLocalContext( Standard_True );
+    //ctx->OpenLocalContext( Standard_True );
     foreach( Handle(HYDROGUI_BathymetryPrs) bath, baths )
     {
       ctx->Activate( bath, aSelectionMode, Standard_True );
@@ -116,7 +116,7 @@ void HYDROGUI_BathymetrySelectionOp::activateSelection( bool isActive )
       bath->GetShape()->TextLabels( false );
       ctx->Deactivate( bath );
     }
-    ctx->CloseLocalContext( -1, Standard_True );
+    //ctx->CloseLocalContext( -1, Standard_True );
   }
 
   myIsActive = isActive;
index e03abebf5accf5cbf005da1a71064d96bc5d2bb7..73a2bd6e7d24a41c83bc18bde41b803dfb0d756f 100644 (file)
@@ -82,7 +82,7 @@ void HYDROGUI_MeasurementToolOp::startOperation()
   myMeasDlg = new HYDROGUI_MeasurementToolDlg( module()->getApp()->desktop() );
   myMeasDlg->setModal( false );
   myMeasDlg->setWindowTitle(getName());
-  myMeasDlg->show(); 
+  myMeasDlg->show();
 
   //Tool: draw a distance line
   LightApp_Application* anApp = module()->getApp();
@@ -97,9 +97,9 @@ void HYDROGUI_MeasurementToolOp::startOperation()
 
   OCCViewer_Viewer* aViewer = aViewManager->getOCCViewer();
 
-  disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+  disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
     aViewer, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
-  connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+  connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
     this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
 
   //polyline names
@@ -150,7 +150,7 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
 
   Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
   if ( aCtx.IsNull() )
-    return;  
+    return;
 
   gp_Pnt aPnt = CurveCreator_Utils::ConvertClickToPoint( theEvent->x(), theEvent->y(), aView );
 
@@ -162,10 +162,10 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
     {
       myLineMaker = new BRepLib_MakePolygon();
       myLineMaker->Add(aPnt);
-      aRes = myLineMaker->FirstVertex(); 
+      aRes = myLineMaker->FirstVertex();
     }
     else
-    {   
+    {
       myLineMaker->Add(aPnt);
       aRes = myLineMaker->Shape();
       const TopoDS_Edge& aLE = myLineMaker->Edge();
@@ -178,8 +178,8 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
 
     if ( !myAISLineM.IsNull() )
     {
-      if ( aCtx->HasOpenedContext() )
-        aCtx->CloseLocalContext();
+//       if ( aCtx->HasOpenedContext() )
+//         aCtx->CloseLocalContext();
       aCtx->Erase( myAISLineM, Standard_False );
     }
   }
@@ -203,7 +203,7 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
         continue;
       TopExp_Explorer expW(W, TopAbs_EDGE);
       if (!expW.More())
-        continue;      
+        continue;
       TopoDS_Edge E = TopoDS::Edge(expW.Current());
       expW.Next();
       if (expW.More())
@@ -224,7 +224,7 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
             params.push_back(aKnots(i));
         }
       }
-      //in some cases, extrema gives inaccurate result -> 
+      //in some cases, extrema gives inaccurate result ->
       //split bspline by knot params and try to find minimum distance
       //on each interval
       std::sort(params.begin(), params.end());
@@ -248,9 +248,9 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
           double WinDiagDist = sqrt ((double)aWinSX*(double)aWinSX + (double)aWinSY*(double)aWinSY);
           if (fdist <= prec || pd / WinDiagDist < 0.08)
           {
-            if (fdist < fdist_min) 
+            if (fdist < fdist_min)
             {
-              fdist_min = fdist;           
+              fdist_min = fdist;
               minWire = W;
               minU = aProj.LowerDistanceParameter();
               minC.Initialize(E);
@@ -272,8 +272,8 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
       {
         if (myFW.IsSame(minWire))
         {
-          //calc distance on current curve 
-          double LenAlongCurv = GCPnts_AbscissaPoint::Length(minC, myFu, minU);          
+          //calc distance on current curve
+          double LenAlongCurv = GCPnts_AbscissaPoint::Length(minC, myFu, minU);
           myFW = TopoDS_Wire();
           if (!BRep_Tool::IsClosed(minWire))
           {
@@ -317,12 +317,12 @@ void HYDROGUI_MeasurementToolOp::onMousePress(SUIT_ViewWindow* theWindow, QMouse
   //anAspect->SetTypeOfMarker(Aspect_TOM_RING1);
   //anAspect->SetColor(Quantity_NOC_BLACK);
   //mySplitPointPreview->Attributes()->SetPointAspect( anAspect );
-  
+
   aCtx->SetZLayer(myAISLineM, Graphic3d_ZLayerId_Topmost);
 
-  if ( aCtx->HasOpenedContext() )
-    aCtx->CloseLocalContext();
-  aCtx->Display( myAISLineM, Standard_False );  
+//   if ( aCtx->HasOpenedContext() )
+//     aCtx->CloseLocalContext();
+  aCtx->Display( myAISLineM, Standard_False );
   aCtx->UpdateCurrentViewer();
 }
 
@@ -338,13 +338,13 @@ void HYDROGUI_MeasurementToolOp::eraseLine()
         Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
         if ( !aCtx.IsNull() )
         {
-          if ( aCtx->HasOpenedContext() )
-            aCtx->CloseLocalContext();
+//           if ( aCtx->HasOpenedContext() )
+//             aCtx->CloseLocalContext();
           aCtx->Erase( myAISLineM, Standard_False );
         }
         myAISLineM.Nullify();
         aCtx->UpdateCurrentViewer();
-      }      
+      }
     }
   }
 }
@@ -363,10 +363,10 @@ void HYDROGUI_MeasurementToolOp::onExit()
 
   if (aViewManager && aViewer)
   {
-    disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+    disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
       this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
 
-    connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+    connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
       aViewManager->getOCCViewer(), SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
   }
 
index edd6effe38b9dd59a7e0596beaa675a48bfff421..8f189c57d653d5443873c1238fc3c847c7c50ed0 100644 (file)
@@ -48,21 +48,21 @@ void HYDROGUI_OCCSelector::getSelection( SUIT_DataOwnerPtrList& aList ) const
     return;
 
   Handle(AIS_InteractiveContext) aContext = aViewer->getAISContext();
-  bool isLocalContext = aContext->HasOpenedContext();
+  //bool isLocalContext = aContext->HasOpenedContext();
 
   AIS_ListOfInteractive aSelList;
   aViewer->getSelectedObjects( aSelList );
   for ( AIS_ListIteratorOfListOfInteractive anIt( aSelList ); anIt.More(); anIt.Next() )
     if ( !anIt.Value().IsNull() )
     {
-      if ( !isLocalContext ) {
+      //if ( !isLocalContext ) {
         QString anEntry = entry( anIt.Value() );
         if ( !anEntry.isEmpty() ) {
           aList.append( SUIT_DataOwnerPtr( new LightApp_DataOwner( entry( anIt.Value() ) ) ) );
         } else {
           aList.append( SUIT_DataOwnerPtr( new HYDROGUI_DataOwner( anIt.Value() ) ) );
         }
-      }
+      //}
     }
   // add externally selected objects
   SUIT_DataOwnerPtrList::const_iterator anExtIter;
@@ -80,7 +80,7 @@ void HYDROGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
   int aViewerId = (size_t)aViewer;
 
   Handle(AIS_InteractiveContext) aContext = aViewer->getAISContext();
-  if ( aContext.IsNull() || aContext->HasOpenedContext() ) {
+  if ( aContext.IsNull() ) {
     return;
   }
 
@@ -96,7 +96,7 @@ void HYDROGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
     if ( !entryStr.isEmpty() )
       aDisplayed.insert( entryStr, it.Value() );
   }*/
-  
+
   mySelectedExternals.clear();
 
   for ( SUIT_DataOwnerPtrList::const_iterator itr = aList.begin(); itr != aList.end(); ++itr )
@@ -124,7 +124,7 @@ void HYDROGUI_OCCSelector::setSelection( const SUIT_DataOwnerPtrList& aList )
         mySelectedExternals.append(*itr);
     }
   }
+
   aViewer->unHighlightAll( false );
   aViewer->setObjectsSelected( aSelList );
 }
@@ -136,7 +136,7 @@ QString HYDROGUI_OCCSelector::entry( const Handle(AIS_InteractiveObject)& anAIS
   if ( anAIS.IsNull() || !anAIS->HasOwner() )
     return aRes;
 
-  Handle(HYDROData_Entity) anObj = 
+  Handle(HYDROData_Entity) anObj =
     Handle(HYDROData_Entity)::DownCast( anAIS->GetOwner() );
   if ( !anObj.IsNull() )
     aRes = HYDROGUI_DataObject::dataObjectEntry( anObj );
index 0119af16d3f9341e11ac1721549001fb5a3bee3d..7943f33995b0040d9095682cc8bff97ffa59690f 100644 (file)
@@ -38,7 +38,7 @@ IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape)
 
 HYDROGUI_Polyline::HYDROGUI_Polyline(const TopoDS_Shape& shape)
   : AIS_Shape(shape)
-{ 
+{
 }
 
 HYDROGUI_Polyline::~HYDROGUI_Polyline()
@@ -81,16 +81,15 @@ bool HYDROGUI_Polyline::GetColorOfSubShape(const TopoDS_Shape& SubShape, Quantit
 void HYDROGUI_Polyline::Compute(const Handle(PrsMgr_PresentationManager3d)& aPresentationManager,
                             const Handle(Prs3d_Presentation)& aPrs,
                             const Standard_Integer aMode)
-{  
+{
   //AIS_Shape::Compute(aPresentationManager, aPrs, aMode);
   // return;
 
   aPrs->Clear();
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs );
-  Quantity_Color aColor;
-  Aspect_TypeOfLine aType;
-  Standard_Real anWidth;
-  Attributes()->LineAspect()->Aspect()->Values( aColor, aType, anWidth );
+  Quantity_Color aColor = Attributes()->LineAspect()->Aspect()->Color();
+  Aspect_TypeOfLine aType = Attributes()->LineAspect()->Aspect()->Type();
+  Standard_Real anWidth = Attributes()->LineAspect()->Aspect()->Width();
   anWidth =2;
   Handle(Graphic3d_AspectLine3d) anAspect = new Graphic3d_AspectLine3d( aColor, aType, anWidth );
 
@@ -143,7 +142,7 @@ QList<Handle(AIS_InteractiveObject)> HYDROGUI_Polyline::createPresentations
   for ( ; Exp.More(); Exp.Next() )
   {
     TopoDS_Edge anEdge = TopoDS::Edge(Exp.Current());
-    if ( !anEdge.IsNull() ) 
+    if ( !anEdge.IsNull() )
     {
       Handle(HYDROGUI_Arrow) arrow = new HYDROGUI_Arrow( anEdge, aMPoly );
       if( theType>=0 )
@@ -224,7 +223,7 @@ void HYDROGUI_Arrow::Compute( const Handle(PrsMgr_PresentationManager3d)& aPrese
   aPrs->Clear();
   if( myType==None )
     return;
-  
+
   TopoDS_Edge anEdge = TopoDS::Edge( myshape );
   if( anEdge.IsNull() )
     return;
@@ -267,10 +266,9 @@ void HYDROGUI_Arrow::Compute( const Handle(PrsMgr_PresentationManager3d)& aPrese
   }
 
   Handle(Graphic3d_Group) aGroup = Prs3d_Root::CurrentGroup( aPrs );
-  Quantity_Color aColor;
-  Aspect_TypeOfLine aType;
-  Standard_Real anWidth;
-  Attributes()->LineAspect()->Aspect()->Values( aColor, aType, anWidth );
+  Quantity_Color aColor = Attributes()->LineAspect()->Aspect()->Color();
+  Aspect_TypeOfLine aType = Attributes()->LineAspect()->Aspect()->Type();
+  Standard_Real anWidth = Attributes()->LineAspect()->Aspect()->Width();
   anWidth = 1;
 
   const Handle(HYDROGUI_Polyline)& aParentPoly = getParentPolyline();
index f180a82a913b651cc71dc7244eeec81a52231dbb..6ce0e1a1fb11fceb9710958a9a1a3814c4e4f3ac 100644 (file)
@@ -133,7 +133,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
   if ( !myObject.IsNull() )
   {
     Handle(HYDROData_Document) aDocument = HYDROData_Document::Document();
-  
+
     if ( myObject->IsKind( STANDARD_TYPE(HYDROData_ImmersibleZone) ) )
     {
       Handle(HYDROData_ImmersibleZone) aZoneObj =
@@ -172,7 +172,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
         if ( aPolylineShape.ShapeType() == TopAbs_WIRE )
         {
           TopoDS_Wire aPolylineWire = TopoDS::Wire( aPolylineShape );
-          setWire( aPolylineWire, false, false );  
+          setWire( aPolylineWire, false, false );
         }
         else
         {
@@ -195,7 +195,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
         QColor aColor;
         aPolyline->GetSectionColor(i, aColor);
         aSectColors.push_back(aColor);
-      }         
+      }
 
       //
       //setBorderColor( aWireColor, false, false );
@@ -215,7 +215,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
               for (int i=0;i<nbSec;i++)
               {
                 const TopoDS_Shape& CW = MW(i+1);
-                Quantity_Color aFColor( getQuantityColorVal( aSectColors[i].red() ), 
+                Quantity_Color aFColor( getQuantityColorVal( aSectColors[i].red() ),
                   getQuantityColorVal( aSectColors[i].green() ),
                   getQuantityColorVal( aSectColors[i].blue() ),
                   Quantity_TOC_RGB );
@@ -224,9 +224,9 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
             }
           }
         }
-      }    
+      }
 
-      //if ( theToDisplay && isVisible() && !myContext.IsNull() )  
+      //if ( theToDisplay && isVisible() && !myContext.IsNull() )
       //  displayShape( false );
     }
     else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_Polyline3D) ) )
@@ -239,7 +239,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
       if ( !aPolylineShape.IsNull() ) {
         if ( aPolylineShape.ShapeType() == TopAbs_WIRE ) {
           TopoDS_Wire aPolylineWire = TopoDS::Wire( aPolylineShape );
-          setWire( aPolylineWire, false, false );  
+          setWire( aPolylineWire, false, false );
         } else {
           myTopoShape = aPolylineShape;
           // Set shading mode to avoid that hilight presentation is equal to "normal" object presentation.
@@ -283,13 +283,13 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
       if ( aProfile->IsValid() ) {
         TopoDS_Shape aProfileShape = aProfile->GetShape3D();
 
-        if ( !aProfileShape.IsNull() && 
+        if ( !aProfileShape.IsNull() &&
              aProfileShape.ShapeType() == TopAbs_WIRE ) {
           aProfileWire = TopoDS::Wire( aProfileShape );
         }
       }
 
-      setWire( aProfileWire, false, false );  
+      setWire( aProfileWire, false, false );
 
       QColor aWireColor = aProfile->GetBorderColor();
       setBorderColor( aWireColor, false, false );
@@ -343,21 +343,21 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
         aCompoundBuilder.Add( aCompound, aShape );
       }
 
-      setShape( aCompound, false, false );  
+      setShape( aCompound, false, false );
     }
     else if ( myObject->IsKind( STANDARD_TYPE(HYDROData_BCPolygon) ) )
     {
       Handle(HYDROData_BCPolygon) aBCObj = Handle(HYDROData_BCPolygon)::DownCast( myObject );
 
       TopoDS_Shape aBCShape = aBCObj->GetTopShape();
-      if ( !aBCShape.IsNull() ) 
+      if ( !aBCShape.IsNull() )
       {
-        if ( aBCShape.ShapeType() == TopAbs_FACE ) 
+        if ( aBCShape.ShapeType() == TopAbs_FACE )
         {
           TopoDS_Face aBCFace = TopoDS::Face( aBCShape );
           setFace( aBCFace, false, false, "" );
-        } 
-        else 
+        }
+        else
         {
           myTopoShape = aBCShape;
           myDisplayMode = AIS_Shaded;
@@ -375,7 +375,7 @@ void HYDROGUI_Shape::update( bool isUpdateViewer,
     }
 
   }
+
   if ( myShapes.empty() || !isVisible() )
     return;
 
@@ -522,7 +522,7 @@ QColor HYDROGUI_Shape::getFillingColor() const
 void HYDROGUI_Shape::setBorderColor( const QColor& theColor,
                                      const bool    theToDisplay,
                                      const bool    theIsUpdateViewer )
-{ 
+{
   myBorderColor = theColor;
   updateShape( theToDisplay, theIsUpdateViewer );
 }
@@ -636,7 +636,7 @@ void HYDROGUI_Shape::buildShape()
         anIsoAspect->SetNumber( 0 );
         anAttributes->SetUIsoAspect( anIsoAspect );
       }
-      
+
       anIsoAspect = anAttributes->VIsoAspect();
       if ( !anIsoAspect.IsNull() )
       {
@@ -666,33 +666,33 @@ void HYDROGUI_Shape::updateShape( const bool theToDisplay,
     {
       if ( myDisplayMode == AIS_Shaded && myFillingColor.isValid() )
       {
-        Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ), 
+        Quantity_Color aFillingColor( getQuantityColorVal( myFillingColor.red() ),
                                       getQuantityColorVal( myFillingColor.green() ),
                                       getQuantityColorVal( myFillingColor.blue() ),
                                       Quantity_TOC_RGB );
-  
+
         aShape->SetColor( aFillingColor );
         aShape->SetTransparency( 1 - getQuantityColorVal( myFillingColor.alpha() ) );
       }
       else if ( myDisplayMode == AIS_WireFrame )
       {
       }
-  
+
       // Coloring borders
     }
   }
-  
+
   colorShapeBorder( myBorderColor );
   if ( !theToDisplay || !isVisible() || myContext.IsNull() )
     return;
-  
+
   displayShape( theIsUpdateViewer );
 }
 
 void HYDROGUI_Shape::displayShape( const bool theIsUpdateViewer )
 {
-  if ( myContext->HasOpenedContext() && mySelectionMode > 0 )
-    myContext->CloseLocalContext();
+//   if ( myContext->HasOpenedContext() && mySelectionMode > 0 )
+//     myContext->CloseLocalContext();
 
   foreach( Handle(AIS_InteractiveObject) aShape, myShapes )
   {
@@ -701,18 +701,18 @@ void HYDROGUI_Shape::displayShape( const bool theIsUpdateViewer )
       myContext->Display( aShape, myDisplayMode, mySelectionMode, Standard_False, Standard_False );
     else
     {
-      if ( !myContext->HasOpenedContext() )
-        // Ordinary display of object published in the Object Browser
-        myContext->Display( aShape, Standard_False );
-      else
+//       if ( !myContext->HasOpenedContext() )
+//         Ordinary display of object published in the Object Browser
+//         myContext->Display( aShape, Standard_False );
+//       else
         // Display object in local context without selection
         myContext->Display( aShape, myDisplayMode, -1, Standard_False, Standard_False );
     }
   }
-  
+
   if ( mySelectionMode > 0 )
   {
-    myContext->OpenLocalContext();
+    //myContext->OpenLocalContext();
     foreach( Handle(AIS_InteractiveObject) aShape, myShapes )
       myContext->Activate( aShape, mySelectionMode, Standard_True );
   }
@@ -730,8 +730,8 @@ void HYDROGUI_Shape::displayShape( const bool theIsUpdateViewer )
 
 void HYDROGUI_Shape::eraseShape( const bool theIsUpdateViewer )
 {
-  if ( myContext->HasOpenedContext() && mySelectionMode > 0 )
-    myContext->CloseLocalContext();
+//   if ( myContext->HasOpenedContext() && mySelectionMode > 0 )
+//     myContext->CloseLocalContext();
 
   foreach( Handle(AIS_InteractiveObject) aShape, myShapes )
     myContext->Erase( aShape, Standard_False );
@@ -758,11 +758,11 @@ void HYDROGUI_Shape::colorShapeBorder( const QColor& theColor )
     if ( anAttributes.IsNull() )
       continue;
 
-    Quantity_Color aBorderColor( getQuantityColorVal( theColor.red() ), 
+    Quantity_Color aBorderColor( getQuantityColorVal( theColor.red() ),
                                  getQuantityColorVal( theColor.green() ),
                                  getQuantityColorVal( theColor.blue() ),
                                  Quantity_TOC_RGB );
-  
+
     if( !myTopoShape.IsNull() )
     {
       if ( myTopoShape.ShapeType() == TopAbs_WIRE ) // Note that we display polylines in shaded mode
index b3d390141093fd35b134e305d1bd9d1d8c234022..105d13290396cecd1a89e71b9ecc5a2705915bd9 100644 (file)
@@ -173,7 +173,7 @@ void HYDROGUI_ShapeBathymetry::GetRange( double& theMin, double& theMax ) const
 {
   if( !myRangeInitialized )
   {
-    HYDROGUI_ShapeBathymetry* that = 
+    HYDROGUI_ShapeBathymetry* that =
       const_cast<HYDROGUI_ShapeBathymetry*>( this );
     that->RescaleDefault();
     that->myRangeInitialized = true;
@@ -235,17 +235,13 @@ QVector<int> HYDROGUI_ShapeBathymetry::selected() const
   Handle(AIS_InteractiveContext) c = getContext();
   if( !c.IsNull() )
   {
-    Handle(AIS_LocalContext) lc = c->LocalContext();
-    if( !lc.IsNull() )
-    {
-      for( lc->InitSelected(); lc->MoreSelected(); lc->NextSelected() )
+      for( c->InitSelected(); c->MoreSelected(); c->NextSelected() )
       {
-        Handle(HYDROGUI_BathymetryPointOwner) anOwner = 
-          Handle(HYDROGUI_BathymetryPointOwner)::DownCast( lc->SelectedOwner() );
+        Handle(HYDROGUI_BathymetryPointOwner) anOwner =
+          Handle(HYDROGUI_BathymetryPointOwner)::DownCast( c->SelectedOwner() );
         if( !anOwner.IsNull() && anOwner->Selectable()==obj )
           selected.append( anOwner->GetIndex() );
       }
-    }
   }
   return selected;
 }
index 439af525d241b750406b745d50a5047f23d6d000..d6aa45b50614e0d6c2278d7778a3f41006785b13 100644 (file)
@@ -58,7 +58,7 @@ void HYDROGUI_SplitPolylinesOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
 
-  HYDROGUI_SplitPolylinesDlg* aPanel = 
+  HYDROGUI_SplitPolylinesDlg* aPanel =
     ::qobject_cast<HYDROGUI_SplitPolylinesDlg*>( inputPanel() );
   if ( !aPanel )
     return;
@@ -120,7 +120,7 @@ bool HYDROGUI_SplitPolylinesOp::processApply( int& theUpdateFlags,
     anOp.Split( doc(), aPolylinesList, aTolerance );
     break;
   }
-  
+
   theUpdateFlags = UF_Model | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
   return true;
 }
@@ -145,7 +145,7 @@ void HYDROGUI_SplitPolylinesOp::erasePreview()
     myPreviewPrs = 0;
   }
 
-  HYDROGUI_SplitPolylinesDlg* aPanel = 
+  HYDROGUI_SplitPolylinesDlg* aPanel =
     ::qobject_cast<HYDROGUI_SplitPolylinesDlg*>( inputPanel() );
   if ( !aPanel )
     return;
@@ -160,18 +160,18 @@ void HYDROGUI_SplitPolylinesOp::erasePreview()
         Handle(AIS_InteractiveContext) aCtx = aViewer->getAISContext();
         if ( !aCtx.IsNull() )
         {
-          if ( aCtx->HasOpenedContext() )
-            aCtx->CloseLocalContext();
+//           if ( aCtx->HasOpenedContext() )
+//             aCtx->CloseLocalContext();
           aCtx->Erase( mySplitPointPreview, Standard_False );
         }
         mySplitPointPreview = 0;
       }
-      
+
       if ( aPanel->GetMode() == HYDROGUI_SplitPolylinesDlg::ByPoint )
       {
-        disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+        disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
           this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
-        connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+        connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
           aViewer, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
       }
     }
@@ -198,15 +198,15 @@ void HYDROGUI_SplitPolylinesOp::OnUpdatePreview()
 
         if ( mySplitPointPreview )
         {
-          if ( aCtx->HasOpenedContext() )
-            aCtx->CloseLocalContext();
+//           if ( aCtx->HasOpenedContext() )
+//             aCtx->CloseLocalContext();
           if ( aPanel->GetMode() == HYDROGUI_SplitPolylinesDlg::ByPoint )
           {
             if ( !aCtx->IsDisplayed( mySplitPointPreview ) )
               aCtx->Display( mySplitPointPreview, Standard_False );
           }
           else
-            aCtx->Erase( mySplitPointPreview, Standard_False );  
+            aCtx->Erase( mySplitPointPreview, Standard_False );
         }
 
         aCtx->ClearSelected(true);
@@ -214,16 +214,16 @@ void HYDROGUI_SplitPolylinesOp::OnUpdatePreview()
 
       if ( aPanel->GetMode() == HYDROGUI_SplitPolylinesDlg::ByPoint )
       {
-        disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+        disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
           aViewer, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
-        connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+        connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
           this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
       }
       else
       {
-        disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+        disconnect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
           this, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
-        connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)), 
+        connect(aViewManager, SIGNAL(mousePress(SUIT_ViewWindow*, QMouseEvent*)),
           aViewer, SLOT(onMousePress(SUIT_ViewWindow*, QMouseEvent*)));
       }
     }
@@ -303,18 +303,18 @@ void HYDROGUI_SplitPolylinesOp::onMousePress(SUIT_ViewWindow* theWindow, QMouseE
   TopoDS_Compound aShape;
   aBuilder.MakeCompound(aShape);
   aBuilder.Add(aShape, BRepBuilderAPI_MakeVertex( aPnt ) );
-  
+
   if ( mySplitPointPreview )
   {
-    if ( aCtx->HasOpenedContext() )
-      aCtx->CloseLocalContext();
+//     if ( aCtx->HasOpenedContext() )
+//       aCtx->CloseLocalContext();
     aCtx->Erase( mySplitPointPreview, Standard_False );
   }
 
   mySplitPointPreview = new AIS_Shape( aShape );
-  if ( aCtx->HasOpenedContext() )
-    aCtx->CloseLocalContext();
+//   if ( aCtx->HasOpenedContext() )
+//     aCtx->CloseLocalContext();
   aCtx->Display( mySplitPointPreview, Standard_False );
-  
+
   aCtx->UpdateCurrentViewer();
 }
index 4cd49e8b055dd0218ae9cd15150ed444e1c372be..1d7ca6677c109ee8ee8497a9d48b24db48587810 100644 (file)
@@ -18,7 +18,7 @@
 
 #include <HYDROGUI_ZLayers.h>
 #include <PrsMgr_PresentableObject.hxx>
-#include <PrsMgr_ModedPresentation.hxx>
+#include <PrsMgr_Presentations.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
 
 void SetZLayerForPrs( const Handle(PrsMgr_Presentation)& thePrs, int theLayerId );
@@ -29,8 +29,8 @@ void SetPrsZLayer( const Handle(PrsMgr_PresentableObject)& thePresentableObject,
   PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
   for (Standard_Integer aIdx = 1; aIdx <= aPresentations.Length (); aIdx++)
   {
-    Handle(PrsMgr_Presentation) aPrs = aPresentations (aIdx).Presentation ();
-    if ( aPresentations (aIdx).Mode() == theMode )
+    Handle(PrsMgr_Presentation) aPrs = aPresentations (aIdx);
+    if ( aPrs->Mode() == theMode )
     {
       SetZLayerForPrs( aPrs, theLayerId );
     }
@@ -91,7 +91,7 @@ void HYDROGUI_ZLayersIterator::Init( const Handle(V3d_Viewer)& theViewer )
 {
   TColStd_SequenceOfInteger anExistingZLayers;
   theViewer->GetAllZLayers( anExistingZLayers );
-  
+
   int n = anExistingZLayers.Length();
   for( int i=1; i<=n; i++ ) {
     int aLayerId = anExistingZLayers( i );
@@ -112,7 +112,7 @@ void HYDROGUI_ZLayersIterator::Next()
 {
   myIndex++;
 
-  if( myIndex >= (int)myZLayers.size() && 
+  if( myIndex >= (int)myZLayers.size() &&
       !myViewer.IsNull() ) {
     myNewZLayer = CreateTopZLayer( myViewer );
   }
index 3f886a5c025c8f8ac29d17457dead53007e7967c..c4219ae2d51167a9176153074562f0afa1fe441e 100644 (file)
@@ -102,12 +102,12 @@ QColor TestViewer::GetColor(int i)
   static QVector<QColor> aCV;
   if( aCV.isEmpty() )
   {
-    aCV  << QColor(0,0,255) 
+    aCV  << QColor(0,0,255)
          << QColor(0,255,0)
          << QColor(255,0,0)
-         << QColor(255,255,20) 
-         << QColor(20,255,255) 
-         << QColor(100,100,20) 
+         << QColor(255,255,20)
+         << QColor(20,255,255)
+         << QColor(100,100,20)
          << QColor(10,100,150);
   }
   if (i < aCV.size())
@@ -115,8 +115,8 @@ QColor TestViewer::GetColor(int i)
   else
   {
     QColor TestColor = aCV[i % aCV.size()];
-    QColor NewColor((TestColor.red() + i * 41) % 256, 
-      (TestColor.green() + i * 13) % 256, 
+    QColor NewColor((TestColor.red() + i * 41) % 256,
+      (TestColor.green() + i * 13) % 256,
       (TestColor.blue() + i * 23) % 256);
     return NewColor;
   }
@@ -124,10 +124,10 @@ QColor TestViewer::GetColor(int i)
 
 void TestViewer::eraseAll( bool isUpdate, bool eraseStructures )
 {
-  context()->CloseLocalContext( -1, Standard_False );
+  //context()->CloseLocalContext( -1, Standard_False );
   context()->EraseAll( isUpdate );
   if( eraseStructures )
-  {    
+  {
     Graphic3d_MapOfStructure GmapS;
     viewer()->getViewer3d()->StructureManager()->DisplayedStructures(GmapS);
     for (Graphic3d_MapOfStructure::Iterator it(GmapS); it.More(); it.Next())
@@ -149,10 +149,10 @@ void TestViewer::show( const Handle(AIS_InteractiveObject)& theObject,
     myKey = aNewKey;
     eraseAll( false, true );
   }
-  
+
   if( theSelectionMode > 0 )
   {
-    context()->OpenLocalContext();
+    //context()->OpenLocalContext();
     context()->Display( theObject, theMode, theSelectionMode, true );
     context()->Activate( theObject, theSelectionMode, Standard_True );
   }
@@ -173,7 +173,7 @@ void TestViewer::show( const TopoDS_Shape& theShape, int theMode, bool isFitAll,
   int theUIANb, int theVIANb)
 {
   Handle(AIS_Shape) aShape = new AIS_Shape( theShape );
-  cout <<theShape;
+  std::cout <<theShape;
   if( theShape.ShapeType()==TopAbs_VERTEX )
     aShape->Attributes()->PointAspect()->SetTypeOfMarker( Aspect_TOM_X );
   if (theShape.ShapeType()==TopAbs_FACE)
@@ -318,7 +318,7 @@ bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, cons
 
   QString anExpectedRefFilePath = REF_DATA_PATH;
   anExpectedRefFilePath += "/" + myKey + ".png";
-  QImage anExpectedRefImage; 
+  QImage anExpectedRefImage;
   anExpectedRefImage.load( anExpectedRefFilePath );
   //std::cout << "Expected image loading: " << anExpectedRefFilePath.toStdString() << std::endl;
 
@@ -331,10 +331,10 @@ bool TestViewer::AssertImages( QString& theMessage, const QImage* theImage, cons
   QString aPath = TMP_DIR + "/" + myKey + ".png";
   anActualImage.save( aPath );
   //std::cout << "Actual image: " << aPath.toStdString() << std::endl;
-  
+
   //std::cout << anActualImage.width() << "x" << anActualImage.height() << std::endl;
   theMessage = "The viewer contents does not correspond to the reference image: " + myKey;
-  
+
   QImage aDiff = diff( anExpectedRefImage, anActualImage );
 
   QString aDiffFilePath = TMP_DIR + "/" + myKey + "_diff.png";
@@ -424,7 +424,7 @@ bool TestViewer::areScriptsEqual( const QString& theBaseName,
 {
   QString anExpectedRefFilePath = REF_DATA_PATH;
   anExpectedRefFilePath += "/" + theBaseName;
-  
+
   QString anActualFilePath = TMP_DIR + "/" + theBaseName;
 
   QFile anExpected( anExpectedRefFilePath );
@@ -455,7 +455,7 @@ bool TestViewer::areScriptsEqual( const QString& theBaseName,
       theMsg = QString( "line %1\nActual: %2\nExpected: %3" ).arg( i ).arg( anActualLine ).arg( anExpectedLine );
     i++;
   }
-  
+
   while( !anActual.atEnd() && isEqual )
   {
     QString anActualLine = GetLine( anActual, isActualUtf8 );