Salome HOME
Remove obsolete OCC_VERSION_LARGE defines.
authorimn <imn@opencascade.com>
Fri, 8 Aug 2014 12:05:35 +0000 (16:05 +0400)
committervsr <vsr@opencascade.com>
Fri, 26 Sep 2014 08:38:13 +0000 (12:38 +0400)
12 files changed:
src/CAF/CAF_Study.cxx
src/DDS/DDS_Dictionary.cxx
src/LightApp/LightApp_Application.cxx
src/OBJECT/SALOME_DataMapOfIOMapOfInteger.hxx
src/OCCViewer/OCCViewer_CubeAxesDlg.cxx
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewModel.h
src/OCCViewer/OCCViewer_ViewPort3d.cxx
src/OCCViewer/OCCViewer_ViewWindow.cxx
src/SOCC/SOCC_ViewModel.cxx
src/SalomeApp/SalomeApp_ExceptionHandler.cxx
src/Session/SALOME_Session_Server.cxx

index d8cfa68b468e87f1ea8f3ca1a5ac4c255d575c9b..0b60a95fda03f699e000f94fcb53f529a18e3ee5 100755 (executable)
@@ -108,9 +108,7 @@ bool CAF_Study::createDocument( const QString& doc )
   if ( res && app && !app->stdApp().IsNull() )
   {
     try {
-#if OCC_VERSION_LARGE > 0x06010000
       OCC_CATCH_SIGNALS;
-#endif
       TColStd_SequenceOfExtendedString formats;
       app->stdApp()->Formats( formats );
       if ( !formats.IsEmpty() )
@@ -149,15 +147,8 @@ bool CAF_Study::openDocument( const QString& fname )
 
   bool status = false;
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
-
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
     status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == PCDM_RS_OK;
-#else
-    status = app->Open( CAF_Tools::toExtString( fname ), myStdDoc ) == CDF_RS_OK;
-#endif
   }
   catch ( Standard_Failure ) {
     status = false;
@@ -185,15 +176,9 @@ bool CAF_Study::saveDocumentAs( const QString& fname )
 
   bool status = false;
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
     if ( save )
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
       status = app->Save( stdDoc() ) == PCDM_SS_OK;
-#else
-      status = app->Save( stdDoc() ) == CDF_SS_OK;
-#endif
     else
     {
       TCollection_ExtendedString format, path( CAF_Tools::toExtString( fname ) );
@@ -202,11 +187,7 @@ bool CAF_Study::saveDocumentAs( const QString& fname )
       if ( format.Length() )
         stdDoc()->ChangeStorageFormat( format );
 
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
       status = app->SaveAs( stdDoc(), path ) == PCDM_SS_OK;
-#else
-      status = app->SaveAs( stdDoc(), path ) == CDF_SS_OK;
-#endif
     }
   }
   catch ( Standard_Failure ) {
@@ -233,9 +214,7 @@ bool CAF_Study::openTransaction()
 
   bool res = true;
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
     if ( myStdDoc->HasOpenCommand() )
       myStdDoc->AbortCommand();
 
@@ -259,9 +238,7 @@ bool CAF_Study::abortTransaction()
 
   bool res = true;
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
     myStdDoc->AbortCommand();
     update();
   }
@@ -282,9 +259,7 @@ bool CAF_Study::commitTransaction( const QString& name )
 
   bool res = true;
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
     myStdDoc->CommitCommand();
 
     if ( canUndo() )
@@ -387,9 +362,7 @@ bool CAF_Study::undo()
     return false;
 
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
     myStdDoc->Undo();
     undoModified();     /* decrement modification counter */
   }
@@ -411,9 +384,7 @@ bool CAF_Study::redo()
     return false;
 
   try {
-#if OCC_VERSION_LARGE > 0x06010000
     OCC_CATCH_SIGNALS;
-#endif
     myStdDoc->Redo();
     doModified();      /* increment modification counter */
   }
index 6c99b77251439a5ca9c3548696c3ecf5e01da66d..823bfe1a881ae57b062102351ef331c55334a622 100644 (file)
@@ -555,9 +555,7 @@ Standard_Real DDS_Dictionary::ToSI( const Standard_Real theValue, const Standard
   if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
   {
     try {
-#if OCC_VERSION_LARGE > 0x06010000
       OCC_CATCH_SIGNALS;
-#endif
       aRetValue = UnitsAPI::AnyToSI( theValue, theUnits );
     }
     catch( Standard_Failure ) {
@@ -582,9 +580,7 @@ Standard_Real DDS_Dictionary::FromSI( const Standard_Real theValue, const Standa
   if ( theUnits && *theUnits && strcmp( theUnits, "%" ) )
   {
     try {
-#if OCC_VERSION_LARGE > 0x06010000
       OCC_CATCH_SIGNALS;
-#endif
       aRetValue = UnitsAPI::AnyFromSI( theValue, theUnits );
     }
     catch( Standard_Failure ) {
index edc93cedadcbe59bd338826eb7221eceacc9a458..53b251f4a89dd27ec611b1d0f802483a3640f197 100644 (file)
@@ -2152,16 +2152,14 @@ void LightApp_Application::createPreferences( LightApp_Preferences* pref )
   pref->setItemProperty( "strings", aValuesList,   vtkStyleMode );
   pref->setItemProperty( "indexes", anIndicesList, vtkStyleMode );
   // ... -> zooming mode
-  #if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
-    int occZoomingStyleMode = pref->addPreference( tr( "PREF_ZOOMING" ), Viewer3DGroup,
-                                                   LightApp_Preferences::Selector, "3DViewer", "zooming_mode" );
-    aValuesList.clear();
-    anIndicesList.clear();
-    aValuesList   << tr("PREF_ZOOMING_AT_CENTER") << tr("PREF_ZOOMING_AT_CURSOR");
-    anIndicesList << 0                            << 1;
-    pref->setItemProperty( "strings", aValuesList,   occZoomingStyleMode );
-    pref->setItemProperty( "indexes", anIndicesList, occZoomingStyleMode );
-  #endif
+  int occZoomingStyleMode = pref->addPreference( tr( "PREF_ZOOMING" ), Viewer3DGroup,
+                                                 LightApp_Preferences::Selector, "3DViewer", "zooming_mode" );
+  aValuesList.clear();
+  anIndicesList.clear();
+  aValuesList   << tr("PREF_ZOOMING_AT_CENTER") << tr("PREF_ZOOMING_AT_CURSOR");
+  anIndicesList << 0                            << 1;
+  pref->setItemProperty( "strings", aValuesList,   occZoomingStyleMode );
+  pref->setItemProperty( "indexes", anIndicesList, occZoomingStyleMode );
   // ... "Trihedron" group <<start>>
   int occTriGroup = pref->addPreference( tr( "PREF_TRIHEDRON" ), Viewer3DGroup );
   pref->setItemProperty( "columns", 2, occTriGroup );
index 1cabc85f0dc624ff6b819c843ab8ab3456daab4a..9b60f4546c408fd8134b11fe1cadf41168bbbb97 100644 (file)
@@ -108,10 +108,8 @@ Standard_EXPORT   TColStd_IndexedMapOfInteger& ChangeFind(const Handle(SALOME_In
   return ChangeFind(K);
 }
 
-#if OCC_VERSION_LARGE > 0x06050100 // for OCC-6.5.2 and higher version
 Standard_EXPORT   Standard_Address Find1 (const Handle(SALOME_InteractiveObject)& K) const;
 Standard_EXPORT   Standard_Address ChangeFind1 (const Handle(SALOME_InteractiveObject)& K);
-#endif
 
 private: 
 Standard_EXPORT SALOME_DataMapOfIOMapOfInteger(const SALOME_DataMapOfIOMapOfInteger& Other);
index 86cade97c6b468d6358581c2202057abd10ad5d2..31561c3a5893a5c5396acecf28e1adf77777f373 100644 (file)
@@ -244,7 +244,6 @@ void OCCViewer_CubeAxesDlg::SetData( bool theIsVisible, OCCViewer_AxisWidget::Ax
 */
 void OCCViewer_CubeAxesDlg::ApplyData( const Handle(V3d_View)& theView )
 {
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
   if( theView.IsNull() )
     return;
 
@@ -317,5 +316,4 @@ void OCCViewer_CubeAxesDlg::ApplyData( const Handle(V3d_View)& theView )
     theView->GraduatedTrihedronErase();
 
   theView->Redraw();
-#endif
 }
index 5aff3c60d3670f3b23dda84fc6ed71c5e09f0b49..e55694dc8ce1656fac5bd731721d9fe9ca06b051 100755 (executable)
 
 #include <Visual3d_View.hxx>
 
-
-// VSR: Uncomment below line to allow texture background support in OCC viewer
-#define OCC_ENABLE_TEXTURED_BACKGROUND
-
 /*!
   Get data for supported background modes: gradient types, identifiers and supported image formats
 */
@@ -83,11 +79,7 @@ QString OCCViewer_Viewer::backgroundData( QStringList& gradList, QIntList& idLis
               Diagonal1Gradient              << Diagonal2Gradient <<
               Corner1Gradient                << Corner2Gradient   <<
               Corner3Gradient                << Corner4Gradient;
-#if OCC_VERSION_LARGE > 0x06050200 // enabled since OCCT 6.5.3, since in previous version this functionality is buggy
-#ifdef OCC_ENABLE_TEXTURED_BACKGROUND
   txtList  << Qtx::CenterTexture << Qtx::TileTexture << Qtx::StretchTexture;
-#endif
-#endif
   return tr("BG_IMAGE_FILES");
 }
 
@@ -108,18 +100,8 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron)
   //myV3dViewer->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267)
   myV3dViewer->SetDefaultLights();
 
-#if OCC_VERSION_LARGE <= 0x06060000 // Porting to OCCT higher 6.6.0 version
-  myV3dCollector = OCCViewer_VService::CreateViewer( TCollection_ExtendedString("Collector3d").ToExtString() );
-  //myV3dCollector->Init(); // to avoid creation of the useless perspective view (see OCCT issue 0024267)
-  myV3dCollector->SetDefaultLights();
-#endif
-
   // init selector
-#if OCC_VERSION_LARGE <= 0x06060000 
-  myAISContext = new AIS_InteractiveContext( myV3dViewer, myV3dCollector );
-#else
   myAISContext = new AIS_InteractiveContext( myV3dViewer );
-#endif
   myAISContext->SelectionColor( Quantity_NOC_WHITE );
   
   // display isoline on planar faces (box for ex.)
@@ -166,9 +148,6 @@ OCCViewer_Viewer::~OCCViewer_Viewer()
 {
   myAISContext.Nullify();
   myV3dViewer.Nullify();
-#if OCC_VERSION_LARGE <= 0x06060000
-  myV3dCollector.Nullify();
-#endif
 }
 
 /*!
@@ -415,10 +394,8 @@ void OCCViewer_Viewer::onViewMapped(OCCViewer_ViewPort3d* viewPort)
 
 int OCCViewer_Viewer::getTopLayerId()
 {
-#if OCC_VERSION_LARGE > 0x06050200
   if ( myTopLayerId == 0 && !myAISContext->CurrentViewer().IsNull() )    
     myAISContext->CurrentViewer()->AddZLayer( myTopLayerId );
-#endif
 
   return myTopLayerId;
 }
@@ -731,15 +708,6 @@ bool OCCViewer_Viewer::isInViewer( const Handle(AIS_InteractiveObject)& obj,
   AIS_ListOfInteractive List;
   myAISContext->DisplayedObjects(List);
 
-#if OCC_VERSION_LARGE <= 0x06060000
-  if( !onlyInViewer )
-  {
-    AIS_ListOfInteractive List1;
-    myAISContext->ObjectsInCollector(List1);
-    List.Append(List1);
-  }
-#endif
-
   AIS_ListIteratorOfListOfInteractive ite(List);
   for ( ; ite.More(); ite.Next() )
     if( ite.Value()==obj )
index d29df5315de9982e4fd5574c66b54cd5d7b5da5f..5ca95ef263c4f5a70746d9c00cef6ddd9983b605 100755 (executable)
@@ -126,9 +126,6 @@ public:
 
 public:
   Handle(V3d_Viewer)              getViewer3d()    const { return myV3dViewer;}
-#if OCC_VERSION_LARGE <= 0x06060000 
-  Handle(V3d_Viewer)              getCollector3d() const { return myV3dCollector; }
-#endif
   Handle(AIS_InteractiveContext)  getAISContext()  const { return myAISContext; }
   Handle(AIS_Trihedron)           getTrihedron()   const { return myTrihedron; }
 
@@ -197,11 +194,6 @@ protected slots:
 protected:
   Handle(V3d_Viewer)              myV3dViewer;
 
-#if OCC_VERSION_LARGE <= 0x06060000
-  Handle(V3d_Viewer)              myV3dCollector;
-#endif
-
-
   Handle(AIS_Trihedron)           myTrihedron;
   Handle(AIS_InteractiveContext)  myAISContext;
 
index 110076d130317b883b1b8da214efd33904cf9065..b0df1877e4e2526f1316a735432d498a5ab3707f 100755 (executable)
@@ -313,22 +313,6 @@ void OCCViewer_ViewPort3d::updateBackground()
   if ( activeView().IsNull() ) return;
   if ( !myBackground.isValid() ) return;
 
-  // VSR: Important note on below code.
-  // In OCCT (in version 6.5.2), things about the background drawing
-  // are not straightforward and not clearly understandable:
-  // - Horizontal gradient is drawn vertically (!), well ok, from top side to bottom one.
-  // - Vertical gradient is drawn horizontally (!), from right side to left one (!!!).
-  // - First and second diagonal gradients are confused.
-  // - Image texture, once set, can not be removed (!).
-  // - Texture image fill mode Aspect_FM_NONE is not taken into account (and means the same
-  //   as Aspect_FM_CENTERED).
-  // - The only way to cancel gradient background (and get back to single colored) is to
-  //   set gradient background style to Aspect_GFM_NONE while passing two colors is also needed
-  //   (see V3d_View::SetBgGradientColors() function).
-  // - Also, it is impossible to draw texture image above the gradiented background (only above
-  //   single-colored).
-  // In OCCT 6.5.3 all above mentioned problems are fixed; so, above comment should be removed as soon
-  // as SALOME is migrated to OCCT 6.5.3. The same concerns #ifdef statements in the below code
   switch ( myBackground.mode() ) {
   case Qtx::ColorBackground:
     {
@@ -337,13 +321,8 @@ void OCCViewer_ViewPort3d::updateBackground()
        // Unset texture should be done here
        // ...
        Quantity_Color qCol( c.red()/255., c.green()/255., c.blue()/255., Quantity_TOC_RGB );
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
        activeView()->SetBgGradientStyle( Aspect_GFM_NONE ); // cancel gradient background
        activeView()->SetBgImageStyle( Aspect_FM_NONE );     // cancel texture background
-#else
-       // cancel gradient background (in OCC before v6.5.3 the only way to do this is to set it to NONE type passing arbitrary colors as parameters)
-       activeView()->SetBgGradientColors( qCol, qCol, Aspect_GFM_NONE );
-#endif
        // then change background color
        activeView()->SetBackgroundColor( qCol );
        // update viewer
@@ -365,38 +344,16 @@ void OCCViewer_ViewPort3d::updateBackground()
        activeView()->SetBgImageStyle( Aspect_FM_NONE );    // cancel texture background
        switch ( type ) {
        case OCCViewer_Viewer::HorizontalGradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
          activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True );
-#else
-         // in OCCT before v6.5.3, to draw horizontal gradient it's necessary to use Aspect_GFM_VER type
-         // and interchange the colors
-         activeView()->SetBgGradientColors( qCol2, qCol1, Aspect_GFM_VER, Standard_True );
-#endif
          break;
        case OCCViewer_Viewer::VerticalGradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
          activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_VER, Standard_True );
-#else
-         // in OCCT before v6.5.3, to draw vertical gradient it's necessary to use Aspect_GFM_HOR type
-         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_HOR, Standard_True );
-#endif
          break;
        case OCCViewer_Viewer::Diagonal1Gradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
          activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True );
-#else
-         // in OCCT before v6.5.3, to draw 1st dialognal gradient it's necessary to use Aspect_GFM_DIAG2 type
-         // and interchange the colors
-         activeView()->SetBgGradientColors( qCol2, qCol1, Aspect_GFM_DIAG2, Standard_True );
-#endif
          break;
        case OCCViewer_Viewer::Diagonal2Gradient:
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
          activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG2, Standard_True );
-#else
-         // in OCCT before v6.5.3, to draw 2nd dialognal gradient it's necessary to use Aspect_GFM_DIAG1 type
-         activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_DIAG1, Standard_True );
-#endif
          break;
        case OCCViewer_Viewer::Corner1Gradient:
          activeView()->SetBgGradientColors( qCol1, qCol2, Aspect_GFM_CORNER1, Standard_True );
@@ -424,9 +381,6 @@ void OCCViewer_ViewPort3d::updateBackground()
   default:
     break;
   }
-#if OCC_VERSION_LARGE > 0x06050200 // available since OCCT 6.5.3
-  // VSR: In OCCT before v6.5.3 below code can't be used because of very ugly bug - it has been impossible to
-  // clear the background texture image as soon as it was once set to the viewer.
   if ( myBackground.isTextureShown() ) {
     QString fileName;
     int textureMode = myBackground.texture( fileName );
@@ -449,7 +403,6 @@ void OCCViewer_ViewPort3d::updateBackground()
       activeView()->Update();
     }
   }
-#endif
 }
 
 /*!
@@ -477,10 +430,8 @@ void OCCViewer_ViewPort3d::fitRect( const QRect& rect )
 */
 void OCCViewer_ViewPort3d::startZoomAtPoint( int x, int y )
 {
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
   if ( !activeView().IsNull() && isAdvancedZoomingEnabled() )
     activeView()->StartZoomAtPoint( x, y );
-#endif
 }
 
 /*!
@@ -492,11 +443,9 @@ void OCCViewer_ViewPort3d::zoom( int x0, int y0, int x, int y )
     // as OCCT respects a sign of only dx,
     // but we want both signes to be taken into account
     //activeView()->Zoom( x0, y0, x, y );
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
     if ( isAdvancedZoomingEnabled() )
       activeView()->ZoomAtPoint( x0, y0, x, y );
     else
-#endif
       activeView()->Zoom( x0 + y0, 0, x + y, 0 );
     emit vpTransformed( this );
   }
index d8002d6372bd590aee1fb64f122a9cb2afc89629..4f38b4110457ec4c72197a4a339772a760272b08 100755 (executable)
 #include <gp_GTrsf.hxx>
 #include <TColgp_Array1OfPnt2d.hxx>
 
-#if OCC_VERSION_LARGE > 0x06060000 
 #include <Graphic3d_SequenceOfHClipPlane.hxx>
 #include <Graphic3d_ClipPlane.hxx>
 
-#endif
-
 #include <Image_PixMap.hxx>
 
 #include <Standard_Version.hxx>
@@ -1391,9 +1388,7 @@ void OCCViewer_ViewWindow::createToolBar()
   }
   toolMgr()->append( DumpId, tid );
   toolMgr()->append( SwitchInteractionStyleId, tid );
-#if OCC_VERSION_LARGE > 0x0603000A // available only with OCC-6.3-sp11 and higher version
   toolMgr()->append( SwitchZoomingStyleId, tid );
-#endif
   toolMgr()->append( SwitchPreselectionId, tid );
   toolMgr()->append( SwitchSelectionId, tid );
   if( myModel->trihedronActivated() )
@@ -1440,9 +1435,7 @@ void OCCViewer_ViewWindow::createToolBar()
   toolMgr()->append( toolMgr()->separator(), tid );
   toolMgr()->append( ClippingId, tid );
   toolMgr()->append( AxialScaleId, tid );
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
   toolMgr()->append( GraduatedAxesId, tid );
-#endif
   toolMgr()->append( AmbientId, tid );
 
   toolMgr()->append( MaximizedId, tid );
@@ -1729,7 +1722,6 @@ void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem, bool base
     myModel->setTrihedronShown( anItem.isVisible );
     myModel->setTrihedronSize( anItem.size );
         
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
     // graduated trihedron
     bool anIsVisible = anItem.gtIsVisible;
     OCCViewer_AxisWidget::AxisData anAxisData[3];
@@ -1775,7 +1767,6 @@ void OCCViewer_ViewWindow::performRestoring( const viewAspect& anItem, bool base
 
     myCubeAxesDlg->SetData( anIsVisible, anAxisData );
     myCubeAxesDlg->ApplyData( aView3d );
-#endif
 
   } // if ( !baseParamsOnly )
 
@@ -2115,7 +2106,6 @@ viewAspect OCCViewer_ViewWindow::getViewParams() const
   aView3d->Center( params.centerX, params.centerY );
 #endif
 
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 and higher version
   // graduated trihedron
   bool anIsVisible = false;
   OCCViewer_AxisWidget::AxisData anAxisData[3];
@@ -2161,7 +2151,6 @@ viewAspect OCCViewer_ViewWindow::getViewParams() const
   params.gtTickmarkLengthX = anAxisData[0].TickmarkLength;
   params.gtTickmarkLengthY = anAxisData[1].TickmarkLength;
   params.gtTickmarkLengthZ = anAxisData[2].TickmarkLength;
-#endif
 
   return params;
 }
@@ -2238,8 +2227,6 @@ QString OCCViewer_ViewWindow::getVisualParameters()
     data << ClippingPlane;
   }
 
-
-#if OCC_VERSION_LARGE > 0x06030009 // available only with OCC-6.3-sp10 or newer version
   // graduated trihedron
   data << QString( "gtIsVisible=%1" )      .arg( params.gtIsVisible );
   data << QString( "gtDrawNameX=%1" )      .arg( params.gtDrawNameX );
@@ -2281,7 +2268,6 @@ QString OCCViewer_ViewWindow::getVisualParameters()
   data << QString( "gtTickmarkLengthX=%1" ).arg( params.gtTickmarkLengthX );
   data << QString( "gtTickmarkLengthY=%1" ).arg( params.gtTickmarkLengthY );
   data << QString( "gtTickmarkLengthZ=%1" ).arg( params.gtTickmarkLengthZ );
-#endif
   QString bg = Qtx::backgroundToString( background() ).replace( "=", "$" );
   data << QString( "background=%1" ).arg( bg );
 
index 25fdb6547d146cb9301f7e8666a8154838f63033..985d1fed7a87d3bc415d62321e8619974926ba18 100755 (executable)
@@ -158,16 +158,6 @@ bool SOCC_Viewer::isInViewer( const Handle(SALOME_InteractiveObject)& obj,
 {
   AIS_ListOfInteractive List;
   getAISContext()->DisplayedObjects(List);
-
-#if OCC_VERSION_LARGE <= 0x06060000
-  if( !onlyInViewer ) {
-    AIS_ListOfInteractive List1;
-    getAISContext()->ObjectsInCollector(List1);
-    List.Append(List1);
-}
-#endif
-
-
   AIS_ListIteratorOfListOfInteractive ite(List);
   for ( ; ite.More(); ite.Next() )
   {
@@ -362,29 +352,6 @@ void SOCC_Viewer::Display( const SALOME_OCCPrs* prs )
           continue;
         }
 
-#if OCC_VERSION_LARGE <= 0x06060000
-      // then try to find presentation in the collector
-      if(ic->IsInCollector(anAIS))
-        {
-          ic->DisplayFromCollector( anAIS, false );
-          // Deactivate object if necessary
-          if ( !anOCCPrs->ToActivate() )
-            ic->Deactivate( anAIS );
-
-          // Set visibility flag
-          // Temporarily commented to avoid awful dependecy on SALOMEDS
-          // TODO: better mechanism of storing display/erse status in a study
-          // should be provided...
-          //Handle(SALOME_InteractiveObject) anObj =
-          //  Handle(SALOME_InteractiveObject)::DownCast( anAIS->GetOwner() );
-          //if ( !anObj.IsNull() && anObj->hasEntry() )
-          //{
-          //  if ( study )
-          //    ToolsGUI::SetVisibility( study, anObj->getEntry(), true, this );
-          //}
-          continue;
-        }
-#endif
       // if object is not displayed and not found in the collector - display it
       if ( anAIS->IsKind( STANDARD_TYPE(AIS_Trihedron) ) )
       {
@@ -400,14 +367,12 @@ void SOCC_Viewer::Display( const SALOME_OCCPrs* prs )
       {
         aSh->SetClippable (prs->IsClippable());
         applyExistingClipPlanesToObject (anAIS);
-#if OCC_VERSION_LARGE > 0x06050200
         bool top = (aSh->isTopLevel() && aSh->switchTopLevel());
              ic->SetZLayer( aSh, top ? getTopLayerId() : 0 );
                    if(!aSh->toActivate())
         {
                            ic->Deactivate( aSh );
                    }
-#endif
       }
 
       //Register anAIS (if it has an entry) in entry2aisobjects map
@@ -481,11 +446,7 @@ void SOCC_Viewer::Erase( const SALOME_OCCPrs* prs, const bool forced )
     Handle(AIS_InteractiveObject) anAIS = aIter.Value();
     if ( !anAIS.IsNull() ) {
       // erase the object from context : move it to collector
-#if OCC_VERSION_LARGE <= 0x06060000
-      ic->Erase( anAIS, false, forced ? false : true );
-#else
       ic->Erase( anAIS, false );
-#endif
       // Set visibility flag if necessary
       // Temporarily commented to avoid awful dependecy on SALOMEDS
       // TODO: better mechanism of storing display/erse status in a study
@@ -535,11 +496,7 @@ void SOCC_Viewer::EraseAll( const bool forced )
 
     // erase an object
     Handle(AIS_InteractiveObject) anIO = anIter.Value();
-#if OCC_VERSION_LARGE <= 0x06060000
-    ic->Erase( anIO, false, forced ? false : true );
-#else
     ic->Erase( anIO, false );
-#endif
     
     // Set visibility flag if necessary
     // Temporarily commented to avoid awful dependecy on SALOMEDS
@@ -579,11 +536,7 @@ SALOME_Prs* SOCC_Viewer::CreatePrs( const char* entry )
         for ( unsigned int ind = 0; ind < List.size(); ind++ )
           {
             Handle(AIS_InteractiveObject) anAIS=List[ind];
-            if(ic->IsDisplayed(anAIS)
-#if OCC_VERSION_LARGE <= 0x06060000
-               || ic->IsInCollector(anAIS)
-#endif
-              )
+            if(ic->IsDisplayed(anAIS))
               {
                 prs->AddObject( anAIS );
               }
index d23eb4b044681d7afd0167b49836e51573ec587a..6c2184022d1ac1955fdd7b484844725d9595fff4 100644 (file)
 
 #include <QString>
 
-#if OCC_VERSION_LARGE > 0x06010000
-  #include <Standard_ErrorHandler.hxx>
-  #include <Standard_Failure.hxx>
-#else
-  #include "CASCatch.hxx"
-#endif
+#include <Standard_ErrorHandler.hxx>
+#include <Standard_Failure.hxx>
+
 
 /*!Constructor. Initialize by \a floatSignal.*/
 SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
@@ -57,19 +54,11 @@ SalomeApp_ExceptionHandler::SalomeApp_ExceptionHandler( const bool floatSignal )
 /*!Try to call SUIT_ExceptionHandler::internalHandle(o, e), catch if failure.*/
 bool SalomeApp_ExceptionHandler::handleSignals( QObject* o, QEvent* e )
 {
-#if OCC_VERSION_LARGE > 0x06010000
   try {
     OCC_CATCH_SIGNALS;
-#else
-  CASCatch_TRY {
-#endif
     SUIT_ExceptionHandler::internalHandle( o, e );
   }
-#if OCC_VERSION_LARGE > 0x06010000
   catch(Standard_Failure) {
-#else
-  CASCatch_CATCH(Standard_Failure) {
-#endif
     Handle(Standard_Failure) aFail = Standard_Failure::Caught();
     throw Standard_Failure( aFail->GetMessageString() );
   }
index 46030c5385088981c006c25ba0a85d39d6916bf6..65284c93d644cf0f2b84c1f852b844b010d9e782 100755 (executable)
@@ -259,19 +259,6 @@ public:
 
   virtual bool notify( QObject* receiver, QEvent* e )
   {
-#if OCC_VERSION_LARGE < 0x06010100
-    // Disable GUI user actions while python command is executed
-    if (SUIT_Session::IsPythonExecuted()) {
-      // Disable mouse and keyboard events
-      QEvent::Type aType = e->type();
-      if (aType == QEvent::MouseButtonPress || aType == QEvent::MouseButtonRelease ||
-          aType == QEvent::MouseButtonDblClick || aType == QEvent::MouseMove ||
-          aType == QEvent::Wheel || aType == QEvent::ContextMenu ||
-          aType == QEvent::KeyPress || aType == QEvent::KeyRelease ||
-          aType == QEvent::Accel || aType == QEvent::AccelOverride)
-        return false;
-    }
-#endif
 
 #ifdef ENABLE_TESTRECORDER
     return myHandler ? myHandler->handle( receiver, e ) :