Salome HOME
Porting Salome to OCCT 7.7.0
authorjfa <jfa@opencascade.com>
Tue, 14 Feb 2023 15:11:22 +0000 (15:11 +0000)
committerjfa <jfa@opencascade.com>
Tue, 14 Feb 2023 15:11:22 +0000 (15:11 +0000)
src/OCCViewer/OCCViewer_CubeAxesDlg.cxx
src/OCCViewer/OCCViewer_Utilities.cxx
src/OCCViewer/OCCViewer_VService.cxx
src/OCCViewer/OCCViewer_VService.h
src/OCCViewer/OCCViewer_ViewModel.cxx
src/OCCViewer/OCCViewer_ViewPort3d.cxx

index 97c95a873b54f5b606e2b27ed7204eae32f2da84..96297b467badb5cc6b5fb8b9c68d3449ec90201d 100644 (file)
@@ -35,6 +35,8 @@
 #include <QGroupBox>
 #include <QLineEdit>
 
+#include <Basics_OCCTVersion.hxx>
+
 /*!
   \class OCCViewer_CubeAxesDlg::AxisWidget
   \brief Axis tab widget of the "Graduated axis" dialog box
@@ -267,7 +269,11 @@ void OCCViewer_CubeAxesDlg::ApplyData( const Handle(V3d_View)& theView )
     gt.SetGridColor(Quantity_NOC_WHITE); // grid color
     // axes params
     for ( int i = 0; i < 3; i++ ) {
+#if OCC_VERSION_LARGE < 0x07070000
       Graphic3d_AxisAspect& aspect = gt.ChangeAxisAspect(i);
+#else
+      Graphic3d_GraduatedTrihedron::AxisAspect& aspect = gt.ChangeAxisAspect(i);
+#endif
       aspect.SetName(anAxisData[i].Name.toUtf8().constData());
       aspect.SetDrawName(anAxisData[i].DrawName);
       aspect.SetDrawValues(anAxisData[i].DrawValues);
index 61cd9aa78e95fac96ef66657a05a669b33a41548..3ca502b5a38ae409d304180d3289ce82176800c1 100644 (file)
@@ -42,7 +42,12 @@ Handle(Image_PixMap) OCCViewer_Utilities::imageToPixmap( const QImage& anImage )
 {
   Handle(Image_PixMap) aPixmap = new Image_PixMap();
   if ( !anImage.isNull() ) {
+#if OCC_VERSION_LARGE < 0x07070000
     aPixmap->InitTrash( Image_PixMap::ImgBGRA, anImage.width(), anImage.height() );
+#else
+    aPixmap->InitTrash( Image_Format_BGRA, anImage.width(), anImage.height() );
+#endif
+
 #if OCC_VERSION_LARGE < 0x07050000
     aPixmap->SetTopDown( Standard_True );
 #endif
index 0d09ccca7be320612de1316135894d51921fdc2b..3d95c2b027c3b7550e357b958fbd82dc1e742b12 100644 (file)
 #include <Xw_Window.hxx>
 #endif
 
+#include <Basics_OCCTVersion.hxx>
+
 /*!
     Create native view window for CasCade view [ static ]
 */
 Handle(Aspect_Window) OCCViewer_VService::CreateWindow( const Handle(V3d_View)& view,
                                                        WId winId )
 {
+#if OCC_VERSION_LARGE < 0x07070000
   Aspect_Handle aWindowHandle = (Aspect_Handle)winId;
+#else
+  Aspect_Drawable aWindowHandle = (Aspect_Drawable)winId;
+#endif
+
 #if defined(WIN32)
   Handle(WNT_Window) viewWindow = new WNT_Window( aWindowHandle );
 #elif defined(__APPLE__)
index 4b1bd0d665ecaa605b55e8bd0000081e875dd894..5b6f3dc30bf2a34c4a4ebced9bf211b09180f23d 100644 (file)
@@ -29,7 +29,6 @@
 #include <Standard_Boolean.hxx>
 #include <Standard_CString.hxx>
 #include <Standard_ExtString.hxx>
-#include <Quantity_Length.hxx>
 #include <V3d_TypeOfOrientation.hxx>
 
 #include <QWidget>
index 23d09ff06934ab6f8b1c1c7f4b38070c72ae7ccf..cfa22e46f9529462db39ccced1ea6354c17dd0ae 100644 (file)
@@ -145,8 +145,12 @@ OCCViewer_Viewer::OCCViewer_Viewer( bool DisplayTrihedron)
   // create color scale
   myColorScale = new AIS_ColorScale();
   myColorScale->SetZLayer( Graphic3d_ZLayerId_TopOSD );
+#if OCC_VERSION_LARGE < 0x07070000
   myColorScale->SetTransformPersistence( Graphic3d_TransformPers::FromDeprecatedParams( Graphic3d_TMF_2d, gp_Pnt(-1, -1, 0) ) );
-  
+#else
+  myColorScale->SetTransformPersistence( new Graphic3d_TransformPers (Graphic3d_TMF_2d, Aspect_TOTP_LEFT_LOWER) );
+#endif
+
   /* create trihedron */
   if ( DisplayTrihedron )
   {
index c8f22a827c1a198f8c2141c41df42ab76fabadc7..73c60da4fb2fe0e1f49b2329720430c979dca459 100644 (file)
@@ -41,7 +41,6 @@
 #include <QTimer>
 
 #include <V3d_View.hxx>
-#include <Quantity_Ratio.hxx>
 
 #include "utilities.h"