Salome HOME
Porting on OCCT 7.0 and Qt 5. Make compilable version.
authormzn <mzn@opencascade.com>
Fri, 2 Dec 2016 14:30:47 +0000 (17:30 +0300)
committermzn <mzn@opencascade.com>
Fri, 2 Dec 2016 14:30:47 +0000 (17:30 +0300)
66 files changed:
src/HYDROData/HYDROData_Entity.cxx
src/HYDROData/HYDROData_Entity.h
src/HYDROData/HYDROData_LandCoverMap.h
src/HYDROData/HYDROData_Zone.cxx
src/HYDROGUI/CMakeLists.txt
src/HYDROGUI/HYDROGUI_AISShape.cxx
src/HYDROGUI/HYDROGUI_AISTrihedron.cxx
src/HYDROGUI/HYDROGUI_BathymetryBoundsOp.cxx
src/HYDROGUI/HYDROGUI_CalculationDlg.cxx
src/HYDROGUI/HYDROGUI_DataBrowser.cxx
src/HYDROGUI/HYDROGUI_ExportFileOp.h
src/HYDROGUI/HYDROGUI_GeomObjectDlg.cxx
src/HYDROGUI/HYDROGUI_ImportLandCoverMapDlg.cxx
src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx
src/HYDROGUI/HYDROGUI_ImportObstacleFromFileOp.cxx
src/HYDROGUI/HYDROGUI_ImportPolylineOp.cxx
src/HYDROGUI/HYDROGUI_ImportProfilesOp.cxx
src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx
src/HYDROGUI/HYDROGUI_LandCoverMapPrs.cxx
src/HYDROGUI/HYDROGUI_LandCoverMapPrs.h
src/HYDROGUI/HYDROGUI_ListModel.cxx
src/HYDROGUI/HYDROGUI_ListModel.h
src/HYDROGUI/HYDROGUI_OCCDisplayer.cxx
src/HYDROGUI/HYDROGUI_OCCDisplayer.h
src/HYDROGUI/HYDROGUI_PriorityTableModel.cxx
src/HYDROGUI/HYDROGUI_PriorityWidget.cxx
src/HYDROGUI/HYDROGUI_Shape.cxx
src/HYDROGUI/HYDROGUI_Shape.h
src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx
src/HYDROGUI/HYDROGUI_ShapeBathymetry.h
src/HYDROGUI/HYDROGUI_ShapeImage.cxx
src/HYDROGUI/HYDROGUI_ShapeImage.h
src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.cxx
src/HYDROGUI/HYDROGUI_ShapeLandCoverMap.h
src/HYDROGUI/HYDROGUI_StricklerTableDlg.cxx
src/HYDROGUI/HYDROGUI_StricklerTypeComboBox.cxx
src/HYDROGUI/HYDROGUI_Tool.cxx
src/HYDROGUI/HYDROGUI_Tool2.cxx
src/HYDROGUI/HYDROGUI_VTKPrsShape.cxx
src/HYDROGUI/HYDROGUI_ZLayers.cxx
src/HYDROGUI/HYDROGUI_ZLayers2.cxx
src/HYDROGUI/HYDROGUI_Zone.cxx
src/HYDROPy/CMakeLists.txt
src/HYDROPy/HYDROData_CalculationCase.sip
src/HYDROPy/HYDROData_Channel.sip
src/HYDROPy/HYDROData_Document.sip
src/HYDROPy/HYDROData_Entity.sip
src/HYDROPy/HYDROData_IInterpolator.sip
src/HYDROPy/HYDROData_Image.sip
src/HYDROPy/HYDROData_ImmersibleZone.sip
src/HYDROPy/HYDROData_LandCoverMap.sip
src/HYDROPy/HYDROData_Object.sip
src/HYDROPy/HYDROData_Polyline3D.sip
src/HYDROPy/HYDROData_Profile.sip
src/HYDROPy/HYDROData_Region.sip
src/HYDROPy/HYDROData_SequenceOfObjects.sip
src/HYDROPy/HYDROData_Stream.sip
src/HYDROPy/HYDROData_Zone.sip
src/HYDRO_tests/TestViewer.cxx
src/HYDRO_tests/TestViewer.h
src/HYDRO_tests/test_HYDROData_Bathymetry.h
src/HYDRO_tests/test_HYDROData_LandCoverMap.cxx
src/HYDRO_tests/test_HYDROData_Main.cxx
src/HYDRO_tests/test_HYDROData_Profile.h
src/HYDRO_tests/test_HYDROGUI_ListModel.cxx
src/HYDRO_tests/test_HYDROGUI_Shape.cxx

index ce65478918e3ed68de4909d4cd9d2aa74ee3842c..c5193f914c604f9f3737cf8519f036e3f4cc59e6 100644 (file)
@@ -302,7 +302,7 @@ HYDROData_SequenceOfObjects HYDROData_Entity::GetAllReferenceObjects() const
   return HYDROData_SequenceOfObjects();
 }
 
-Standard_Boolean HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const
+bool HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const
 {
   theLevel = -1;
 
@@ -313,11 +313,11 @@ Standard_Boolean HYDROData_Entity::GetZLevel( Standard_Integer& theLevel ) const
     if ( aLabel.FindAttribute( TDataStd_Integer::GetID(), anIntVal ) )
     {
       theLevel = anIntVal->Get();
-      return Standard_True;
+      return true;
     }
   }
 
-  return Standard_False;
+  return false;
 }
 
 void HYDROData_Entity::SetZLevel( const Standard_Integer& theLevel )
index 2422d4feb3098579962c18f5a10d69cbde50a1d6..3cfa0bc7dbd31676f3058379b1bed497f9dd6bd1 100644 (file)
@@ -241,7 +241,7 @@ public:
   /**
    * Returns the z-level for object presentation, -1 if no z-level.
    */
-  HYDRODATA_EXPORT virtual Standard_Boolean GetZLevel( Standard_Integer& theLevel ) const;
+  HYDRODATA_EXPORT virtual bool GetZLevel( Standard_Integer& theLevel ) const;
 
   /**
    * Set the z-level for object presentation.
index d5dfceb16d32b9762e38859c68e6e337111cacdf..7abf5e1258d94cce19a06e09cd4a3f5a7b60f48a 100644 (file)
@@ -111,6 +111,7 @@ public:
   HYDRODATA_EXPORT bool Add( const Handle( HYDROData_Object )&, const QString& theType );
   HYDRODATA_EXPORT bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType );
 
+  using HYDROData_Entity::Remove;
   HYDRODATA_EXPORT bool Remove( const TopoDS_Face& );
   HYDRODATA_EXPORT bool Remove( const TopTools_ListOfShape& );
 
index 15dfd3aaa8dd638b709c1df589175639badf9bbd..3e45fb89074b0b16282d6aa17b23dbc463623c03 100644 (file)
@@ -146,8 +146,7 @@ void HYDROData_Zone::SetMergeObject( const Handle(HYDROData_Entity)& theObject )
 
 Handle(HYDROData_Entity) HYDROData_Zone::GetMergeObject() const
 {
-  return Handle(HYDROData_Entity)::DownCast( 
-           GetReferenceObject( DataTag_MergeObject ) );
+  return GetReferenceObject( DataTag_MergeObject );
 }
 
 void HYDROData_Zone::RemoveMergeObject()
index 481b08654a5f774a64b5cab98eeae58128fb49ba..96cbffbcee1054708d25b9e46258e1e967bee620 100644 (file)
@@ -150,10 +150,10 @@ QT_WRAP_MOC(PROJECT_HEADERS_MOC ${PROJECT_HEADERS})
 
 set(PROJECT_SOURCES 
     HYDROGUI_AbstractDisplayer.cxx
-    #HYDROGUI_AISShape.cxx
-    #HYDROGUI_AISTrihedron.cxx
+    HYDROGUI_AISShape.cxx
+    HYDROGUI_AISTrihedron.cxx
     HYDROGUI_BathymetryPrs.cxx
-    #HYDROGUI_CalculationDlg.cxx
+    HYDROGUI_CalculationDlg.cxx
     HYDROGUI_CalculationOp.cxx
     HYDROGUI_ChannelDlg.cxx
     HYDROGUI_ChannelOp.cxx
@@ -161,7 +161,7 @@ set(PROJECT_SOURCES
     HYDROGUI_CopyPasteOp.cxx
     HYDROGUI_CopyPastePositionOp.cxx
     HYDROGUI_CurveCreatorProfile.cxx
-    #HYDROGUI_DataBrowser.cxx
+    HYDROGUI_DataBrowser.cxx
     HYDROGUI_DataModel.cxx
     HYDROGUI_DataModelSync.cxx
     HYDROGUI_DataObject.cxx
@@ -184,17 +184,17 @@ set(PROJECT_SOURCES
     HYDROGUI_ImportImageDlg.cxx
     HYDROGUI_ImportImageOp.cxx
     HYDROGUI_ImportLandCoverMapOp.cxx
-    #HYDROGUI_ImportLandCoverMapDlg.cxx
-    #HYDROGUI_ImportPolylineOp.cxx
-    #HYDROGUI_ImportSinusXOp.cxx
+    HYDROGUI_ImportLandCoverMapDlg.cxx
+    HYDROGUI_ImportPolylineOp.cxx
+    HYDROGUI_ImportSinusXOp.cxx
     HYDROGUI_ExportSinusXOp.cxx
     HYDROGUI_ExportSinusXDlg.cxx
     HYDROGUI_ExportLandCoverMapDlg.cxx
     HYDROGUI_InputPanel.cxx
     HYDROGUI_LandCoverArgsFilter.cxx
     HYDROGUI_LandCoverMapDlg.cxx
-    #HYDROGUI_LandCoverMapOp.cxx
-    #HYDROGUI_LandCoverMapPrs.cxx
+    HYDROGUI_LandCoverMapOp.cxx
+    HYDROGUI_LandCoverMapPrs.cxx
     HYDROGUI_LocalCSDlg.cxx
     HYDROGUI_LocalCSOp.cxx
     HYDROGUI_MergePolylinesDlg.cxx
@@ -203,8 +203,8 @@ set(PROJECT_SOURCES
     HYDROGUI_NameValidator.cxx
     HYDROGUI_ObjSelector.cxx
     HYDROGUI_ObserveImageOp.cxx
-    #HYDROGUI_OCCDisplayer.cxx
-    #HYDROGUI_OCCSelector.cxx
+    HYDROGUI_OCCDisplayer.cxx
+    HYDROGUI_OCCSelector.cxx
     HYDROGUI_Operation.cxx
     HYDROGUI_Operations.cxx
     HYDROGUI_Poly3DDlg.cxx
@@ -227,25 +227,25 @@ set(PROJECT_SOURCES
     HYDROGUI_PrsZoneDriver.cxx
     HYDROGUI_Region.cxx
     HYDROGUI_RemoveImageRefsOp.cxx
-    #HYDROGUI_Shape.cxx
-    #HYDROGUI_ShapeBathymetry.cxx
-    #HYDROGUI_ShapeImage.cxx
-    #HYDROGUI_ShapeLandCoverMap.cxx
+    HYDROGUI_Shape.cxx
+    HYDROGUI_ShapeBathymetry.cxx
+    HYDROGUI_ShapeImage.cxx
+    HYDROGUI_ShapeLandCoverMap.cxx
     HYDROGUI_ShowHideOp.cxx
     HYDROGUI_StreamDlg.cxx
     HYDROGUI_StreamOp.cxx
     HYDROGUI_LineEditDoubleValidator.cxx
-    #HYDROGUI_StricklerTableDlg.cxx
+    HYDROGUI_StricklerTableDlg.cxx
     HYDROGUI_StricklerTableOp.cxx
-    #HYDROGUI_StricklerTypeComboBox.cxx
+    HYDROGUI_StricklerTypeComboBox.cxx
     HYDROGUI_SplitPolylinesDlg.cxx
     HYDROGUI_SplitPolylinesOp.cxx
     HYDROGUI_SubmersibleOp.cxx
-    #HYDROGUI_Tool.cxx
-    #HYDROGUI_Tool2.cxx
+    HYDROGUI_Tool.cxx
+    HYDROGUI_Tool2.cxx
     HYDROGUI_TwoImagesDlg.cxx
     HYDROGUI_TwoImagesOp.cxx
-    #HYDROGUI_UpdateObjectOp.cxx
+    HYDROGUI_UpdateObjectOp.cxx
     HYDROGUI_VisualStateOp.cxx
     HYDROGUI_VTKPrs.cxx
     HYDROGUI_VTKPrsBathymetry.cxx
@@ -257,19 +257,19 @@ set(PROJECT_SOURCES
     HYDROGUI_Wizard.cxx
     HYDROGUI_Zone.cxx
     HYDROGUI_ImportGeomObjectOp.cxx
-    #HYDROGUI_ImportObstacleFromFileOp.cxx
+    HYDROGUI_ImportObstacleFromFileOp.cxx
     HYDROGUI_ExportCalculationOp.cxx
-    #HYDROGUI_GeomObjectDlg.cxx
+    HYDROGUI_GeomObjectDlg.cxx
     HYDROGUI_SetColorOp.cxx
     HYDROGUI_ColorDlg.cxx
-    #HYDROGUI_ImportProfilesOp.cxx
+    HYDROGUI_ImportProfilesOp.cxx
     HYDROGUI_GeoreferencementDlg.cxx
     HYDROGUI_GeoreferencementOp.cxx
     HYDROGUI_Actor.cxx
-    #HYDROGUI_BathymetryBoundsOp.cxx
+    HYDROGUI_BathymetryBoundsOp.cxx
     HYDROGUI_TranslateObstacleDlg.cxx
     HYDROGUI_TranslateObstacleOp.cxx
-    #HYDROGUI_ListModel.cxx
+    HYDROGUI_ListModel.cxx
     HYDROGUI_ZLevelsDlg.cxx
     HYDROGUI_ZLevelsOp.cxx
     HYDROGUI_OrderedListWidget.cxx
@@ -277,8 +277,8 @@ set(PROJECT_SOURCES
     HYDROGUI_ZLayers.cxx
     HYDROGUI_ZLayers2.cxx
     HYDROGUI_ZLayers3.cxx
-    #HYDROGUI_PriorityWidget.cxx
-    #HYDROGUI_PriorityTableModel.cxx
+    HYDROGUI_PriorityWidget.cxx
+    HYDROGUI_PriorityTableModel.cxx
     HYDROGUI_RiverBottomDlg.cxx
     HYDROGUI_RiverBottomOp.cxx
     HYDROGUI_ViewerDlg.cxx
index c6516527e47a3f27557b39be1323420b50106667..e714a2e68b31d88c3c0e5070151ce69f66842bd3 100644 (file)
@@ -20,7 +20,7 @@
 #include <AIS_DisplayMode.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <Prs3d_LineAspect.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
 
 IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_AISShape, AIS_Shape)
 
@@ -69,5 +69,5 @@ void HYDROGUI_AISShape::Compute( const Handle(PrsMgr_PresentationManager3d)& the
   }
 
   if( theMode==AIS_Shaded )
-    StdPrs_WFDeflectionShape::Add( thePresentation, Shape(), myDrawer );
+    StdPrs_WFShape::Add( thePresentation, Shape(), myDrawer );
 }
index 3642aaa88fedf61912cdb1156fc55eaf3c267d4d..7995997147290ca152fe2d60de5545319e7734ea 100644 (file)
@@ -79,9 +79,9 @@ void HYDROGUI_AISTrihedron::ComputeAxis( const Handle(Prs3d_Presentation)& thePr
                                    theParams.myPfirst, theParams.myPlast );
 }
 
-void HYDROGUI_AISTrihedron::Compute(const Handle_Prs3d_Projector& aProjector,
-                                    const Handle_Geom_Transformation& aTransformation,
-                                    const Handle_Prs3d_Presentation& aPresentation)
+void HYDROGUI_AISTrihedron::Compute(const Handle(Prs3d_Projector)& aProjector,
+                                    const Handle(Geom_Transformation)& aTransformation,
+                                    const Handle(Prs3d_Presentation)& aPresentation)
 {
 }
 
index 2d2f03b75b281a34378fa8ddf4289222a96d13b8..36b111ec0243fc90a6d813dd0b26dd450b9271d1 100644 (file)
@@ -52,7 +52,7 @@ void HYDROGUI_BathymetryBoundsOp::startOperation()
 bool HYDROGUI_BathymetryBoundsOp::processApply( int& theUpdateFlags, QString& theErrorMsg,
                                                 QStringList& theBrowseObjectsEntries )
 {
-  Handle_HYDROData_PolylineXY aPolyline = myBath->CreateBoundaryPolyline();
+  Handle(HYDROData_PolylineXY) aPolyline = myBath->CreateBoundaryPolyline();
   bool isOK = !aPolyline.IsNull();
   theUpdateFlags = 0;
   if( isOK ) {
index 778ac4311666fb01038a44833c13200a089a1ba7..1133fcb18dfe23ac9d75924a4559c0de2d4e3187 100644 (file)
@@ -671,7 +671,7 @@ QStringList HYDROGUI_CalculationDlg::getSelectedAvailableGeomObjects() const
 void HYDROGUI_CalculationDlg::setEditedObject( const Handle(HYDROData_CalculationCase) theCase )
 {
   myEditedObject = theCase;
-  myValidator->setEditedObject( theCase );
+  myValidator->setEditedObject( myEditedObject );
 
   // Build the calculation case subtree
   module()->getDataModel()->buildCaseTree( myBrowser->root(), myEditedObject);
index eb5f2539e9528b890fa1fa61dd49f6743b6bd33f..66eec4f6f2873b067adee2bb296915a4afc3e624 100644 (file)
@@ -277,7 +277,7 @@ HYDROGUI_DataBrowser::HYDROGUI_DataBrowser( HYDROGUI_Module* theModule,
   // Create OBSelector
   new HYDROGUI_OBSelector( this, theModule->getApp()->selectionMgr() );
 
-  treeView()->header()->setResizeMode(SUIT_DataObject::VisibilityId, QHeaderView::Fixed);
+  treeView()->header()->setSectionResizeMode(SUIT_DataObject::VisibilityId, QHeaderView::Fixed);
   treeView()->header()->moveSection(SUIT_DataObject::NameId,SUIT_DataObject::VisibilityId);
   treeView()->setColumnWidth(SUIT_DataObject::VisibilityId, VISIBILITY_COLUMN_WIDTH);
   treeView()->hideColumn( SUIT_DataObject::VisibilityId );
index e841688e48414ed05ee65a3e420aa420f26c7a9e..2f20d768c80ef661a008c4af384c6db4aea1b3bb 100644 (file)
 #include <vector>
 
 class SUIT_FileDlg;
-class gp_XYZ;
-class Handle_HYDROData_PolylineXY;
-class Handle_HYDROData_Polyline3D;
-class TopoDS_Face;
 
 class HYDROGUI_ExportFileOp : public HYDROGUI_Operation
 {
index 5180be14dbbc8096ae41ed94feb50661706017b3..1179745d227bc5a64faf0745a680b021673e7916 100644 (file)
@@ -179,14 +179,14 @@ void HYDROGUI_GeomObjectDlg::onBrowse()
 {
   SUIT_FileDlg* aFileDlg = new SUIT_FileDlg( this, true );
   aFileDlg->setWindowTitle( tr("IMPORT_OBSTACLE_FROM_FILE") );
-  aFileDlg->setFilter( tr("OBSTACLE_FILTER") );
+  aFileDlg->setNameFilter( tr("OBSTACLE_FILTER") );
   if ( !lastUsedFilter.isEmpty() ) {
-    aFileDlg->selectFilter( lastUsedFilter );
+    aFileDlg->selectNameFilter( lastUsedFilter );
   }
 
   if ( aFileDlg->exec() == QDialog::Accepted ) {
     QString aFileName = aFileDlg->selectedFile();
-    lastUsedFilter = aFileDlg->selectedFilter();
+    lastUsedFilter = aFileDlg->selectedNameFilter();
 
     if ( !aFileName.isEmpty() ) {
       myFileName->setText( aFileName );
@@ -261,4 +261,4 @@ void HYDROGUI_GeomObjectDlg::setDefaultName( const QString& theName )
 QString HYDROGUI_GeomObjectDlg::getDefaultName()
 {
   return myDefaultName;
-}
\ No newline at end of file
+}
index d99c13e4a83535de39e21cc95cb03a0a8078bb90..8bca430933432e5d0beb02ee22424ef72dac9f01 100644 (file)
@@ -269,7 +269,7 @@ void HYDROGUI_ImportLandCoverMapDlg::FillCorrespondenceTable(const QStringList&
   myCorrTableWidget->setHorizontalHeaderItem(0, aHeader_1);
   myCorrTableWidget->setHorizontalHeaderItem(1, aHeader_2);
   myCorrTableWidget->setHorizontalHeaderItem(2, aHeader_3);
-  myCorrTableWidget->horizontalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+  myCorrTableWidget->horizontalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
   //
   for (int i = 0; i < aFCSize; i++)
   {
@@ -453,4 +453,4 @@ bool HYDROGUI_ImportLandCoverMapDlg::CheckFirstPageFilling() const
      return false;
   }
   return true;
-}
\ No newline at end of file
+}
index deba3d6c38232dba9b102e18ce3f624ece2b3890..5cb9d9478c73085f4c5aa6accd6cdfabae58dbde 100644 (file)
@@ -495,8 +495,7 @@ void HYDROGUI_ImportLandCoverMapOp::onApply()
   }
   else
   {
-    Handle(HYDROData_Entity) LCM = Handle(HYDROData_Entity)::DownCast( myLCM );
-    LCM->Remove();
+    myLCM->Remove();
     module()->setObjectRemoved( myLCM );
     abort();
   }
index 5a639978d1e1eb1117568d4c8f829e6949ec5e3f..9c0743c0b3fcfd68c5f119daad92b4a5ca1bcdce 100644 (file)
@@ -72,9 +72,9 @@ void HYDROGUI_ImportObstacleFromFileOp::startOperation()
   } else {
     myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
     myFileDlg->setWindowTitle( getName() );
-    myFileDlg->setFilter( tr("OBSTACLE_FILTER") );
+    myFileDlg->setNameFilter( tr("OBSTACLE_FILTER") );
     if ( !lastUsedFilter.isEmpty() ) {
-      myFileDlg->selectFilter( lastUsedFilter );
+      myFileDlg->selectNameFilter( lastUsedFilter );
     }
 
     connect( myFileDlg, SIGNAL( accepted() ),      this, SLOT( onApply()  ) );
@@ -118,7 +118,7 @@ bool HYDROGUI_ImportObstacleFromFileOp::processApply( int& theUpdateFlags,
   } else if ( myFileDlg ) {
     // Get file name and file filter defined by the user
     aFileName = myFileDlg->selectedFile();
-    lastUsedFilter = myFileDlg->selectedFilter();
+    lastUsedFilter = myFileDlg->selectedNameFilter();
   }
 
   // Check the file name
@@ -195,4 +195,4 @@ HYDROGUI_InputPanel* HYDROGUI_ImportObstacleFromFileOp::createInputPanel() const
   }
 
   return aPanel;
-}
\ No newline at end of file
+}
index 7cdbd1ed7decc6f854da5299b6d5e828aec373b8..82b8f24a44d1eb27a0986b4ffd927f2d211296f7 100644 (file)
@@ -58,7 +58,7 @@ void HYDROGUI_ImportPolylineOp::startOperation()
   myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
   myFileDlg->setWindowTitle( getName() );
   myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
-  myFileDlg->setFilter( tr("POLYLINE_FILTER") );
+  myFileDlg->setNameFilter( tr("POLYLINE_FILTER") );
 
   connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
   connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
@@ -89,7 +89,7 @@ void HYDROGUI_ImportPolylineOp::onApply()
     if (anExt == "shp")
     {
       HYDROData_ShapeFile anImporter;
-      NCollection_Sequence<Handle_HYDROData_Entity> theEntities;
+      NCollection_Sequence<Handle(HYDROData_Entity)> theEntities;
       int aShapeTypeOfFile = -1;
       int aStat = anImporter.ImportPolylines(doc(), aFileName, theEntities, aShapeTypeOfFile ); 
       if (aStat == 1)
@@ -119,7 +119,7 @@ void HYDROGUI_ImportPolylineOp::onApply()
   QApplication::restoreOverrideCursor();
 }
 
-void HYDROGUI_ImportPolylineOp::UpdateView( NCollection_Sequence<Handle_HYDROData_Entity>& anEntities)
+void HYDROGUI_ImportPolylineOp::UpdateView( NCollection_Sequence<Handle(HYDROData_Entity)>& anEntities)
 {
   size_t anActiveViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
   if ( anActiveViewId == 0 )
index deaab0c3de442f6a06a0e9e01244806828bb371b..9e12b9eebd004777213c2423e9d64751b93129c5 100644 (file)
@@ -52,7 +52,7 @@ void HYDROGUI_ImportProfilesOp::startOperation()
   myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
   myFileDlg->setWindowTitle( getName() );
   myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
-  myFileDlg->setFilter( tr("PROFILE_FILTER") );
+  myFileDlg->setNameFilter( tr("PROFILE_FILTER") );
 
   connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
   connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
index 0d3f217a668f59c12272b5c145fa17e789e29728..38b5cf4cb14ebf1389c2fa81d81e76b30d58512f 100644 (file)
@@ -59,7 +59,7 @@ void HYDROGUI_ImportSinusXOp::startOperation()
   myFileDlg = new SUIT_FileDlg( module()->getApp()->desktop(), true );
   myFileDlg->setWindowTitle( getName() );
   myFileDlg->setFileMode( SUIT_FileDlg::ExistingFiles );
-  myFileDlg->setFilter( tr("SINUSX_FILTER") );
+  myFileDlg->setNameFilter( tr("SINUSX_FILTER") );
 
   connect( myFileDlg, SIGNAL( accepted() ), this, SLOT( onApply() ) );
   connect( myFileDlg, SIGNAL( rejected() ), this, SLOT( onCancel() ) );
index 196bd70ded7ab773c1078b792ca147b3efd2644f..5685a5f2eaee0465cdc26e6cd51ee311ac048334 100644 (file)
@@ -22,7 +22,7 @@
 #include <AIS_DisplayMode.hxx>
 #include <Prs3d_IsoAspect.hxx>
 #include <SelectMgr_SequenceOfOwner.hxx>
-#include <StdPrs_WFDeflectionShape.hxx>
+#include <StdPrs_WFShape.hxx>
 #include <StdSelect_BRepOwner.hxx>
 #include <TopoDS_Face.hxx>
 #include <QColor>
@@ -79,12 +79,12 @@ void HYDROGUI_LandCoverMapPrs::UpdateColors()
   SetTransparency( myLCMap->GetTransparency() );
 }
 
-Handle(Aspect_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
+Handle(AIS_ColorScale) HYDROGUI_LandCoverMapPrs::GetColorScale() const
 {
   return myColorScale;
 }
 
-void HYDROGUI_LandCoverMapPrs::SetColorScale( const Handle(Aspect_ColorScale)& theColorScale )
+void HYDROGUI_LandCoverMapPrs::SetColorScale( const Handle(AIS_ColorScale)& theColorScale )
 {
   myColorScale = theColorScale;
   double aMin = 0, aMax = 0;
@@ -152,7 +152,7 @@ void HYDROGUI_LandCoverMapPrs::Compute( const Handle(PrsMgr_PresentationManager3
   }
 
   if( theMode==AIS_Shaded )
-    StdPrs_WFDeflectionShape::Add( thePresentation, Shape(), myDrawer );
+    StdPrs_WFShape::Add( thePresentation, Shape(), myDrawer );
 }
 
 void HYDROGUI_LandCoverMapPrs::HilightSelected( const Handle(PrsMgr_PresentationManager3d)& thePresentationManager,
@@ -166,7 +166,7 @@ void HYDROGUI_LandCoverMapPrs::HilightSelected( const Handle(PrsMgr_Presentation
   {
     Handle(StdSelect_BRepOwner) anOwner = Handle(StdSelect_BRepOwner)::DownCast( theOwners.Value( i ) );
     if( !anOwner.IsNull() )
-      StdPrs_WFDeflectionShape::Add( aSelectPrs, anOwner->Shape(), HilightAttributes() );
+      StdPrs_WFShape::Add( aSelectPrs, anOwner->Shape(), HilightAttributes() );
   }
 
   HilightAttributes()->UIsoAspect()->SetNumber( 0 );
index acabf5aa972386be9114bd84b6a8cf49fca00007..f9fe4a15bf4f7b9c1c0ef26551c5c34e184a033a 100644 (file)
 #include <AIS_ColoredShape.hxx>
 #include <AIS_ColorScale.hxx>
 
-DEFINE_STANDARD_HANDLE( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape )
 
 class HYDROGUI_LandCoverMapPrs : public AIS_ColoredShape
 {
 public:
-  DEFINE_STANDARD_RTTI( HYDROGUI_LandCoverMapPrs );
+  DEFINE_STANDARD_RTTIEXT( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape );
 
   HYDROGUI_LandCoverMapPrs( const Handle(HYDROData_LandCoverMap)& );
   virtual ~HYDROGUI_LandCoverMapPrs();
@@ -37,8 +36,8 @@ public:
   Handle(HYDROData_LandCoverMap) GetLandCoverMap() const;
   void SetLandCoverMap( const Handle(HYDROData_LandCoverMap)& );
 
-  Handle(Aspect_ColorScale) GetColorScale() const;
-  void SetColorScale( const Handle(Aspect_ColorScale)& );
+  Handle(AIS_ColorScale) GetColorScale() const;
+  void SetColorScale( const Handle(AIS_ColorScale)& );
 
   Handle(HYDROData_StricklerTable) GetTable() const;
   void SetTable( const Handle(HYDROData_StricklerTable)& );
@@ -59,7 +58,7 @@ protected:
 
 private:
   Handle(HYDROData_LandCoverMap)   myLCMap;
-  Handle(Aspect_ColorScale)        myColorScale;
+  Handle(AIS_ColorScale)           myColorScale;
   Handle(HYDROData_StricklerTable) myTable;
 };
 
index b112dd34a5c3d2261b47df452e377369f3654e54..79f46d95572263bb60878daf54245948ae2a30c4 100644 (file)
@@ -51,9 +51,6 @@ HYDROGUI_ListModel::HYDROGUI_ListModel( QObject* theParent )
     myEye = QPixmap( 16, 16 );
     myEye.fill( Qt::black );
   }
-
-  // Set the supported drag actions for the items in the model
-  setSupportedDragActions( Qt::MoveAction | Qt::CopyAction );
 }
 
 /**
@@ -128,9 +125,9 @@ int HYDROGUI_ListModel::rowCount( const QModelIndex &theParent ) const
 */
 void HYDROGUI_ListModel::setObjects( const Object2VisibleList& theObjects )
 {
+  beginResetModel();
   myObjects = theObjects;
-
-  reset();
+  endResetModel();
 }
 
 /**
@@ -154,9 +151,9 @@ HYDROGUI_ListModel::ObjectList HYDROGUI_ListModel::getObjects() const
 */
 void HYDROGUI_ListModel::addObject( const Object2Visible& theObject )
 {
+  beginResetModel();
   myObjects << theObject;
-
-  reset();
+  endResetModel();
 }
 
 /**
@@ -172,9 +169,9 @@ void HYDROGUI_ListModel::removeObjectByName( const QString& theObjectName )
     }
   }
 
+  beginResetModel();
   myObjects.removeAll(anItem);
-
-  reset();
+  endResetModel();
 }
 
 
@@ -287,6 +284,14 @@ Qt::DropActions HYDROGUI_ListModel::supportedDropActions() const
   return Qt::MoveAction | Qt::CopyAction;
 }
 
+/**
+*/
+Qt::DropActions HYDROGUI_ListModel::supportedDragActions() const
+{
+  // Set the supported drag actions for the items in the model
+  return Qt::MoveAction | Qt::CopyAction;
+}
+
 /**
   Get list of ids by the list model indexes.
   @param theIsToSort defines if the list of ids should be sorted in ascending order
@@ -492,6 +497,7 @@ void HYDROGUI_ListModel::setDecorationEnabled( const bool theIsToEnable )
 
 void HYDROGUI_ListModel::undoLastMove()
 {
+  beginResetModel();
   myObjects = myPrevObjects;
-  reset();
+  endResetModel();
 }
index adc0e42c1e55996eb0fc00674b9becedf024e66d..8d19b52f13a29f8706ca7202a5145879444b7703 100644 (file)
@@ -57,6 +57,7 @@ public:
   virtual bool dropMimeData( const QMimeData* theData, Qt::DropAction theAction,
                              int theRow, int theColumn, const QModelIndex& theParent );
   virtual Qt::DropActions supportedDropActions() const;
+  virtual Qt::DropActions supportedDragActions() const;
 
   QList<int> getIds( const QModelIndexList& theIndexes, bool theIsToSort = true ) const;
 
@@ -88,4 +89,4 @@ private:
   bool myIsDecorationEnabled;
 };
 
-#endif
\ No newline at end of file
+#endif
index b7505b0c0d19a980056972e8ba9df22c9b1ffa2a..6f5081110ab3a624f5d3235d7536a798ce976768 100644 (file)
@@ -36,8 +36,7 @@
 #include <AIS_InteractiveContext.hxx>
 #include <AIS_ListIteratorOfListOfInteractive.hxx>
 #include <AIS_ListOfInteractive.hxx>
-
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
 
 #include <TColStd_SequenceOfInteger.hxx>
 
@@ -163,12 +162,12 @@ HYDROGUI_Shape* HYDROGUI_OCCDisplayer::createShape( const int
     return aResShape;
 
   if( theObject->IsKind( STANDARD_TYPE( HYDROData_Image ) ) )
-    aResShape = new HYDROGUI_ShapeImage( theContext, Handle_HYDROData_Image::DownCast( theObject ) );
+    aResShape = new HYDROGUI_ShapeImage( theContext, Handle(HYDROData_Image)::DownCast( theObject ) );
   else if( theObject->IsKind( STANDARD_TYPE( HYDROData_Bathymetry ) ) )
-    aResShape = new HYDROGUI_ShapeBathymetry( this, theContext, Handle_HYDROData_Bathymetry::DownCast( theObject ) );
+    aResShape = new HYDROGUI_ShapeBathymetry( this, theContext, Handle(HYDROData_Bathymetry)::DownCast( theObject ) );
   else if( theObject->IsKind( STANDARD_TYPE( HYDROData_LandCoverMap ) ) ) {
     bool isScalarMode = module()->isLandCoversScalarMapModeOn( theViewerId );
-    aResShape = new HYDROGUI_ShapeLandCoverMap( this, theContext, Handle_HYDROData_LandCoverMap::DownCast( theObject ), -1, isScalarMode );
+    aResShape = new HYDROGUI_ShapeLandCoverMap( this, theContext, Handle(HYDROData_LandCoverMap)::DownCast( theObject ), -1, isScalarMode );
   }
   else
     aResShape = new HYDROGUI_Shape( theContext, theObject );
@@ -465,10 +464,10 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
     }
   }
 
-  Handle(Aspect_ColorScale) aColorScale;
+  Handle(AIS_ColorScale) aColorScale = GetColorScale( aViewerId );
+  Handle(AIS_InteractiveContext) aCtx = theViewer->getAISContext();
   if( isDisplayColorScale )
   {
-    aColorScale = aView->ColorScale();
     if( !aColorScale.IsNull() )
     {
       aColorScale->SetXPosition( anXPos );
@@ -481,6 +480,8 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
 
       aColorScale->SetTitle( aColorScaleTitle );
       aColorScale->SetRange( aColorScaleMin, aColorScaleMax );
+      
+      aColorScale->SetToUpdate();
 
       if ( !isLandCoverColoringOn ) {
         foreach( HYDROGUI_Shape* aShape, aBathShapes ) {
@@ -491,14 +492,17 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
           aBathShape->UpdateWithColorScale( aColorScale );
         }
       }
+      
+      if ( !aCtx.IsNull() && !aCtx->IsDisplayed( aColorScale ) ) {
+        aCtx->Display( aColorScale );
+      }
     }
-    if( !aView->ColorScaleIsDisplayed() )
-      aView->ColorScaleDisplay();
   }
   else
   {
-    if( aView->ColorScaleIsDisplayed() )
-      aView->ColorScaleErase();
+    if ( !aCtx.IsNull() && aCtx->IsDisplayed( aColorScale ) ) {
+      aCtx->Erase( aColorScale );
+    }
   }
 
   foreach( HYDROGUI_Shape* aShape, aLandCoverMapShapes ) {
@@ -526,3 +530,16 @@ void HYDROGUI_OCCDisplayer::UpdateColorScale( const OCCViewer_Viewer* theViewer
   
   myToUpdateColorScale = false;
 }
+
+Handle(AIS_ColorScale) HYDROGUI_OCCDisplayer::GetColorScale( const int theViewerId )
+{
+  Handle(AIS_ColorScale) aColorScale;
+
+  aColorScale = myColorScales.value( theViewerId, aColorScale );
+  if ( aColorScale.IsNull() ) {
+    aColorScale = new AIS_ColorScale();
+    myColorScales.insert( theViewerId, aColorScale );
+  }
+
+  return aColorScale;
+}
index 968e051ec2ec032fccc3c74ba2c47980fb0ba58d..92e20c815854ade1c62d9322833cf1fb7dc27df6 100644 (file)
@@ -23,6 +23,7 @@
 
 class HYDROGUI_Shape;
 class AIS_InteractiveContext;
+class AIS_ColorScale;
 class OCCViewer_ViewManager;
 class OCCViewer_Viewer;
 
@@ -74,6 +75,13 @@ public:
 
   void SetToUpdateColorScale();
 
+  /**
+   * \brief Get color scale for the viewer.
+   * \param theViewerId viewer identifier
+   * \return the color scale 
+   */
+  Handle(AIS_ColorScale)          GetColorScale( const int theViewerId );
+
 protected:
   /**
    * \brief Erase all viewer objects.
@@ -145,6 +153,8 @@ private:
 
 private:
   bool myToUpdateColorScale;
+  
+  QMap<int, Handle(AIS_ColorScale)> myColorScales;
 };
 
 #endif
index 0d7061cb0a91ebeaacb9c2198c90c28918151449..0b008616eb8ae6a49aee0c150043d076ce3f742e 100644 (file)
@@ -530,7 +530,6 @@ void HYDROGUI_PriorityTableModel::undoLastChange()
   beginResetModel();
   myRules = myPrevRules;
   endResetModel();
-  reset();
 }
 
 /**
index e6e15e01ab30be5cacd3357085e3af3866c8493f..2f84a8229570b92dfa9bd6f83734042a80a5db6f 100644 (file)
@@ -154,12 +154,12 @@ HYDROGUI_PriorityWidget::HYDROGUI_PriorityWidget( QWidget* theParent )
 
   // Set resize mode
   myTable->horizontalHeader()->setStretchLastSection( false);
-  myTable->horizontalHeader()->setResizeMode( 0, QHeaderView::Stretch );
-  myTable->horizontalHeader()->setResizeMode( 1, QHeaderView::ResizeToContents );
-  myTable->horizontalHeader()->setResizeMode( 2, QHeaderView::Stretch );
-  myTable->horizontalHeader()->setResizeMode( 3, QHeaderView::ResizeToContents );
+  myTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::Stretch );
+  myTable->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+  myTable->horizontalHeader()->setSectionResizeMode( 2, QHeaderView::Stretch );
+  myTable->horizontalHeader()->setSectionResizeMode( 3, QHeaderView::ResizeToContents );
 
-  myTable->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+  myTable->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
  
   // Layout
   // buttons
index 5b73a7ad9778c00897f7352041966d7b131450b5..f6bc47aed842707a0af7f91ca59ac4f22fbc4200 100644 (file)
@@ -480,10 +480,10 @@ void HYDROGUI_Shape::setZLayer( const int theZLayer )
     myContext->SetZLayer( myShape, myZLayer );
 }
 
-Handle_AIS_InteractiveObject HYDROGUI_Shape::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_Shape::createShape() const
 {
   if( myTopoShape.IsNull() ) {
-    return Handle_AIS_InteractiveObject();
+    return Handle(AIS_InteractiveObject)();
   }
 
   TopAbs_ShapeEnum aShapeType = myTopoShape.ShapeType();
@@ -513,7 +513,7 @@ void HYDROGUI_Shape::buildShape()
   if( myShape.IsNull() )
     return;
 
-  Handle_AIS_Shape anAISShape = Handle_AIS_Shape::DownCast( myShape );
+  Handle(AIS_Shape) anAISShape = Handle(AIS_Shape)::DownCast( myShape );
   if( !anAISShape.IsNull() )
     anAISShape ->SetHLRAngleAndDeviation( 0.001 );
 
@@ -523,9 +523,8 @@ void HYDROGUI_Shape::buildShape()
   if ( !myObject.IsNull() && !myObject->IsKind( STANDARD_TYPE(HYDROData_LandCoverMap) ) )
     myShape->SetTransparency( 0 );
   myShape->SetDisplayMode( (AIS_DisplayMode)myDisplayMode );
-  myShape->SetSelectionMode( (Standard_Integer)mySelectionMode );
 
-    // Init default params for shape
+  // Init default params for shape
   const Handle(Prs3d_Drawer)& anAttributes = myShape->Attributes();
   if ( !anAttributes.IsNull() )
   {
@@ -677,4 +676,4 @@ void HYDROGUI_Shape::setDisplayMode( int theDisplayMode )
 void HYDROGUI_Shape::setSelectionMode( int theSelectionMode )
 {
   mySelectionMode = theSelectionMode;
-}
\ No newline at end of file
+}
index 5447abb04b7a98660d1c32d72741b2adce0da109..76113ba1a6da1ebbb494b68ccdc77ebb17b42d95 100644 (file)
@@ -109,7 +109,7 @@ protected:
   virtual void               eraseShape( const bool theIsUpdateViewer );
 
   virtual QColor             getActiveColor() const;
-  virtual Handle_AIS_InteractiveObject createShape() const;
+  virtual Handle(AIS_InteractiveObject) createShape() const;
 
   void setDisplayMode( int theDisplayMode );
 
index cd9e913411139864c064a23301eb1e3bd9d2168d..72150112d50b35710a8ccfecce7fafe66ebba4c7 100644 (file)
 #include <HYDROData_Bathymetry.h>
 
 #include <AIS_InteractiveContext.hxx>
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
 #include <Prs3d_PointAspect.hxx>
 
 HYDROGUI_ShapeBathymetry::HYDROGUI_ShapeBathymetry( HYDROGUI_OCCDisplayer*                theDisplayer,
                                                     const Handle(AIS_InteractiveContext)& theContext,
-                                                    const Handle_HYDROData_Bathymetry&    theBathymetry,
+                                                    const Handle(HYDROData_Bathymetry)&   theBathymetry,
                                                     const int                             theZLayer )
 : HYDROGUI_Shape( theContext, theBathymetry, theZLayer ),
   myDisplayer( theDisplayer )
@@ -58,12 +58,14 @@ void HYDROGUI_ShapeBathymetry::update( bool theIsUpdateViewer, bool isDeactivate
 }
 
 
-Handle_AIS_InteractiveObject HYDROGUI_ShapeBathymetry::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_ShapeBathymetry::createShape() const
 {
-  Handle_HYDROData_Bathymetry aBath = Handle_HYDROData_Bathymetry::DownCast( getObject() );
+  Handle(AIS_InteractiveObject) aPntCloud;
+
+  Handle(HYDROData_Bathymetry) aBath = Handle(HYDROData_Bathymetry)::DownCast( getObject() );
   if( !aBath.IsNull() )
   {
-    Handle(AIS_PointCloud) aPntCloud = new HYDROGUI_BathymetryPrs();
+    aPntCloud = new HYDROGUI_BathymetryPrs();
     aPntCloud->SetHilightMode( AIS_PointCloud::DM_BndBox );
     aPntCloud->Attributes()->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_POINT, Quantity_NOC_WHITE, 2.0));
 
@@ -76,11 +78,9 @@ Handle_AIS_InteractiveObject HYDROGUI_ShapeBathymetry::createShape() const
     aThat->myColors = new Quantity_HArray1OfColor( aLower, anUpper );
     for( int i=aLower; i<=anUpper; i++ )
       aThat->myCoords->SetValue( i, aBathPoints.Value( i ) );
-
-    return aPntCloud;
   }
-  else
-    return Handle_AIS_InteractiveObject();
+
+  return aPntCloud;
 }
 
 void HYDROGUI_ShapeBathymetry::GetRange( double& theMin, double& theMax ) const
@@ -102,7 +102,7 @@ void HYDROGUI_ShapeBathymetry::GetRange( double& theMin, double& theMax ) const
   }
 }
 
-void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(Aspect_ColorScale)& theColorScale )
+void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(AIS_ColorScale)& theColorScale )
 {
   for( int i=myCoords->Lower(), n=myCoords->Upper(); i<=n; i++ )
   {
@@ -111,7 +111,7 @@ void HYDROGUI_ShapeBathymetry::UpdateWithColorScale( const Handle(Aspect_ColorSc
     theColorScale->FindColor( z, aColor );
     myColors->SetValue( i, aColor );
   }
-  Handle_AIS_PointCloud aPntCloud = Handle_AIS_PointCloud::DownCast( getAISObject() );
+  Handle(AIS_PointCloud) aPntCloud = Handle(AIS_PointCloud)::DownCast( getAISObject() );
   aPntCloud->SetPoints( myCoords, myColors );
   getContext()->Redisplay( aPntCloud, Standard_False );
 }
index f71e433643d02ebecdaf0cd755f24b26b03771ba..459acd5853bb876b591c5b58d34197e1cf99d414 100644 (file)
@@ -24,7 +24,7 @@
 #include <Quantity_HArray1OfColor.hxx>
 
 class HYDROData_Bathymetry;
-class Aspect_ColorScale;
+class AIS_ColorScale;
 class HYDROGUI_OCCDisplayer;
 
 class HYDROGUI_ShapeBathymetry : public HYDROGUI_Shape
@@ -37,7 +37,7 @@ public:
   virtual ~HYDROGUI_ShapeBathymetry();
 
   void GetRange( double& theMin, double& theMax ) const;
-  void UpdateWithColorScale( const Handle(Aspect_ColorScale)& );
+  void UpdateWithColorScale( const Handle(AIS_ColorScale)& );
 
   virtual void display( const bool theIsUpdateViewer = true );
   virtual void erase( const bool theIsUpdateViewer = true );
index e9ecc0c524115cb06509c116f3638deb36f9e8ca..4f832399d26895271f03bb09d14b9c3469372d0e 100644 (file)
@@ -48,12 +48,15 @@ void HYDROGUI_ShapeImage::update( bool theIsUpdateViewer, bool isDeactivateSelec
 
 Handle(AIS_InteractiveObject) HYDROGUI_ShapeImage::createShape() const
 {
-    Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast( getObject() );
-    if ( anImageObj.IsNull() )
-        return Handle_AIS_InteractiveObject();
+  Handle(HYDROGUI_ImagePrs) aPrs;
 
-    Handle(HYDROGUI_ImagePrs) aPrs = new HYDROGUI_ImagePrs( imagePixMap( anImageObj ), imageContour( anImageObj ) );
-    return aPrs;
+  Handle(HYDROData_Image) anImageObj = Handle(HYDROData_Image)::DownCast( getObject() );
+  if ( !anImageObj.IsNull() )
+  {
+    aPrs = new HYDROGUI_ImagePrs( imagePixMap( anImageObj ), imageContour( anImageObj ) );
+  }
+
+  return aPrs;
 }
 
 Handle(Image_PixMap) HYDROGUI_ShapeImage::imagePixMap( const Handle(HYDROData_Image)& theImageObj ) const
@@ -81,7 +84,7 @@ Handle(Image_PixMap) HYDROGUI_ShapeImage::imagePixMap( const Handle(HYDROData_Im
     return aPix;
 }
 
-QPolygonF HYDROGUI_ShapeImage::imageContour( const Handle_HYDROData_Image& theImageObj ) const
+QPolygonF HYDROGUI_ShapeImage::imageContour( const Handle(HYDROData_Image)& theImageObj ) const
 {
     QPolygonF aContour;
     if ( !theImageObj.IsNull() )
index e9cf07a4dd26e721c216bea9a71aeb63a36aeeac..aba5b82b4b2d45516f9fb8dcb547fb18abebc514 100644 (file)
 
 #include <QPolygonF>
 
-class Handle_HYDROData_Image;
+class HYDROData_Image;
 
 class HYDROGUI_ShapeImage : public HYDROGUI_Shape
 {
 public:
   HYDROGUI_ShapeImage( const Handle(AIS_InteractiveContext)& theContext,
-                       const Handle_HYDROData_Image&         theImage,
+                       const Handle(HYDROData_Image)&        theImage,
                        const int                             theZLayer = -1 );
   virtual ~HYDROGUI_ShapeImage();
 
   virtual void                         update( bool isUpdateViewer, bool isDeactivateSelection );
 
 protected:
-  virtual Handle_AIS_InteractiveObject createShape() const;
-  Handle(Image_PixMap)                 imagePixMap( const Handle_HYDROData_Image& ) const;
-  QPolygonF                            imageContour( const Handle_HYDROData_Image& ) const;
+  virtual Handle(AIS_InteractiveObject) createShape() const;
+  Handle(Image_PixMap)                  imagePixMap( const Handle(HYDROData_Image)& ) const;
+  QPolygonF                             imageContour( const Handle(HYDROData_Image)& ) const;
 };
 
 #endif
index 0a6b59abe3394840719ac12413ed4943f8e4c2c0..3446545e3db4973a5ed49219077f8079eaa82aa3 100644 (file)
@@ -34,7 +34,7 @@
 
 HYDROGUI_ShapeLandCoverMap::HYDROGUI_ShapeLandCoverMap( HYDROGUI_OCCDisplayer* theDisplayer,
                                                         const Handle(AIS_InteractiveContext)& theContext,
-                                                        const Handle_HYDROData_LandCoverMap&  theLandCoverMap,
+                                                        const Handle(HYDROData_LandCoverMap)& theLandCoverMap,
                                                         const int                             theZLayer,
                                                         const bool                            theIsScalarMode )
 : HYDROGUI_Shape( theContext, theLandCoverMap, theZLayer ),
@@ -91,7 +91,7 @@ void HYDROGUI_ShapeLandCoverMap::displayShape( const bool theIsUpdateViewer )
   myDisplayer->SetToUpdateColorScale();
 }
 
-Handle_AIS_InteractiveObject HYDROGUI_ShapeLandCoverMap::createShape() const
+Handle(AIS_InteractiveObject) HYDROGUI_ShapeLandCoverMap::createShape() const
 {
   Handle(HYDROData_LandCoverMap) aLandCoverMap = Handle(HYDROData_LandCoverMap)::DownCast( getObject() );
   if ( !aLandCoverMap.IsNull() )
@@ -115,13 +115,7 @@ Handle_AIS_InteractiveObject HYDROGUI_ShapeLandCoverMap::createShape() const
             aLandCoverMapPrs->SetTable( aTable );
 
           // Set color scale
-          OCCViewer_ViewWindow* aWnd = dynamic_cast<OCCViewer_ViewWindow*>( aViewer->getViewManager()->getActiveView() );
-          Handle(V3d_View) aView = aWnd->getViewPort()->getView();
-          if( !aView.IsNull() )
-          {
-            Handle(Aspect_ColorScale) aColorScale = aView->ColorScale();
-            aLandCoverMapPrs->SetColorScale( aColorScale );
-          }
+          aLandCoverMapPrs->SetColorScale( myDisplayer->GetColorScale( aViewerId) );
         }
       }
     }
index 263c23294b2478a3e6bcdf65011cd56eff45604b..526c52e59ce03d97a4e8d4040842bb1690368a80 100644 (file)
 #include <HYDROGUI_Shape.h>
 
 class HYDROGUI_OCCDisplayer;
-class Handle_HYDROData_LandCoverMap;
+class HYDROData_LandCoverMap;
 
 class HYDROGUI_ShapeLandCoverMap : public HYDROGUI_Shape
 {
 public:
   HYDROGUI_ShapeLandCoverMap( HYDROGUI_OCCDisplayer* theDisplayer,
                               const Handle(AIS_InteractiveContext)& theContext,
-                              const Handle_HYDROData_LandCoverMap&  theLandCoverMap,
+                              const Handle(HYDROData_LandCoverMap)& theLandCoverMap,
                               const int                             theZLayer = -1,
                               const bool                            theIsScalarMode = false );
   virtual ~HYDROGUI_ShapeLandCoverMap();
@@ -54,7 +54,7 @@ public:
 
 protected:
   virtual void              displayShape( const bool theIsUpdateViewer );
-  virtual Handle_AIS_InteractiveObject createShape() const;
+  virtual Handle(AIS_InteractiveObject) createShape() const;
 
 private:
   HYDROGUI_OCCDisplayer*           myDisplayer;
index 6c14e957b622ccf0a18bf9efc689452617cb6606..07bb17adb371ac2b8fd98f6345bf213b61e874dc 100644 (file)
@@ -46,7 +46,7 @@ HYDROGUI_ColorDelegate::~HYDROGUI_ColorDelegate()
 void HYDROGUI_ColorDelegate::paint( QPainter* thePainter, const QStyleOptionViewItem& theOption,
                                     const QModelIndex& theIndex ) const
 {
-  QColor aColor = qVariantValue<QColor>( theIndex.data( Qt::BackgroundColorRole ) );
+  QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value<QColor>();
   thePainter->fillRect( theOption.rect, aColor );
 }
 
@@ -54,7 +54,7 @@ QWidget* HYDROGUI_ColorDelegate::createEditor( QWidget* theParent,
                                                const QStyleOptionViewItem& theOption,
                                                const QModelIndex& theIndex ) const
 {
-  QColor aColor = qVariantValue<QColor>( theIndex.data( Qt::BackgroundColorRole ) );
+  QColor aColor = theIndex.data( Qt::BackgroundColorRole ).value<QColor>();
   QColor aNewColor = QColorDialog::getColor( aColor );
   if( aNewColor.isValid() )
   {
@@ -166,13 +166,13 @@ HYDROGUI_StricklerTableDlg::HYDROGUI_StricklerTableDlg( HYDROGUI_Module* theModu
     myTable->setHorizontalHeaderLabels( aColumnNames );
 
     myTable->horizontalHeader()->setStretchLastSection( false );
-    myTable->horizontalHeader()->setResizeMode( 0, QHeaderView::ResizeToContents );
-    myTable->horizontalHeader()->setResizeMode( 1, QHeaderView::ResizeToContents );
-    myTable->horizontalHeader()->setResizeMode( 2, QHeaderView::ResizeToContents );
-    myTable->horizontalHeader()->setResizeMode( 3, QHeaderView::Stretch );
+    myTable->horizontalHeader()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+    myTable->horizontalHeader()->setSectionResizeMode( 1, QHeaderView::ResizeToContents );
+    myTable->horizontalHeader()->setSectionResizeMode( 2, QHeaderView::ResizeToContents );
+    myTable->horizontalHeader()->setSectionResizeMode( 3, QHeaderView::Stretch );
     myTable->horizontalHeader()->setMinimumSectionSize( 50 );
 
-    myTable->verticalHeader()->setResizeMode( QHeaderView::ResizeToContents );
+    myTable->verticalHeader()->setSectionResizeMode( QHeaderView::ResizeToContents );
 
     // Layout
     // buttons
@@ -250,7 +250,7 @@ void HYDROGUI_StricklerTableDlg::setTableNameReadOnly( bool on )
     myName->setReadOnly( on );
 }
 
-void HYDROGUI_StricklerTableDlg::getGuiData( Handle_HYDROData_StricklerTable& theTable ) const
+void HYDROGUI_StricklerTableDlg::getGuiData( Handle(HYDROData_StricklerTable)& theTable ) const
 {
   if( theTable.IsNull() )
     return;
@@ -278,7 +278,7 @@ void HYDROGUI_StricklerTableDlg::getGuiData( Handle_HYDROData_StricklerTable& th
   }
 }
 
-void HYDROGUI_StricklerTableDlg::setGuiData( const Handle_HYDROData_StricklerTable& theTable )
+void HYDROGUI_StricklerTableDlg::setGuiData( const Handle(HYDROData_StricklerTable)& theTable )
 {
   myAttrName->setText( theTable->GetAttrName() );
 
index 8f592db39a46cf4452280d442ae70158f67b23c0..321a72cdc7f44ad5d83d9fd0bb3761740ff50172 100644 (file)
@@ -46,7 +46,7 @@ HYDROGUI_StricklerTypeComboBox::HYDROGUI_StricklerTypeComboBox( HYDROGUI_Module*
   if ( myModule )
   {
     // Construct a list of unique names of all Strickler types defined within the data model
-    Handle_HYDROData_Document aDoc = HYDROData_Document::Document( myModule->getStudyId() );
+    Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myModule->getStudyId() );
     if ( aDoc )
     {
       QStringList aStricklerTypes;
index f86499f2b94171631fa6e7e5688ecdeb05ebc8ee..af92511763d2b47ad114139193fead1db1e44637 100644 (file)
@@ -200,7 +200,7 @@ HYDROData_SequenceOfObjects HYDROGUI_Tool::GetObjectBackReferences( const Handle
 }
 
 QMap<QString,HYDROData_SequenceOfObjects> HYDROGUI_Tool::GetObjectsBackReferences(
-  const Handle_HYDROData_Document& theDocument, const QStringList& theObjectNames )
+  const Handle(HYDROData_Document)& theDocument, const QStringList& theObjectNames )
 {
   QMap<QString,HYDROData_SequenceOfObjects> aResMap;
 
@@ -268,7 +268,7 @@ QStringList HYDROGUI_Tool::FindExistingObjectsNames( const Handle(HYDROData_Docu
     
     if( isOK && isCheckValidProfile )
     {
-      Handle_HYDROData_Profile aProfile = Handle_HYDROData_Profile::DownCast( anObject );
+      Handle(HYDROData_Profile) aProfile = Handle(HYDROData_Profile)::DownCast( anObject );
       if( !aProfile.IsNull() && !aProfile->IsValid() )
         isOK = false;
     }
index c87743e04fb7e78f46a76669b74a744d364c7aad..ef1962e806843c903ee22a05a0b1f0821fc2bd86 100644 (file)
@@ -244,7 +244,7 @@ ObjectKind HYDROGUI_Tool::GetSelectedPartition( HYDROGUI_Module* theModule )
     {
       anEntry.remove( aPrefix );
       for( ObjectKind anObjectKind = KIND_UNKNOWN + 1; anObjectKind <= KIND_LAST; anObjectKind++ )
-        if( HYDROGUI_DataModel::tr( HYDROGUI_DataModel::partitionName( anObjectKind ).toAscii() ) == anEntry )
+        if( HYDROGUI_DataModel::tr( HYDROGUI_DataModel::partitionName( anObjectKind ).toLatin1() ) == anEntry )
           return anObjectKind;
     }
   }
index 52969e5e353aacc4b71db07ffff442ff15dd02ea..af8b9bf89502ebdaa90f3363c142c8ef10265665 100644 (file)
@@ -192,8 +192,7 @@ void HYDROGUI_VTKPrsShape::buildShape()
         HYDROData_SequenceOfObjects::Iterator anIter( aRefObjects );
         for ( ; anIter.More(); anIter.Next() )
         {
-          Handle(HYDROData_Entity) aRefbject = 
-            Handle(HYDROData_Entity)::DownCast( anIter.Value() );
+          Handle(HYDROData_Entity) aRefbject = anIter.Value();
           if ( aRefbject.IsNull() )
             continue;
 
index 0fe911d488f0c16f487867dbcf95a4674bd53326..4cd49e8b055dd0218ae9cd15150ed444e1c372be 100644 (file)
@@ -23,7 +23,7 @@
 
 void SetZLayerForPrs( const Handle(PrsMgr_Presentation)& thePrs, int theLayerId );
 
-void SetPrsZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject,
+void SetPrsZLayer( const Handle(PrsMgr_PresentableObject)& thePresentableObject,
                    const int theMode, const int theLayerId )
 {
   PrsMgr_Presentations& aPresentations = thePresentableObject->Presentations();
@@ -37,7 +37,7 @@ void SetPrsZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject,
   }
 }
 
-void SetZLayerSettings( const Handle_V3d_Viewer& theViewer3d, int theLayerId, bool theIsOrdered )
+void SetZLayerSettings( const Handle(V3d_Viewer)& theViewer3d, int theLayerId, bool theIsOrdered )
 {
   if ( theViewer3d.IsNull() /*|| theLayerId < 0*/ )
   {
@@ -65,7 +65,7 @@ void SetZLayerSettings( const Handle_V3d_Viewer& theViewer3d, int theLayerId, bo
   theViewer3d->SetZLayerSettings( theLayerId, aSettings );
 }
 
-int CreateTopZLayer( const Handle_V3d_Viewer& theViewer3d )
+int CreateTopZLayer( const Handle(V3d_Viewer)& theViewer3d )
 {
   int aTopZLayer = -1;
 
@@ -77,7 +77,7 @@ int CreateTopZLayer( const Handle_V3d_Viewer& theViewer3d )
 }
 
 
-HYDROGUI_ZLayersIterator::HYDROGUI_ZLayersIterator( const Handle_V3d_Viewer& theViewer )
+HYDROGUI_ZLayersIterator::HYDROGUI_ZLayersIterator( const Handle(V3d_Viewer)& theViewer )
   : myIndex( 0 ), myNewZLayer( -1 ), myViewer( theViewer )
 {
   Init( theViewer );
@@ -87,7 +87,7 @@ HYDROGUI_ZLayersIterator::~HYDROGUI_ZLayersIterator()
 {
 }
 
-void HYDROGUI_ZLayersIterator::Init( const Handle_V3d_Viewer& theViewer )
+void HYDROGUI_ZLayersIterator::Init( const Handle(V3d_Viewer)& theViewer )
 {
   TColStd_SequenceOfInteger anExistingZLayers;
   theViewer->GetAllZLayers( anExistingZLayers );
index 76bd41b06414b7c0802b1b98727aaf4775d4a6a0..af9391c7e8c5afcc1d014cba9e16c70e636c6448 100644 (file)
@@ -24,7 +24,7 @@
 #include <AIS_Trihedron.hxx>
 #include <PrsMgr_PresentationManager3d.hxx>
 
-void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle_AIS_InteractiveContext& theContext,
+void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle(AIS_InteractiveContext)& theContext,
                                                             int theLayer )
 {
   AIS_ListOfInteractive aDisplayedObjects;
index 0d0ab6bc3cc5ee1b2feb31b4c4d7251b50e30fa7..6da859d9a4ede9ff32f9f022bd03304fe2aef58d 100644 (file)
@@ -65,8 +65,7 @@ QString HYDROGUI_Zone::getRefObjectNames() const
     HYDROData_SequenceOfObjects::Iterator anIter( aSeq );
     for ( ; anIter.More(); anIter.Next() )
     {
-      Handle(HYDROData_Entity) aRefGeomObj =
-        Handle(HYDROData_Entity)::DownCast( anIter.Value() );
+      Handle(HYDROData_Entity) aRefGeomObj = anIter.Value();
       if ( !aRefGeomObj.IsNull() )
       {
         // Get Ref.Object name
index 6064009713a529d5e0ef2e2ff9dc60fe7373f717..7a28b9705d10a3b04d619fb0543ef7c60bc9c81b 100644 (file)
@@ -74,7 +74,7 @@ SET(_sip_files
 
 SET(_add_SOURCES
   sipHYDROPyNCollection_Sequence0100HYDROData_IPolylineSectionType.cc
-  sipHYDROPyNCollection_Sequence0100Handle_HYDROData_Entity.cc
+  sipHYDROPyNCollection_Sequence0600opencascadehandle0100HYDROData_Entity.cc
   sipHYDROPyNCollection_Sequence0100TCollection_AsciiString.cc
   sipHYDROPyNCollection_Sequence0100gp_XY.cc
   sipHYDROPyNCollection_Sequence0100gp_XYZ.cc
index cbca3857558b5e3cdb4e85a8e01ff02c4dc45ab6..cc6dbe86b7040b66162242703751e353348c13e0 100644 (file)
@@ -87,7 +87,7 @@ public:
   /**
    * Add new one reference geometry object for calculation case.
    */
-  bool AddGeometryObject( HYDROData_Object theObject ) [bool ( const Handle_HYDROData_Object& )];
+  bool AddGeometryObject( HYDROData_Object theObject ) [bool ( const opencascade::handle<HYDROData_Object>& )];
   %MethodCode
     Handle(HYDROData_Object) aRef =
       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
@@ -109,7 +109,7 @@ public:
    * Removes reference geometry object from calculation case.
    */
   void RemoveGeometryObject( HYDROData_Object theObject )
-  [void ( const Handle_HYDROData_Object& )];
+  [void ( const opencascade::handle<HYDROData_Object>& )];
   %MethodCode
     Handle(HYDROData_Object) aRef =
       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
@@ -134,7 +134,7 @@ public:
   /**
    * Add new one reference geometry group for calculation case.
    */
-  bool AddGeometryGroup( HYDROData_ShapesGroup theGroup ) [bool ( const Handle_HYDROData_ShapesGroup& )];
+  bool AddGeometryGroup( HYDROData_ShapesGroup theGroup ) [bool ( const opencascade::handle<HYDROData_ShapesGroup>& )];
   %MethodCode
     Handle(HYDROData_ShapesGroup) aRef =
       Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) );
@@ -155,7 +155,7 @@ public:
   /**
    * Removes reference geometry group from calculation case.
    */
-  void RemoveGeometryGroup( HYDROData_ShapesGroup theGroup ) [void ( const Handle_HYDROData_ShapesGroup& )];
+  void RemoveGeometryGroup( HYDROData_ShapesGroup theGroup ) [void ( opencascade::handle<HYDROData_ShapesGroup>& )];
   %MethodCode
     Handle(HYDROData_ShapesGroup) aRef =
       Handle(HYDROData_ShapesGroup)::DownCast( createHandle( a0 ) );
@@ -180,7 +180,7 @@ public:
   /**
    * Sets reference boundary polyline object for calculation case.
    */
-  void SetBoundaryPolyline( HYDROData_PolylineXY thePolyline ) [void ( const Handle_HYDROData_PolylineXY& )];
+  void SetBoundaryPolyline( HYDROData_PolylineXY thePolyline ) [void ( opencascade::handle<HYDROData_PolylineXY>& )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
@@ -199,7 +199,7 @@ public:
   /**
    * Returns reference boundary polyline object of calculation case.
    */
-  HYDROData_PolylineXY GetBoundaryPolyline() const [Handle_HYDROData_PolylineXY ()];
+  HYDROData_PolylineXY GetBoundaryPolyline() const [opencascade::handle<HYDROData_PolylineXY> ()];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef;
     
@@ -223,7 +223,7 @@ public:
    * The label of theZone is changed during this operation
    * because of new region becomes the new parent for this zone.
    */
-  HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [Handle_HYDROData_Region ( const Handle_HYDROData_Zone& )];
+  HYDROData_Region AddNewRegion( HYDROData_Zone theZone ) [opencascade::handle<HYDROData_Region> ( opencascade::handle<HYDROData_Zone>& )];
   %MethodCode
     Handle(HYDROData_Zone) aRef =
       Handle(HYDROData_Zone)::DownCast( createHandle( a0 ) );
@@ -244,7 +244,7 @@ public:
    * Add new one reference region for calculation case.
    * The label of theRegion is changed in case if old parent is not this calculation.
    */
-  bool AddRegion( HYDROData_Region theRegion ) [bool ( const Handle_HYDROData_Region& )];
+  bool AddRegion( HYDROData_Region theRegion ) [bool ( opencascade::handle<HYDROData_Region>& )];
   %MethodCode
     Handle(HYDROData_Region) aRef =
       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
@@ -270,7 +270,7 @@ public:
   /**
    * Removes reference region from calculation case.
    */
-  void RemoveRegion( HYDROData_Region theRegion ) [void ( const Handle_HYDROData_Region& )];
+  void RemoveRegion( HYDROData_Region theRegion ) [void ( opencascade::handle<HYDROData_Region>& )];
   %MethodCode
     Handle(HYDROData_Region) aRef =
       Handle(HYDROData_Region)::DownCast( createHandle( a0 ) );
@@ -358,7 +358,7 @@ public:
   double GetAltitudeForPoint( const double     theCoordX,
                               const double     theCoordY,
                               HYDROData_Region theRegion ) const
-  [double ( const gp_XY&, const Handle_HYDROData_Region& )];
+  [double ( const gp_XY&, opencascade::handle<HYDROData_Region>& )];
   %MethodCode
     gp_XY aPnt( a0, a1 );
     Handle(HYDROData_Region) aRefRegion =
@@ -379,7 +379,7 @@ public:
   double GetAltitudeForPoint( const double theCoordX,
                               const double theCoordY,
                               HYDROData_Zone theZone ) const
-  [double ( const gp_XY&, const Handle_HYDROData_Zone& )];
+  [double ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];
   %MethodCode
     gp_XY aPnt( a0, a1 );
     Handle(HYDROData_Zone) aRefZone =
@@ -401,7 +401,7 @@ public:
                                                       const NCollection_Sequence<double>& theCoordsY,
                                                       HYDROData_Region                    theRegion,
                                                       int                                 theMethod = 0) const
-  [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, const Handle_HYDROData_Region&, int)];
+  [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Region>&, int)];
   %MethodCode
 
     NCollection_Sequence<gp_XY> aPnts;
@@ -436,7 +436,7 @@ public:
                                                       const NCollection_Sequence<double>& theCoordsY,
                                                       HYDROData_Zone                      theZone,
                                                       int                                 theMethod = 0) const
-  [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, const Handle_HYDROData_Zone&, int )];
+  [NCollection_Sequence<double> ( const NCollection_Sequence<gp_XY>&, opencascade::handle<HYDROData_Zone>&, int )];
   %MethodCode
 
     NCollection_Sequence<gp_XY> aPnts;
@@ -468,7 +468,7 @@ public:
    */
   HYDROData_Region GetRegionFromPoint( const double theCoordX,
                                        const double theCoordY ) const
-  [Handle_HYDROData_Region ( const gp_XY& )];
+  [opencascade::handle<HYDROData_Region> ( const gp_XY& )];
   %MethodCode
     Handle(HYDROData_Region) aRes;
     
@@ -489,7 +489,7 @@ public:
    */
   HYDROData_Zone GetZoneFromPoint( const double theCoordX,
                                    const double theCoordY ) const
-  [Handle_HYDROData_Zone ( const gp_XY& )];
+  [opencascade::handle<HYDROData_Zone> ( const gp_XY& )];
   %MethodCode
     Handle(HYDROData_Zone) aRes;
     
@@ -512,7 +512,7 @@ public:
   PointClassification GetPointClassification( const double theCoordX,
                                               const double theCoordY,
                                               HYDROData_Zone theZone ) const 
-  [PointClassification ( const gp_XY&, const Handle_HYDROData_Zone& )];    
+  [PointClassification ( const gp_XY&, opencascade::handle<HYDROData_Zone>& )];    
   %MethodCode
     gp_XY aPnt( a0, a1 );
 
@@ -533,12 +533,10 @@ public:
                 HYDROData_Entity                   theObject2,
                 HYDROData_Zone::MergeType          theMergeType,
                                HYDROData_CalculationCase::DataTag theDataTag )
-  [void ( const Handle_HYDROData_Entity&, HYDROData_PriorityType, const Handle_HYDROData_Entity&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
+  [void ( const opencascade::handle<HYDROData_Entity>&, HYDROData_PriorityType, opencascade::handle<HYDROData_Entity>&, HYDROData_Zone::MergeType, HYDROData_CalculationCase::DataTag )];
   %MethodCode
-    Handle(HYDROData_Entity) anObject1 =
-      Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
-    Handle(HYDROData_Entity) anObject2 =
-      Handle(HYDROData_Entity)::DownCast( createHandle( a2 ) );
+    Handle(HYDROData_Entity) anObject1 = createHandle( a0 );
+    Handle(HYDROData_Entity) anObject2 = createHandle( a2 );
 
     Py_BEGIN_ALLOW_THREADS
     sipSelfWasArg ? sipCpp->HYDROData_CalculationCase::AddRule( anObject1, a1, anObject2, a3, a4 ) : 
index 1ff170acce53a4222bea1ee22fb8426040c6d042..f1ef457ad7c53d671555f6108ba9be2d45425a1b 100644 (file)
@@ -63,7 +63,7 @@ public:
    * Sets reference guide line object for channel.
    */
   bool SetGuideLine( HYDROData_Polyline3D theGuideLine )
-  [bool ( const Handle_HYDROData_Polyline3D& )];
+  [bool ( const opencascade::handle<HYDROData_Polyline3D>& )];
   %MethodCode
     Handle(HYDROData_Polyline3D) aRef =
       Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
@@ -80,7 +80,7 @@ public:
    * Returns reference guide line object of channel.
    */
   HYDROData_Polyline3D GetGuideLine() const
-  [Handle_HYDROData_Polyline3D ()];
+  [opencascade::handle<HYDROData_Polyline3D> ()];
   %MethodCode
     Handle(HYDROData_Polyline3D) aRef;
     
@@ -102,7 +102,7 @@ public:
    * Sets reference profile object for channel.
    */
   bool SetProfile( HYDROData_Profile theProfile )
-  [bool ( const Handle_HYDROData_Profile& )];
+  [bool ( const opencascade::handle<HYDROData_Profile>& )];
   %MethodCode
     Handle(HYDROData_Profile) aRef =
       Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
@@ -119,7 +119,7 @@ public:
    * Returns reference profile object of channel.
    */
   HYDROData_Profile GetProfile() const
-  [Handle_HYDROData_Profile ()];
+  [opencascade::handle<HYDROData_Profile> ()];
   %MethodCode
     Handle(HYDROData_Profile) aRef;
     
index 4ebd3353f9aa4bf1be58f3b308dfd59a94236e13..882fe167ab7cd1444c472ad7bcc15896a8810877 100644 (file)
@@ -42,7 +42,8 @@ class HYDROData_Document
 %End
 
 %ConvertToSubClassCode
-    if ( !Handle(HYDROData_Document)::DownCast( sipCpp ).IsNull() )
+    HYDROData_Document* aDoc = dynamic_cast< HYDROData_Document*>( sipCpp );
+    if ( aDoc )
       sipClass = sipClass_HYDROData_Document;
     else
       sipClass = NULL;
@@ -199,7 +200,7 @@ class HYDROData_Document
 public:
 
   //! Returns the existing document or creates new if it is not exist
-  static HYDROData_Document Document( const int theStudyID ) [Handle_HYDROData_Document (const int)] ;
+  static HYDROData_Document Document( const int theStudyID ) [opencascade::handle<HYDROData_Document> (const int)] ;
   %MethodCode
 
     Handle(HYDROData_Document) aDocument;
@@ -273,7 +274,7 @@ public:
   //! Creates and locates in the document a new object
   //! \param theKind kind of the created object, can not be UNKNOWN
   //! \returns the created object
-  HYDROData_Entity CreateObject( const ObjectKind theKind ) [Handle_HYDROData_Entity (const ObjectKind)] ;
+  HYDROData_Entity CreateObject( const ObjectKind theKind ) [opencascade::handle<HYDROData_Entity> (const ObjectKind)] ;
   %MethodCode
 
     Handle(HYDROData_Entity) anObject;
@@ -288,7 +289,7 @@ public:
 
   HYDROData_Entity FindObjectByName( const QString&   theName,
                                      const ObjectKind theKind = KIND_UNKNOWN ) 
-  [Handle_HYDROData_Entity (const QString&, const ObjectKind)] ;
+  [opencascade::handle<HYDROData_Entity> (const QString&, const ObjectKind)] ;
   %MethodCode
 
     Handle(HYDROData_Entity) anObject;
index 4eae394f4e86a03f2095e38d41481646ffb62c6a..c9b676672b057c24642281f4c541696d28fd7492 100644 (file)
@@ -222,7 +222,7 @@ public:
    * Returns father object. For object created under root document label
    * this method always return NULL object.
    */
-  HYDROData_Entity GetFatherObject() const [Handle_HYDROData_Entity ()];
+  HYDROData_Entity GetFatherObject() const [opencascade::handle<HYDROData_Entity> ()];
   %MethodCode
     Handle(HYDROData_Entity) aFather;
     
@@ -244,7 +244,7 @@ public:
   /**
    * Returns the z-level for object presentation, -1 if no z-level.
    */
-  virtual bool GetZLevel( int& theLevel ) const [Standard_Boolean ( Standard_Integer& )];
+  virtual bool GetZLevel( int& theLevel ) const [bool ( Standard_Integer& )];
 
   /**
    * Set the z-level for object presentation.
index 1b5dfe4467b9557588fc838ea5c1a09d6ed6f985..23ed1ad9a944a2c5ed39075d8ccc29c19f4deacd 100644 (file)
@@ -56,7 +56,7 @@ public:
    * Sets the altitude object for interpolation.
    */
   void SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) 
-  [void ( const Handle_HYDROData_IAltitudeObject& )];
+  [void ( const opencascade::handle<HYDROData_IAltitudeObject>& )];
   %MethodCode
     Handle(HYDROData_IAltitudeObject) anAltitude =
       Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
@@ -74,7 +74,7 @@ public:
   /**
    * Returns the altitude object for interpolation.
    */
-  HYDROData_IAltitudeObject GetAltitudeObject() const [Handle_HYDROData_IAltitudeObject ()];
+  HYDROData_IAltitudeObject GetAltitudeObject() const [opencascade::handle<HYDROData_IAltitudeObject> ()];
   %MethodCode
     Handle(HYDROData_IAltitudeObject) aRes;
     
index 00e70250e7978f3ab0c48efad7ab9a8013ab6b6d..64935d935ef9e507ccffb6e3495592004d93ab59 100644 (file)
@@ -196,7 +196,7 @@ public:
                            const QPointF&  thePointB,
                            const QPointF&  thePointC = QPoint( INT_MIN, INT_MIN ),
                            const bool      theIsUpdate = true )
-  [void ( const Handle_HYDROData_Image&, const QPointF&, const QPointF&, const QPointF&, const bool )];
+  [void ( const opencascade::handle<HYDROData_Image>&, const QPointF&, const QPointF&, const QPointF&, const bool )];
   %MethodCode
     Handle(HYDROData_Image) aRefImage =
       Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
@@ -221,7 +221,7 @@ public:
                            QPointF&        thePointA /Out/,
                            QPointF&        thePointB /Out/,
                            QPointF&        thePointC /Out/ ) const
-  [bool ( const Handle_HYDROData_Image&, QPointF&, QPointF&, QPointF& )];
+  [bool ( const opencascade::handle<HYDROData_Image>&, QPointF&, QPointF&, QPointF& )];
   %MethodCode
     Handle(HYDROData_Image) aRefImage =
       Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
@@ -239,12 +239,11 @@ public:
    */
   bool HasReferencePoints() const;
 
-
   /**
    * Stores the reference image for transformation
    * \param theRefImage reference image
    */
-  void SetTrsfReferenceImage( HYDROData_Image theRefImage ) [void ( const Handle_HYDROData_Image& )];
+  void SetTrsfReferenceImage( HYDROData_Image theRefImage ) [void ( const opencascade::handle<HYDROData_Image>& )];
   %MethodCode
     Handle(HYDROData_Image) aRefImage =
       Handle(HYDROData_Image)::DownCast( createHandle( a0 ) );
@@ -260,7 +259,7 @@ public:
   /**
    * Returns the reference image for transformation
    */
-  HYDROData_Image GetTrsfReferenceImage() const [Handle_HYDROData_Image ()];
+  HYDROData_Image GetTrsfReferenceImage() const [opencascade::handle<HYDROData_Image> ()];
   %MethodCode
     Handle(HYDROData_Image) aRefImage;
     
@@ -299,7 +298,7 @@ public:
    * Appends reference to other object (image or polyline).
    * \param theReferenced the object referenced by this
    */
-  void AppendReference( HYDROData_Entity theReferenced ) [void ( const Handle_HYDROData_Entity& )];
+  void AppendReference( HYDROData_Entity theReferenced ) [void ( const opencascade::handle<HYDROData_Entity>& )];
   %MethodCode
     Handle(HYDROData_Entity) aRef = createHandle( a0 );
     if ( !aRef.IsNull() )
@@ -316,7 +315,7 @@ public:
    * \param theIndex number of reference [0; NbReference)
    * \returns the referenced object, or Null if index is invalid
    */
-  HYDROData_Entity Reference( const int theIndex ) const [Handle_HYDROData_Entity ()];
+  HYDROData_Entity Reference( const int theIndex ) const [opencascade::handle<HYDROData_Entity> ()];
   %MethodCode
     Handle(HYDROData_Entity) aRef;
     
@@ -335,7 +334,7 @@ public:
    * \param theReferenced the object referenced by this
    */
   void ChangeReference( const int theIndex, HYDROData_Entity theReferenced )
-  [void ( const int, const Handle_HYDROData_Entity& )];
+  [void ( const int, const opencascade::handle<HYDROData_Entity>& )];
   %MethodCode
     Handle(HYDROData_Entity) aRef = createHandle( a1 );
     if ( !aRef.IsNull() )
index bd9ecd7a9f6b4f69e467aa9b75aed1660020be2f..3f5f6116361cf52e8c56e265a4f37dfa07ef273e 100644 (file)
@@ -45,7 +45,7 @@ public:
   /**
    * Sets reference polyline object for zone.
    */
-  void SetPolyline( HYDROData_PolylineXY thePolyline ) [void (const Handle_HYDROData_PolylineXY&)];
+  void SetPolyline( HYDROData_PolylineXY thePolyline ) [void (const opencascade::handle<HYDROData_PolylineXY>&)];
   %MethodCode
 
     Handle(HYDROData_PolylineXY) aRefPolyline =
@@ -63,7 +63,7 @@ public:
   /**
    * Returns reference polyline object of zone.
    */
-  HYDROData_PolylineXY GetPolyline() const [Handle_HYDROData_PolylineXY ()];
+  HYDROData_PolylineXY GetPolyline() const [opencascade::handle<HYDROData_PolylineXY> ()];
   %MethodCode
 
     Handle(HYDROData_PolylineXY) aRefPolyline;
index a502140da27786672c47cfa8c0fc08964689fc9a..7b5da210403dcf32a9600ad0269ef0bb60b51a5e 100644 (file)
@@ -68,7 +68,7 @@ public:
 
   bool ExportTelemac( const QString& theFileName, double theDeflection,
                       HYDROData_StricklerTable theTable ) const
-  [bool( const QString&, double, const Handle_HYDROData_StricklerTable& )];
+  [bool( const QString&, double, const opencascade::handle<HYDROData_StricklerTable>& )];
   %MethodCode
     Handle(HYDROData_StricklerTable) aRef =
       Handle(HYDROData_StricklerTable)::DownCast( createHandle( a2 ) );
@@ -82,7 +82,7 @@ public:
   %End
 
   bool Add( HYDROData_Object theObject, const QString& theType )
-  [bool ( const Handle_HYDROData_Object&, const QString& )];
+  [bool ( const opencascade::handle<HYDROData_Object>&, const QString& )];
   %MethodCode
     Handle(HYDROData_Object) aRef =
       Handle(HYDROData_Object)::DownCast( createHandle( a0 ) );
@@ -96,7 +96,7 @@ public:
   %End
 
   bool Add( HYDROData_PolylineXY thePolyline, const QString& theType )
-  [bool ( const Handle_HYDROData_PolylineXY&, const QString& )];
+  [bool ( const opencascade::handle<HYDROData_PolylineXY>&, const QString& )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
@@ -110,7 +110,7 @@ public:
   %End
 
   bool Split( HYDROData_PolylineXY thePolyline )
-  [bool ( const Handle_HYDROData_PolylineXY& )];
+  [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
index 5e18bd214bb04323777a303b4589970a759583db..9b0fd58ee70b4dfebec055796f244e6c41c929b7 100644 (file)
@@ -77,7 +77,7 @@ public:
   /**
    * Set reference altitude object for geometry object.
    */
-  bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) [void (const Handle_HYDROData_IAltitudeObject&)];
+  bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude ) [void (const opencascade::handle<HYDROData_IAltitudeObject>&)];
   %MethodCode
 
     Handle(HYDROData_IAltitudeObject) aRefAltitude =
@@ -95,7 +95,7 @@ public:
   /**
    * Returns reference altitude object of geometry object.
    */
-  HYDROData_IAltitudeObject GetAltitudeObject() const [Handle_HYDROData_IAltitudeObject ()];
+  HYDROData_IAltitudeObject GetAltitudeObject() const [opencascade::handle<HYDROData_IAltitudeObject> ()];
   %MethodCode
 
     Handle(HYDROData_IAltitudeObject) aRefAltitude;
@@ -143,7 +143,7 @@ public:
   /**
    * Returns group data model object by it id.
    */
-  HYDROData_ShapesGroup GetGroup( const int theGroupId ) const [Handle_HYDROData_ShapesGroup ()];
+  HYDROData_ShapesGroup GetGroup( const int theGroupId ) const [opencascade::handle<HYDROData_ShapesGroup> ()];
   %MethodCode
 
     Handle(HYDROData_ShapesGroup) aRefGroup;
@@ -160,7 +160,7 @@ public:
   /**
    * Returns group id by data model object.
    */
-  int GetGroupId( HYDROData_ShapesGroup theGroup ) const [int (const Handle_HYDROData_ShapesGroup&)];
+  int GetGroupId( HYDROData_ShapesGroup theGroup ) const [int (const opencascade::handle<HYDROData_ShapesGroup>&)];
   %MethodCode
 
     Handle(HYDROData_ShapesGroup) aRefGroup =
index 58de3fd62db5cde058ab33b8600c9778554306e3..9e293a032a9dfeea0b75fe4ca099d2892e7db793 100644 (file)
@@ -46,7 +46,7 @@ public:
    */
   bool SetPolylineXY( HYDROData_PolylineXY thePolyline,
                               const bool theIsUpdateProfile = true )
-  [bool ( const Handle_HYDROData_PolylineXY&,
+  [bool ( const opencascade::handle<HYDROData_PolylineXY>&,
           const bool = true )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
@@ -64,7 +64,7 @@ public:
    * Returns reference x,y polyline object of 3D polyline.
    */
   HYDROData_PolylineXY GetPolylineXY() const
-  [Handle_HYDROData_PolylineXY ()];
+  [opencascade::handle<HYDROData_PolylineXY> ()];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef;
     
@@ -86,7 +86,7 @@ public:
    * Sets reference u,z profile object for 3D polyline.
    */
   bool SetProfileUZ( HYDROData_ProfileUZ theProfile )
-  [bool ( const Handle_HYDROData_ProfileUZ& )];
+  [bool ( const opencascade::handle<HYDROData_ProfileUZ>& )];
   %MethodCode
     Handle(HYDROData_ProfileUZ) aRef =
       Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
@@ -103,7 +103,7 @@ public:
    * Returns reference u,z profile object of 3D polyline.
    */
   HYDROData_ProfileUZ GetProfileUZ() const
-  [Handle_HYDROData_ProfileUZ ()];
+  [Hopencascade::handle<HYDROData_ProfileUZ> ()];
   %MethodCode
     Handle(HYDROData_ProfileUZ) aRef;
     
@@ -126,7 +126,7 @@ public:
    * Reimplemented to remove reference u,z profile.
    */
   bool SetAltitudeObject( HYDROData_IAltitudeObject theAltitude )
-  [bool ( const Handle_HYDROData_IAltitudeObject& )];
+  [bool ( const opencascade::handle<HYDROData_IAltitudeObject>& )];
   %MethodCode
     Handle(HYDROData_IAltitudeObject) aRef =
       Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
@@ -150,7 +150,7 @@ public:
    * Returns the child u,z profile which has been generated from bathymetry.
    */
   HYDROData_ProfileUZ GetChildProfileUZ( const bool theIsCreate = true ) const
-  [Handle_HYDROData_ProfileUZ ( const bool = true )];
+  [opencascade::handle<HYDROData_ProfileUZ> ( const bool = true )];
   %MethodCode
     Handle(HYDROData_ProfileUZ) aRef;
     
@@ -166,7 +166,7 @@ public:
   /**
    * Sets the child u,z profile for polyline.
    */
-  void SetChildProfileUZ( HYDROData_ProfileUZ theProfile ) [void ( const Handle_HYDROData_ProfileUZ& )];
+  void SetChildProfileUZ( HYDROData_ProfileUZ theProfile ) [void ( const opencascade::handle<HYDROData_ProfileUZ>& )];
   %MethodCode
     Handle(HYDROData_ProfileUZ) aRef =
       Handle(HYDROData_ProfileUZ)::DownCast( createHandle( a0 ) );
index 9ecd88d0199d901cfdb42b87297148e992e2e4ab..c5b91a60228649e33f3760e4e662592528187ac2 100644 (file)
@@ -93,7 +93,7 @@ public:
    * \return profile U,Z
    */
   HYDROData_ProfileUZ GetProfileUZ( const bool theIsCreate = true ) const 
-    [Handle_HYDROData_ProfileUZ ( const bool theIsCreate = true )];
+    [opencascade::handle<HYDROData_ProfileUZ> ( const bool theIsCreate = true )];
   %MethodCode
 
     Handle(HYDROData_ProfileUZ) aRefProfileUZ;
@@ -173,7 +173,7 @@ public:
   static int ImportFromFile( HYDROData_Document             theDoc,
                              const TCollection_AsciiString& theFileName,
                              NCollection_Sequence<int>&     theBadProfilesIds )
-  [int ( const Handle_HYDROData_Document&,
+  [int ( const opencascade::handle<HYDROData_Document>&,
          const TCollection_AsciiString&,
          NCollection_Sequence<int>& )];
   %MethodCode
index f3af2f810e820b21ad8acf03d1930f5de3bcc334..5917f614b892cc42d45c1ee3d749154161570bd4 100644 (file)
@@ -45,7 +45,7 @@ public:
   /**
    * Add new one reference zone for region.
    */
-  void AddZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
+  void AddZone( HYDROData_Zone theZone ) [void (const opencascade::handle<HYDROData_Zone>&)];
   %MethodCode
 
     Handle(HYDROData_Zone) aZone =
@@ -68,7 +68,7 @@ public:
   /**
    * Removes reference zone from region.
    */
-  void RemoveZone( HYDROData_Zone theZone ) [void (const Handle_HYDROData_Zone&)];
+  void RemoveZone( HYDROData_Zone theZone ) [void (const opencascade::handle<HYDROData_Zone>&)];
   %MethodCode
 
     Handle(HYDROData_Zone) aZone =
index 141a5279aa35da5ad382bae6ceaac87d063036ad..e183215039214a9ed12e82d71bf6f2b360bdc989 100644 (file)
@@ -20,7 +20,7 @@
 #include <NCollection_Sequence.hxx>
 %End
 
-%MappedType NCollection_Sequence<Handle_HYDROData_Entity>
+%MappedType NCollection_Sequence<opencascade::handle<HYDROData_Entity>>
 {
 %TypeHeaderCode
 #include <NCollection_Sequence.hxx>
@@ -44,7 +44,7 @@
         {
             Py_DECREF(l);
             {
-              Handle_HYDROData_Entity anEnt( aPntr );
+              Handle(HYDROData_Entity) anEnt( aPntr );
             }
 
             return NULL;
@@ -79,8 +79,8 @@
         return 1;
     }
 
-    NCollection_Sequence<Handle_HYDROData_Entity> *aSeq = 
-      new NCollection_Sequence<Handle_HYDROData_Entity>;
+    NCollection_Sequence<Handle(HYDROData_Entity)> *aSeq = 
+      new NCollection_Sequence<Handle(HYDROData_Entity)>;
     len = PySequence_Size(sipPy);
  
     for (SIP_SSIZE_T i = 0; i < len; ++i)
             return 0;
         }
 
-        Handle_HYDROData_Entity anEnt( t );
+        Handle(HYDROData_Entity) anEnt( t );
         aSeq->Append( anEnt );
 
         //sipReleaseType(t, sipType_HYDROData_Entity, state);
 %End
 };
 
-typedef NCollection_Sequence<Handle_HYDROData_Entity> HYDROData_SequenceOfObjects;
+typedef NCollection_Sequence<opencascade::handle<HYDROData_Entity>> HYDROData_SequenceOfObjects;
index 4bb209e6f2f8897e0951f8afc07ef352c553f498..9461c8e518d7687eddbb58c12ebe3c36c4976374 100644 (file)
@@ -46,7 +46,7 @@ public:
    * Returns true if given polyline can be used as stream axis.
    */
   static bool IsValidAsAxis( HYDROData_PolylineXY theAxis ) 
-  [bool ( const Handle_HYDROData_PolylineXY& )];
+  [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
@@ -65,7 +65,7 @@ public:
    * Sets reference hydraulic axis object for stream.
    */
   bool SetHydraulicAxis( HYDROData_PolylineXY theAxis )
-  [bool ( const Handle_HYDROData_PolylineXY& )];
+  [bool ( const opencascade::handle<HYDROData_PolylineXY>& )];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef =
       Handle(HYDROData_PolylineXY)::DownCast( createHandle( a0 ) );
@@ -82,7 +82,7 @@ public:
    * Returns reference hydraulic axis object of stream.
    */
   HYDROData_PolylineXY GetHydraulicAxis() const
-  [Handle_HYDROData_PolylineXY ()];
+  [opencascade::handle<HYDROData_PolylineXY> ()];
   %MethodCode
     Handle(HYDROData_PolylineXY) aRef;
     
@@ -103,7 +103,7 @@ public:
    * Add new one reference profile object for stream.
    */
   bool AddProfile( HYDROData_Profile theProfile )
-  [bool ( const Handle_HYDROData_Profile& )];
+  [bool ( const opencascade::handle<HYDROData_Profile>& )];
   %MethodCode
     Handle(HYDROData_Profile) aRef =
       Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
@@ -125,7 +125,7 @@ public:
    * Removes reference profile object from stream.
    */
   bool RemoveProfile( HYDROData_Profile theProfile )
-  [bool ( const Handle_HYDROData_Profile& )];
+  [bool ( const opencascade::handle<HYDROData_Profile>& )];
   %MethodCode
     Handle(HYDROData_Profile) aRef =
       Handle(HYDROData_Profile)::DownCast( createHandle( a0 ) );
@@ -152,7 +152,7 @@ public:
    * Returns reference bottom polyline object of stream.
    */
   HYDROData_Polyline3D GetBottomPolyline() const
-  [Handle_HYDROData_Polyline3D ()];
+  [opencascade::handle<HYDROData_Polyline3D> ()];
   %MethodCode
     Handle(HYDROData_Polyline3D) aRef;
     
@@ -168,7 +168,7 @@ public:
    * Sets reference bottom polyline object for stream.
    */
   bool SetBottomPolyline( HYDROData_Polyline3D theBottom )
-  [bool ( const Handle_HYDROData_Polyline3D& )];
+  [bool ( const opencascade::handle<HYDROData_Polyline3D>& )];
   %MethodCode
     Handle(HYDROData_Polyline3D) aRef =
       Handle(HYDROData_Polyline3D)::DownCast( createHandle( a0 ) );
index 070354cd7262a66a1f079c6fb0ba54f4da2cc0b3..ff034d86b1799fc1498d10b6819d06cf21656042 100644 (file)
@@ -56,7 +56,7 @@ public:
   MergeType GetMergeType() const;
 
   void SetMergeAltitude( HYDROData_IAltitudeObject theAltitude )
-  [void (const Handle_HYDROData_IAltitudeObject&)];
+  [void (const opencascade::handle<HYDROData_IAltitudeObject>&)];
   %MethodCode
     Handle(HYDROData_IAltitudeObject) aRefAltitude =
       Handle(HYDROData_IAltitudeObject)::DownCast( createHandle( a0 ) );
@@ -69,7 +69,7 @@ public:
     }
   %End
 
-  HYDROData_IAltitudeObject GetMergeAltitude() const [Handle_HYDROData_IAltitudeObject ()];
+  HYDROData_IAltitudeObject GetMergeAltitude() const [opencascade::handle<HYDROData_IAltitudeObject> ()];
   %MethodCode
     Handle(HYDROData_IAltitudeObject) aRefAltitude;
     Py_BEGIN_ALLOW_THREADS
@@ -88,10 +88,9 @@ public:
     Py_END_ALLOW_THREADS
   %End
 
-  void SetMergeObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
+  void SetMergeObject( HYDROData_Entity theObject ) [void (const opencascade::handle<HYDROData_Entity>&)];
   %MethodCode
-    Handle(HYDROData_Entity) aRefObject =
-      Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+    Handle(HYDROData_Entity) aRefObject = createHandle( a0 );
     if ( !aRefObject.IsNull() )
     {
       Py_BEGIN_ALLOW_THREADS
@@ -101,7 +100,7 @@ public:
     }
   %End
 
-  HYDROData_Entity GetMergeObject() const [Handle_HYDROData_Entity ()];
+  HYDROData_Entity GetMergeObject() const [opencascade::handle<HYDROData_Entity> ()];
   %MethodCode
     Handle(HYDROData_Entity) aRefObject;
     Py_BEGIN_ALLOW_THREADS
@@ -113,11 +112,10 @@ public:
 
   void RemoveMergeObject();
 
-  void AddObject( HYDROData_Entity theObject ) [void (const Handle_HYDROData_Entity&)];
+  void AddObject( HYDROData_Entity theObject ) [void (const opencascade::handle<HYDROData_Entity>&)];
   %MethodCode
 
-    Handle(HYDROData_Entity) anObj =
-      Handle(HYDROData_Entity)::DownCast( createHandle( a0 ) );
+    Handle(HYDROData_Entity) anObj = createHandle( a0 );
     if ( !anObj.IsNull() )
     {
       Py_BEGIN_ALLOW_THREADS
index 196df1f00f03fccce966f71e650f982229db214b..c5e8e5132c06530ee3b024019806abdab3fced84 100644 (file)
@@ -34,9 +34,8 @@
 #ifdef WIN32
   #pragma warning ( disable: 4251 )
 #endif
-#include <AIS_InteractiveContext.hxx>
 #include <AIS_Shape.hxx>
-#include <Aspect_ColorScale.hxx>
+#include <AIS_ColorScale.hxx>
 #include <Prs3d_PointAspect.hxx>
 #include <TopoDS_Iterator.hxx>
 #include <QDir>
@@ -289,22 +288,16 @@ bool TestViewer::AssertImages( QString& theMessage )
   return false;
 }
 
-Handle_Aspect_ColorScale TestViewer::colorScale()
+Handle(AIS_ColorScale) TestViewer::colorScale()
 {
-  Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
-  if( aView.IsNull() )
-    return Handle(Aspect_ColorScale)();
-  else
-    return aView->ColorScale();
+  static Handle(AIS_ColorScale) aColorScale = new AIS_ColorScale();
+
+  return aColorScale;
 }
 
 void TestViewer::showColorScale( bool isShow )
 {
-  Handle(V3d_View) aView = myViewWindow->getViewPort()->getView();
-  if( aView.IsNull() )
-    return;
-
-  Handle(Aspect_ColorScale) aColorScale = colorScale();
+  Handle(AIS_ColorScale) aColorScale = colorScale();
   if( aColorScale.IsNull() )
     return;
 
@@ -325,15 +318,17 @@ void TestViewer::showColorScale( bool isShow )
   aColorScale->SetTitle( "test" );
   aColorScale->SetRange( 0, 1 );
 
+  aColorScale->SetToUpdate();
+
   if( isShow )
   {
-    if( !aView->ColorScaleIsDisplayed() )
-      aView->ColorScaleDisplay();
+    if( !context()->IsDisplayed( aColorScale ) )
+      context()->Display( aColorScale );
   }
   else
   {
-    if( aView->ColorScaleIsDisplayed() )
-      aView->ColorScaleErase();
+    if( context()->IsDisplayed( aColorScale ) )
+      context()->Erase( aColorScale );
   }
 }
 
index fbcd7da212e03ee11ba2f52b861c30f8a5874224..de076a1e38a402afceacd286beb611782fac38c4 100644 (file)
 
 #pragma once
 
+#include <AIS_InteractiveContext.hxx>
+
 class OCCViewer_ViewManager;
 class OCCViewer_Viewer;
 class OCCViewer_ViewWindow;
 class TopoDS_Shape;
 class QString;
 class QColor;
-class AIS_InteractiveContext;
 class AIS_InteractiveObject;
-class Aspect_ColorScale;
+class AIS_ColorScale;
 
 class TestViewer
 {
@@ -44,7 +45,7 @@ public:
   static bool AssertImages( QString& theMessage );
   static QColor GetColor(int i);
 
-  static Handle(Aspect_ColorScale) colorScale();
+  static Handle(AIS_ColorScale) colorScale();
   static void showColorScale( bool );
 
   static void select( int theViewX, int theViewY );
index 421933c03ad2020b8195bc67d3a3499481e60290..27bed5c6867cc38d8c631142f344daac59941427 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <cppunit/extensions/HelperMacros.h>
 
-class Handle_HYDROData_Bathymetry;
 class QString;
 
 class test_HYDROData_Bathymetry : public CppUnit::TestFixture {
index 895a52b601a3cc7bd619854a5a3cd6ab4c55ab03..831a995558df15ddac3bd7f4562ca02482f2058e 100644 (file)
@@ -34,7 +34,6 @@
 #include <TestShape.h>
 #include <TopTools_ListOfShape.hxx>
 #include <AIS_DisplayMode.hxx>
-#include <Aspect_ColorScale.hxx>
 #include <BRepMesh_IncrementalMesh.hxx>
 #include <QString>
 #include <QColor>
index c6a979d04c3fbbea15a6d0f058726d9e988316bb..0610149e1993ba88a0e6ec0e59f8e79c2ead2b2f 100644 (file)
@@ -44,7 +44,7 @@ int main( int argc, char* argv[] )
   int W = 800, H = 600;
   aWindow->setGeometry( 200, 200, W, H );
   aWindow->show();
-  QTest::qWaitForWindowShown( aWindow );
+  QTest::qWaitForWindowExposed( aWindow );
 
   int dy = 34;
   //std::cout << dx << "," << dy << std::endl;
index 9785cf72bc7fc9240be00e19593dd3e081683b56..e2177bf4e69d1a21ad7c63c9babf788d19ad4f19 100644 (file)
@@ -18,7 +18,6 @@
 
 #include <cppunit/extensions/HelperMacros.h>
 
-class Handle_HYDROData_Profile;
 class QString;
 
 class test_HYDROData_Profile : public CppUnit::TestFixture {
index f5b0ea490545d68e8470833e3bb8d10971c6341c..2290ed7e174f96abe8cd3b6799b56b4c80072498 100644 (file)
@@ -22,7 +22,7 @@
 #include <HYDROData_Document.h>
 #include <HYDROGUI_ListModel.h>
 
-Handle_HYDROData_Document GetDocument()
+Handle(HYDROData_Document) GetDocument()
 {
   return HYDROData_Document::Document( 0 );
 }
@@ -33,7 +33,7 @@ HYDROGUI_ListModel::Object2VisibleList CreateTestObjects( int theObjCount )
 
   for( int i=0; i<theObjCount; i++ )
   {
-    Handle_HYDROData_Entity anObj = GetDocument()->CreateObject( KIND_IMMERSIBLE_ZONE );
+    Handle(HYDROData_Entity) anObj = GetDocument()->CreateObject( KIND_IMMERSIBLE_ZONE );
 
     std::string aName = " ";
     aName[0] = 'A' + i;
@@ -424,4 +424,4 @@ void test_HYDROGUI_ListModel::testDragAndDrop()
   aRes = aModel->move(  QList<int>() << 0 << 2 << 4 << 5 << 7, aDnD, false, 3 );
   CPPUNIT_ASSERT_EQUAL( true, aRes );
   CPPUNIT_ASSERT_EQUAL( std::string( "F, *A, *G, *C, H, *E, D, B" ), GetObjects( aModel ) );
-}
\ No newline at end of file
+}
index e99db415502041c6fda173b347b041e70fb6c847..aa6d9c880ff740ada55441385b3b0ee8037e2497 100644 (file)
@@ -31,8 +31,8 @@ void test_HYDROGUI_Shape::test_face_in_preview()
                                              128 << 18 << 140 << 50 << 131 << 89 << 104 << 111 <<
                                               31 << 114 );
 
-  Handle_AIS_InteractiveContext aContext = TestViewer::context();
-  Handle_HYDROData_Entity anEntity; //it should be null as in preview
+  Handle(AIS_InteractiveContext) aContext = TestViewer::context();
+  Handle(HYDROData_Entity) anEntity; //it should be null as in preview
 
   HYDROGUI_Shape* aPreview = new HYDROGUI_Shape( aContext, anEntity );
   aPreview->setFace( aFace, true, true, "" );