From: asl Date: Fri, 25 Nov 2016 07:26:14 +0000 (+0300) Subject: first part of the porting on OCCT 7.0 X-Git-Tag: Salome_8_3_Hydro_1_1rc1~58^2~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=05d82ada59110252be57aaa774095a18ebdca455;p=modules%2Fhydro.git first part of the porting on OCCT 7.0 --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 75b6f19d..14494116 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -22,6 +22,17 @@ IF(WIN32) ADD_DEFINITIONS(-DWNT) ENDIF(WIN32) + +# Common CMake macros +# =================== +SET(CONFIGURATION_ROOT_DIR $ENV{CONFIGURATION_ROOT_DIR} CACHE PATH "Path to the Salome CMake configuration files") +IF(EXISTS ${CONFIGURATION_ROOT_DIR}) + LIST(APPEND CMAKE_MODULE_PATH "${CONFIGURATION_ROOT_DIR}/cmake") + INCLUDE(SalomeMacros) +ELSE() + MESSAGE(FATAL_ERROR "We absolutely need the Salome CMake configuration files, please define CONFIGURATION_ROOT_DIR !") +ENDIF() + # Find KERNEL # ============== SET(KERNEL_ROOT_DIR $ENV{KERNEL_ROOT_DIR} CACHE PATH "Path to the Salome KERNEL") diff --git a/src/HYDROData/HYDROData_AltitudeObject.cxx b/src/HYDROData/HYDROData_AltitudeObject.cxx index 0286c1e3..6a28d989 100644 --- a/src/HYDROData/HYDROData_AltitudeObject.cxx +++ b/src/HYDROData/HYDROData_AltitudeObject.cxx @@ -24,7 +24,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_AltitudeObject, HYDROData_IAltitudeObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_AltitudeObject, HYDROData_IAltitudeObject) HYDROData_AltitudeObject::HYDROData_AltitudeObject() diff --git a/src/HYDROData/HYDROData_AltitudeObject.h b/src/HYDROData/HYDROData_AltitudeObject.h index 5770be48..554b982c 100644 --- a/src/HYDROData/HYDROData_AltitudeObject.h +++ b/src/HYDROData/HYDROData_AltitudeObject.h @@ -23,8 +23,6 @@ #include "HYDROData_IAltitudeObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_AltitudeObject, HYDROData_IAltitudeObject) - /**\class HYDROData_AltitudeObject * \brief Class that stores/retreives information about the Altitude. @@ -33,7 +31,6 @@ DEFINE_STANDARD_HANDLE(HYDROData_AltitudeObject, HYDROData_IAltitudeObject) class HYDROData_AltitudeObject : public HYDROData_IAltitudeObject { protected: - /** * Enumeration of tags corresponding to the persistent object parameters. */ @@ -43,8 +40,7 @@ protected: }; public: - - DEFINE_STANDARD_RTTI(HYDROData_AltitudeObject); + DEFINE_STANDARD_RTTIEXT(HYDROData_AltitudeObject, HYDROData_IAltitudeObject); /** * Returns the kind of this object. diff --git a/src/HYDROData/HYDROData_Application.cxx b/src/HYDROData/HYDROData_Application.cxx index 1a93490f..04a0e18b 100644 --- a/src/HYDROData/HYDROData_Application.cxx +++ b/src/HYDROData/HYDROData_Application.cxx @@ -20,7 +20,6 @@ #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_Application,TDocStd_Application) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Application,TDocStd_Application) static HYDROData_Application* TheApplication = new HYDROData_Application; diff --git a/src/HYDROData/HYDROData_Application.h b/src/HYDROData/HYDROData_Application.h index f1564243..37eb02c2 100644 --- a/src/HYDROData/HYDROData_Application.h +++ b/src/HYDROData/HYDROData_Application.h @@ -52,7 +52,7 @@ public: // Redefined OCAF methods HYDRODATA_EXPORT HYDROData_Application(); // CASCADE RTTI - DEFINE_STANDARD_RTTI(HYDROData_Application) + DEFINE_STANDARD_RTTIEXT(HYDROData_Application, TDocStd_Application) private: //! Returns document by its study ID, if document doesn't exists return null @@ -74,7 +74,4 @@ private: friend class HYDROData_Document; // to manipulate documents of application }; -// Define handle class -DEFINE_STANDARD_HANDLE(HYDROData_Application,TDocStd_Application) - #endif diff --git a/src/HYDROData/HYDROData_ArtificialObject.cxx b/src/HYDROData/HYDROData_ArtificialObject.cxx index 80a47654..23565d5a 100644 --- a/src/HYDROData/HYDROData_ArtificialObject.cxx +++ b/src/HYDROData/HYDROData_ArtificialObject.cxx @@ -18,7 +18,6 @@ #include "HYDROData_ArtificialObject.h" -IMPLEMENT_STANDARD_HANDLE(HYDROData_ArtificialObject,HYDROData_Object) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ArtificialObject,HYDROData_Object) HYDROData_ArtificialObject::HYDROData_ArtificialObject( Geometry theGeometry ) diff --git a/src/HYDROData/HYDROData_ArtificialObject.h b/src/HYDROData/HYDROData_ArtificialObject.h index dc91253b..459a2b7b 100644 --- a/src/HYDROData/HYDROData_ArtificialObject.h +++ b/src/HYDROData/HYDROData_ArtificialObject.h @@ -21,9 +21,6 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_ArtificialObject, HYDROData_Object) - - /**\class HYDROData_ArtificialObject * \brief The artificial objects are objects created or planned for creation by human. * @@ -40,7 +37,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_ArtificialObject); + DEFINE_STANDARD_RTTIEXT(HYDROData_ArtificialObject, HYDROData_Object); protected: diff --git a/src/HYDROData/HYDROData_Bathymetry.cxx b/src/HYDROData/HYDROData_Bathymetry.cxx index 34bd4a21..45123472 100644 --- a/src/HYDROData/HYDROData_Bathymetry.cxx +++ b/src/HYDROData/HYDROData_Bathymetry.cxx @@ -53,7 +53,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_IAltitudeObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Bathymetry, HYDROData_IAltitudeObject) //HYDROData_QuadtreeNode* HYDROData_Bathymetry::myQuadtree = 0; @@ -503,7 +502,7 @@ bool HYDROData_Bathymetry::ImportFromFile( const TCollection_AsciiString& theFil // Convert from global to local CS - Handle_HYDROData_Document aDoc = HYDROData_Document::Document( myLab ); + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( myLab ); AltitudePoints::Iterator anIter( aPoints ); for ( ; anIter.More(); anIter.Next() ) { @@ -676,11 +675,11 @@ bool HYDROData_Bathymetry::importFromASCFile( QFile& theFile, } -Handle_HYDROData_PolylineXY HYDROData_Bathymetry::CreateBoundaryPolyline() const +Handle(HYDROData_PolylineXY) HYDROData_Bathymetry::CreateBoundaryPolyline() const { Handle(HYDROData_Document) aDocument = HYDROData_Document::Document( myLab ); - Handle_HYDROData_PolylineXY aResult = - Handle_HYDROData_PolylineXY::DownCast( aDocument->CreateObject( KIND_POLYLINEXY ) ); + Handle(HYDROData_PolylineXY) aResult = + Handle(HYDROData_PolylineXY)::DownCast( aDocument->CreateObject( KIND_POLYLINEXY ) ); if( aResult.IsNull() ) return aResult; diff --git a/src/HYDROData/HYDROData_Bathymetry.h b/src/HYDROData/HYDROData_Bathymetry.h index 6a555afd..39ac30b1 100644 --- a/src/HYDROData/HYDROData_Bathymetry.h +++ b/src/HYDROData/HYDROData_Bathymetry.h @@ -27,11 +27,9 @@ class QFile; class gp_XYZ; class gp_XY; -class Handle_HYDROData_PolylineXY; +class HYDROData_PolylineXY; -DEFINE_STANDARD_HANDLE(HYDROData_Bathymetry, HYDROData_IAltitudeObject) - /**\class HYDROData_Bathymetry * \brief Class that stores/retreives information about the Bathymetry. @@ -59,8 +57,7 @@ protected: }; public: - - DEFINE_STANDARD_RTTI(HYDROData_Bathymetry); + DEFINE_STANDARD_RTTIEXT(HYDROData_Bathymetry, HYDROData_IAltitudeObject); /** * Returns the kind of this object. Must be redefined in all objects of known type. @@ -141,7 +138,7 @@ public: */ HYDRODATA_EXPORT virtual bool ImportFromFile( const TCollection_AsciiString& theFileName ); - HYDRODATA_EXPORT Handle_HYDROData_PolylineXY CreateBoundaryPolyline() const; + HYDRODATA_EXPORT Handle(HYDROData_PolylineXY) CreateBoundaryPolyline() const; HYDRODATA_EXPORT virtual void UpdateLocalCS( double theDx, double theDy ); diff --git a/src/HYDROData/HYDROData_CalculationCase.cxx b/src/HYDROData/HYDROData_CalculationCase.cxx index c3d4961d..9bea6264 100644 --- a/src/HYDROData/HYDROData_CalculationCase.cxx +++ b/src/HYDROData/HYDROData_CalculationCase.cxx @@ -83,7 +83,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity) HYDROData_CalculationCase::HYDROData_CalculationCase() diff --git a/src/HYDROData/HYDROData_CalculationCase.h b/src/HYDROData/HYDROData_CalculationCase.h index 1780ca9c..af03f951 100644 --- a/src/HYDROData/HYDROData_CalculationCase.h +++ b/src/HYDROData/HYDROData_CalculationCase.h @@ -43,20 +43,16 @@ class gp_XY; class TopoDS_Shape; class TopoDS_Shell; -class TopTools_ListOfShape; - -class Handle(HYDROData_Object); -class Handle(HYDROData_Region); -class Handle(HYDROData_Zone); -class Handle(HYDROData_PolylineXY); -class Handle(HYDROData_ShapesGroup); -class Handle(HYDROData_SplitShapesGroup); -class Handle(HYDROData_Document); -class Handle(HYDROData_StricklerTable); -class Handle(HYDROData_LandCoverMap); - -DEFINE_STANDARD_HANDLE(HYDROData_CalculationCase, HYDROData_Entity) +class HYDROData_Object; +class HYDROData_Region; +class HYDROData_Zone; +class HYDROData_PolylineXY; +class HYDROData_ShapesGroup; +class HYDROData_SplitShapesGroup; +class HYDROData_Document; +class HYDROData_StricklerTable; +class HYDROData_LandCoverMap; /**\class HYDROData_CalculationCase * \brief Calculation case is defined by selection of Geometry objects with or without �Zone of water�. @@ -107,8 +103,7 @@ public: }; public: - - DEFINE_STANDARD_RTTI(HYDROData_CalculationCase); + DEFINE_STANDARD_RTTIEXT(HYDROData_CalculationCase, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_Channel.cxx b/src/HYDROData/HYDROData_Channel.cxx index 14ac7fb6..d9ccf4a8 100644 --- a/src/HYDROData/HYDROData_Channel.cxx +++ b/src/HYDROData/HYDROData_Channel.cxx @@ -54,6 +54,7 @@ #include #include +#include #include #include @@ -70,7 +71,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_Channel,HYDROData_ArtificialObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Channel,HYDROData_ArtificialObject) diff --git a/src/HYDROData/HYDROData_Channel.h b/src/HYDROData/HYDROData_Channel.h index 3e069097..163601c0 100644 --- a/src/HYDROData/HYDROData_Channel.h +++ b/src/HYDROData/HYDROData_Channel.h @@ -24,12 +24,8 @@ #include #include -class Handle(HYDROData_Polyline3D); -class Handle(HYDROData_Profile); -class TopTools_SequenceOfShape; -class TopTools_ListOfShape; - -DEFINE_STANDARD_HANDLE(HYDROData_Channel, HYDROData_ArtificialObject) +class HYDROData_Polyline3D; +class HYDROData_Profile; /**\class HYDROData_Channel * \brief @@ -62,8 +58,7 @@ protected: }; public: - - DEFINE_STANDARD_RTTI(HYDROData_Channel); + DEFINE_STANDARD_RTTIEXT(HYDROData_Channel, HYDROData_ArtificialObject); public: diff --git a/src/HYDROData/HYDROData_ChannelAltitude.cxx b/src/HYDROData/HYDROData_ChannelAltitude.cxx index 92d4d2fe..ba2c7587 100644 --- a/src/HYDROData/HYDROData_ChannelAltitude.cxx +++ b/src/HYDROData/HYDROData_ChannelAltitude.cxx @@ -53,7 +53,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_ChannelAltitude, HYDROData_IAltitudeObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ChannelAltitude, HYDROData_IAltitudeObject) HYDROData_ChannelAltitude::HYDROData_ChannelAltitude() diff --git a/src/HYDROData/HYDROData_ChannelAltitude.h b/src/HYDROData/HYDROData_ChannelAltitude.h index 480e14fc..d65582e5 100644 --- a/src/HYDROData/HYDROData_ChannelAltitude.h +++ b/src/HYDROData/HYDROData_ChannelAltitude.h @@ -23,8 +23,6 @@ #include "HYDROData_IAltitudeObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_ChannelAltitude, HYDROData_IAltitudeObject) - /**\class HYDROData_ChannelAltitude * \brief Class that stores/retrieves information about the Channel altitude. @@ -44,7 +42,7 @@ protected: public: - DEFINE_STANDARD_RTTI(HYDROData_ChannelAltitude); + DEFINE_STANDARD_RTTIEXT(HYDROData_ChannelAltitude, HYDROData_IAltitudeObject); /** * Returns the kind of this object. diff --git a/src/HYDROData/HYDROData_Confluence.cxx b/src/HYDROData/HYDROData_Confluence.cxx index d40c9a17..da02c935 100644 --- a/src/HYDROData/HYDROData_Confluence.cxx +++ b/src/HYDROData/HYDROData_Confluence.cxx @@ -24,7 +24,6 @@ #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_Confluence,HYDROData_NaturalObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Confluence,HYDROData_NaturalObject) diff --git a/src/HYDROData/HYDROData_Confluence.h b/src/HYDROData/HYDROData_Confluence.h index e96a6a9a..13fdee49 100644 --- a/src/HYDROData/HYDROData_Confluence.h +++ b/src/HYDROData/HYDROData_Confluence.h @@ -21,8 +21,6 @@ #include "HYDROData_NaturalObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_Confluence, HYDROData_NaturalObject) - /**\class HYDROData_Confluence * \brief * @@ -39,7 +37,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Confluence); + DEFINE_STANDARD_RTTIEXT(HYDROData_Confluence, HYDROData_NaturalObject); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_Digue.cxx b/src/HYDROData/HYDROData_Digue.cxx index 4ba967ac..a102026f 100644 --- a/src/HYDROData/HYDROData_Digue.cxx +++ b/src/HYDROData/HYDROData_Digue.cxx @@ -25,7 +25,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_Digue,HYDROData_Channel) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Digue,HYDROData_Channel) diff --git a/src/HYDROData/HYDROData_Digue.h b/src/HYDROData/HYDROData_Digue.h index c72abf39..f05e03fa 100644 --- a/src/HYDROData/HYDROData_Digue.h +++ b/src/HYDROData/HYDROData_Digue.h @@ -21,8 +21,6 @@ #include "HYDROData_Channel.h" -DEFINE_STANDARD_HANDLE(HYDROData_Digue, HYDROData_Channel) - /**\class HYDROData_Digue * \brief * @@ -39,7 +37,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Digue); + DEFINE_STANDARD_RTTIEXT(HYDROData_Digue, HYDROData_Channel); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_Document.cxx b/src/HYDROData/HYDROData_Document.cxx index fd129087..56c6590f 100644 --- a/src/HYDROData/HYDROData_Document.cxx +++ b/src/HYDROData/HYDROData_Document.cxx @@ -37,7 +37,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_Document,MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Document,MMgt_TShared) #define PYTHON_DOC_NAME "hydro_doc" @@ -54,8 +53,8 @@ static const gp_Pnt2d DEFAULT_LOCAL_CS( 0, 0 ); using namespace std; -typedef QMap MapOfOrdered; -typedef QMap MapOfUnordered; +typedef QMap MapOfOrdered; +typedef QMap MapOfUnordered; Handle(HYDROData_Document) HYDROData_Document::Document(const int theStudyID) { @@ -483,7 +482,7 @@ void HYDROData_Document::SetObjectsLayerOrder( const HYDROData_SequenceOfObjects } } -void HYDROData_Document::Show( const Handle_HYDROData_Entity& theObject ) +void HYDROData_Document::Show( const Handle(HYDROData_Entity)& theObject ) { HYDROData_SequenceOfObjects anOrder; anOrder.Append( theObject ); diff --git a/src/HYDROData/HYDROData_Document.h b/src/HYDROData/HYDROData_Document.h index e3c7b1c8..41b6a020 100644 --- a/src/HYDROData/HYDROData_Document.h +++ b/src/HYDROData/HYDROData_Document.h @@ -24,8 +24,8 @@ class HYDROData_InterpolatorsFactory; class HYDROData_IProfilesInterpolator; -class Handle(HYDROData_StricklerTable); -class Handle(HYDROData_LandCoverMap); +class HYDROData_StricklerTable; +class HYDROData_LandCoverMap; class QFile; class gp_Pnt2d; @@ -46,8 +46,6 @@ enum Data_DocError { DocError_UnknownProblem ///< problem has unknown nature }; -DEFINE_STANDARD_HANDLE(HYDROData_Document, MMgt_TShared) - /**\class HYDROData_Document * * \brief Document for internal data structure of any object storage. Corresponds to the SALOME study. @@ -60,8 +58,7 @@ DEFINE_STANDARD_HANDLE(HYDROData_Document, MMgt_TShared) class HYDROData_Document : public MMgt_TShared { public: - - DEFINE_STANDARD_RTTI(HYDROData_Document); + DEFINE_STANDARD_RTTIEXT(HYDROData_Document, MMgt_TShared); //! Returns the existing document or creates new if it is not exist HYDRODATA_EXPORT static Handle(HYDROData_Document) Document(const int theStudyID); @@ -144,7 +141,7 @@ public: //! Show object at the top of other model objects. If the object //! already has the z-level parameter then nothing will be done. - HYDRODATA_EXPORT void Show( const Handle_HYDROData_Entity& theObject ); + HYDRODATA_EXPORT void Show( const Handle(HYDROData_Entity)& theObject ); //! Show sequence of objects at the top of other model objects. //! The objects from the sequence will be sorted alphabetically at first. diff --git a/src/HYDROData/HYDROData_DummyObject3D.cxx b/src/HYDROData/HYDROData_DummyObject3D.cxx index fbc4851d..56a90fdc 100644 --- a/src/HYDROData/HYDROData_DummyObject3D.cxx +++ b/src/HYDROData/HYDROData_DummyObject3D.cxx @@ -25,7 +25,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_DummyObject3D,HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_DummyObject3D,HYDROData_Entity) HYDROData_DummyObject3D::HYDROData_DummyObject3D() diff --git a/src/HYDROData/HYDROData_DummyObject3D.h b/src/HYDROData/HYDROData_DummyObject3D.h index a649e41e..c944fc01 100644 --- a/src/HYDROData/HYDROData_DummyObject3D.h +++ b/src/HYDROData/HYDROData_DummyObject3D.h @@ -21,9 +21,7 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_DummyObject3D, HYDROData_Entity) - -class Handle(HYDROData_Object); +class HYDROData_Object; class TopoDS_Shape; /**\class HYDROData_DummyObject3D @@ -42,7 +40,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_DummyObject3D); + DEFINE_STANDARD_RTTIEXT(HYDROData_DummyObject3D, HYDROData_Entity); public: diff --git a/src/HYDROData/HYDROData_Entity.cxx b/src/HYDROData/HYDROData_Entity.cxx index 4b8a76ed..ce654789 100644 --- a/src/HYDROData/HYDROData_Entity.cxx +++ b/src/HYDROData/HYDROData_Entity.cxx @@ -43,25 +43,24 @@ #include "HYDRO_trace.hxx" HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects() - : NCollection_Sequence() + : NCollection_Sequence() { } HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const HYDROData_SequenceOfObjects& theSequence ) - : NCollection_Sequence( theSequence ) + : NCollection_Sequence( theSequence ) { } -HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const NCollection_Sequence& theSequence ) - : NCollection_Sequence( theSequence ) +HYDROData_SequenceOfObjects::HYDROData_SequenceOfObjects( const NCollection_Sequence& theSequence ) + : NCollection_Sequence( theSequence ) { } -IMPLEMENT_STANDARD_HANDLE(HYDROData_Entity,MMgt_TShared) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Entity,MMgt_TShared) // is equal function for unique object mapping -bool IsEqual(const Handle_HYDROData_Entity& theObj1, const Handle_HYDROData_Entity& theObj2) +bool IsEqual(const Handle(HYDROData_Entity)& theObj1, const Handle(HYDROData_Entity)& theObj2) { if ( !theObj1.IsNull() && !theObj2.IsNull() ) return theObj1->Label() == theObj2->Label(); @@ -383,7 +382,7 @@ int HYDROData_Entity::NbReferenceObjects( const int theTag ) const return aRefs.IsNull() ? 0 : aRefs->Extent(); } -bool HYDROData_Entity::HasReference( const Handle_HYDROData_Entity& theObj, +bool HYDROData_Entity::HasReference( const Handle(HYDROData_Entity)& theObj, const int theTag ) const { if ( theObj.IsNull() ) @@ -404,7 +403,7 @@ bool HYDROData_Entity::HasReference( const Handle_HYDROData_Entity& theObj, return false; } -void HYDROData_Entity::AddReferenceObject( const Handle_HYDROData_Entity& theObj, +void HYDROData_Entity::AddReferenceObject( const Handle(HYDROData_Entity)& theObj, const int theTag ) { if ( theObj.IsNull() ) @@ -414,7 +413,7 @@ void HYDROData_Entity::AddReferenceObject( const Handle_HYDROData_Entity& theObj aRefs->Append( theObj->Label() ); } -void HYDROData_Entity::SetReferenceObject( const Handle_HYDROData_Entity& theObj, +void HYDROData_Entity::SetReferenceObject( const Handle(HYDROData_Entity)& theObj, const int theTag, const int theIndex ) { @@ -448,7 +447,7 @@ void HYDROData_Entity::SetReferenceObject( const Handle_HYDROData_Entity& theObj } } -void HYDROData_Entity::InsertReferenceObject( const Handle_HYDROData_Entity& theObj, +void HYDROData_Entity::InsertReferenceObject( const Handle(HYDROData_Entity)& theObj, const int theTag, const int theBeforeIndex ) { diff --git a/src/HYDROData/HYDROData_Entity.h b/src/HYDROData/HYDROData_Entity.h index 51186e60..2422d4fe 100644 --- a/src/HYDROData/HYDROData_Entity.h +++ b/src/HYDROData/HYDROData_Entity.h @@ -24,12 +24,13 @@ #include #include #include +#include class QColor; class QVariant; class QStringList; -class Handle(TDataStd_ReferenceList); -class Handle_HYDROData_Entity; +class TDataStd_ReferenceList; +class HYDROData_Entity; class TopoDS_Shape; ///! Kind of an object in a document @@ -67,22 +68,20 @@ const ObjectKind KIND_CHANNEL_ALTITUDE = 28; const ObjectKind KIND_LAND_COVER_MAP = 29; const ObjectKind KIND_LAST = KIND_LAND_COVER_MAP; -DEFINE_STANDARD_HANDLE(HYDROData_Entity, MMgt_TShared) - class MapOfTreatedObjects : public QMap { }; -class HYDRODATA_EXPORT HYDROData_SequenceOfObjects : public NCollection_Sequence +class HYDRODATA_EXPORT HYDROData_SequenceOfObjects : public NCollection_Sequence { public: HYDROData_SequenceOfObjects(); HYDROData_SequenceOfObjects( const HYDROData_SequenceOfObjects& ); - HYDROData_SequenceOfObjects( const NCollection_Sequence& ); + HYDROData_SequenceOfObjects( const NCollection_Sequence& ); }; ///! Is Equal for HYDROData_Entity mapping -HYDRODATA_EXPORT bool IsEqual(const Handle_HYDROData_Entity& theObj1, const Handle_HYDROData_Entity& theObj2); +HYDRODATA_EXPORT bool IsEqual(const Handle(HYDROData_Entity)& theObj1, const Handle(HYDROData_Entity)& theObj2); /**\class HYDROData_Entity * \brief Generic class of any object in the data model. @@ -119,7 +118,7 @@ public: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Entity); + DEFINE_STANDARD_RTTIEXT(HYDROData_Entity, MMgt_TShared); /** * Returns the kind of this object. Must be redefined in all objects of known type. @@ -334,7 +333,7 @@ protected: * \param theObj pointer to reference object * \param theTag tag of a label to store attribute (for 0 this is myLab) */ - bool HasReference( const Handle_HYDROData_Entity& theObj, + bool HasReference( const Handle(HYDROData_Entity)& theObj, const int theTag = 0 ) const; /** @@ -342,7 +341,7 @@ protected: * \param theObj pointer to reference object * \param theTag tag of a label to store attribute (for 0 this is myLab) */ - void AddReferenceObject( const Handle_HYDROData_Entity& theObj, + void AddReferenceObject( const Handle(HYDROData_Entity)& theObj, const int theTag = 0 ); /** @@ -354,7 +353,7 @@ protected: - if less than zero then prepend to the list - indexing starts from 0 */ - void SetReferenceObject( const Handle_HYDROData_Entity& theObj, + void SetReferenceObject( const Handle(HYDROData_Entity)& theObj, const int theTag = 0, const int theIndex = 0 ); @@ -367,7 +366,7 @@ protected: - if less than zero then prepend to the list - indexing starts from 0 */ - void InsertReferenceObject( const Handle_HYDROData_Entity& theObj, + void InsertReferenceObject( const Handle(HYDROData_Entity)& theObj, const int theTag = 0, const int theBeforeIndex = 0 ); @@ -386,7 +385,7 @@ protected: * - indexing starts from 0 * \returns pointer to reference object or NULL if label is not set */ - Handle_HYDROData_Entity GetReferenceObject( const int theTag = 0, + Handle(HYDROData_Entity) GetReferenceObject( const int theTag = 0, const int theIndex = 0 ) const; HYDROData_SequenceOfObjects GetReferenceObjects( const int theTag = 0 ) const; diff --git a/src/HYDROData/HYDROData_IAltitudeObject.cxx b/src/HYDROData/HYDROData_IAltitudeObject.cxx index 86ecdf4f..6bad46d3 100644 --- a/src/HYDROData/HYDROData_IAltitudeObject.cxx +++ b/src/HYDROData/HYDROData_IAltitudeObject.cxx @@ -20,7 +20,6 @@ #define INVALID_ALTITUDE_VALUE -9999.0 -IMPLEMENT_STANDARD_HANDLE(HYDROData_IAltitudeObject, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IAltitudeObject, HYDROData_Entity) HYDROData_IAltitudeObject::HYDROData_IAltitudeObject() diff --git a/src/HYDROData/HYDROData_IAltitudeObject.h b/src/HYDROData/HYDROData_IAltitudeObject.h index a6d36589..638a1b78 100644 --- a/src/HYDROData/HYDROData_IAltitudeObject.h +++ b/src/HYDROData/HYDROData_IAltitudeObject.h @@ -23,8 +23,6 @@ class gp_XY; -DEFINE_STANDARD_HANDLE(HYDROData_IAltitudeObject, HYDROData_Entity) - /**\class HYDROData_IAltitudeObject * \briefThe base class for all altitude objects in the HYDRO module. @@ -43,15 +41,14 @@ protected: }; public: - - DEFINE_STANDARD_RTTI(HYDROData_IAltitudeObject); + DEFINE_STANDARD_RTTIEXT(HYDROData_IAltitudeObject, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. */ HYDRODATA_EXPORT virtual const ObjectKind GetKind() const = 0; -public: +public: // Public methods to work with altitudes. /** diff --git a/src/HYDROData/HYDROData_IPolyline.cxx b/src/HYDROData/HYDROData_IPolyline.cxx index adc76d3b..42d68480 100644 --- a/src/HYDROData/HYDROData_IPolyline.cxx +++ b/src/HYDROData/HYDROData_IPolyline.cxx @@ -27,7 +27,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_IPolyline, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_IPolyline, HYDROData_Entity) HYDROData_IPolyline::HYDROData_IPolyline() diff --git a/src/HYDROData/HYDROData_IPolyline.h b/src/HYDROData/HYDROData_IPolyline.h index 88f54780..afb307cb 100644 --- a/src/HYDROData/HYDROData_IPolyline.h +++ b/src/HYDROData/HYDROData_IPolyline.h @@ -21,15 +21,12 @@ #include "HYDROData_Entity.h" - -DEFINE_STANDARD_HANDLE(HYDROData_IPolyline, HYDROData_Entity) - class gp_XY; class TopoDS_Shape; -class Handle(TDataStd_RealList); -class Handle(TDataStd_ExtStringList); -class Handle(TDataStd_BooleanList); -class Handle(TDataStd_IntegerList); +class TDataStd_RealList; +class TDataStd_ExtStringList; +class TDataStd_BooleanList; +class TDataStd_IntegerList; /**\class HYDROData_IPolyline @@ -38,7 +35,6 @@ class Handle(TDataStd_IntegerList); class HYDROData_IPolyline : public HYDROData_Entity { public: - enum SectionType{ SECTION_POLYLINE = 0, SECTION_SPLINE = 1 }; typedef gp_XY Point; @@ -58,7 +54,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_IPolyline); + DEFINE_STANDARD_RTTIEXT(HYDROData_IPolyline, HYDROData_Entity); public: diff --git a/src/HYDROData/HYDROData_Image.cxx b/src/HYDROData/HYDROData_Image.cxx index 9cabbc12..74c278b4 100644 --- a/src/HYDROData/HYDROData_Image.cxx +++ b/src/HYDROData/HYDROData_Image.cxx @@ -49,7 +49,6 @@ static const Standard_GUID GUID_SELF_SPLIT("997995aa-5c19-40bf-9a60-ab4b70ad04d8 static const Standard_GUID GUID_HAS_LOCAL_POINTS("FD8841AA-FC44-42fa-B6A7-0F682CCC6F27"); static const Standard_GUID GUID_HAS_GLOBAL_POINTS("330D0E81-742D-4ea3-92D4-484877CFA7C1"); -IMPLEMENT_STANDARD_HANDLE(HYDROData_Image, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity) HYDROData_Image::HYDROData_Image() diff --git a/src/HYDROData/HYDROData_Image.h b/src/HYDROData/HYDROData_Image.h index 5a25af9e..5be02dee 100644 --- a/src/HYDROData/HYDROData_Image.h +++ b/src/HYDROData/HYDROData_Image.h @@ -32,8 +32,6 @@ #pragma warning ( default: 4251 ) #endif -DEFINE_STANDARD_HANDLE(HYDROData_Image, HYDROData_Entity) - /**\class HYDROData_Image * \brief Class that stores/retreives information about the image. * @@ -68,7 +66,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Image); + DEFINE_STANDARD_RTTIEXT(HYDROData_Image, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_ImmersibleZone.cxx b/src/HYDROData/HYDROData_ImmersibleZone.cxx index c456c8c9..abdfd184 100644 --- a/src/HYDROData/HYDROData_ImmersibleZone.cxx +++ b/src/HYDROData/HYDROData_ImmersibleZone.cxx @@ -51,7 +51,6 @@ //#define HYDRODATA_IMZONE_DEB 1 -IMPLEMENT_STANDARD_HANDLE(HYDROData_ImmersibleZone,HYDROData_NaturalObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ImmersibleZone,HYDROData_NaturalObject) diff --git a/src/HYDROData/HYDROData_ImmersibleZone.h b/src/HYDROData/HYDROData_ImmersibleZone.h index 3e4d6e84..cae0e08b 100644 --- a/src/HYDROData/HYDROData_ImmersibleZone.h +++ b/src/HYDROData/HYDROData_ImmersibleZone.h @@ -21,9 +21,7 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_ImmersibleZone, HYDROData_NaturalObject) - -class Handle(HYDROData_PolylineXY); +class HYDROData_PolylineXY; /**\class HYDROData_ImmersibleZone * \brief @@ -42,7 +40,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_ImmersibleZone); + DEFINE_STANDARD_RTTIEXT(HYDROData_ImmersibleZone, HYDROData_NaturalObject); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_LandCover.cxx b/src/HYDROData/HYDROData_LandCover.cxx index d17b5243..c9199eb3 100644 --- a/src/HYDROData/HYDROData_LandCover.cxx +++ b/src/HYDROData/HYDROData_LandCover.cxx @@ -42,7 +42,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE( HYDROData_LandCover, HYDROData_Entity ) IMPLEMENT_STANDARD_RTTIEXT( HYDROData_LandCover, HYDROData_Entity ) HYDROData_LandCover::HYDROData_LandCover() diff --git a/src/HYDROData/HYDROData_LandCoverMap.cxx b/src/HYDROData/HYDROData_LandCoverMap.cxx index 4ad73502..fe76bd40 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.cxx +++ b/src/HYDROData/HYDROData_LandCoverMap.cxx @@ -55,9 +55,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -76,7 +76,6 @@ const char TELEMAC_FORMAT = 'f'; const int TELEMAC_PRECISION = 3; -IMPLEMENT_STANDARD_HANDLE(HYDROData_LandCoverMap, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_LandCoverMap, HYDROData_Entity) /** @@ -1130,7 +1129,7 @@ void HYDROData_LandCoverMap::RemoveInternal(TopoDS_Shape& ShToRebuild, NCollecti // if (!anEdgesToRemove.IsEmpty()) { - Handle_ShapeBuild_ReShape aReshape = new ShapeBuild_ReShape(); + Handle(ShapeBuild_ReShape) aReshape = new ShapeBuild_ReShape(); TopoDS_Shape OutF = aReshape->Apply(CurFace); TopTools_ListIteratorOfListOfShape aIt(anEdgesToRemove); for (; aIt.More(); aIt.Next()) @@ -1145,7 +1144,7 @@ void HYDROData_LandCoverMap::RemoveInternal(TopoDS_Shape& ShToRebuild, NCollecti } } // - Handle_ShapeBuild_ReShape anExtReshape = new ShapeBuild_ReShape(); + Handle(ShapeBuild_ReShape) anExtReshape = new ShapeBuild_ReShape(); for (int i = 1; i <= aF2FReplace->Extent(); i++) { TopoDS_Face aFK = aF2FReplace->FindKey(i); @@ -1233,7 +1232,7 @@ bool HYDROData_LandCoverMap::CheckLinear() { TopoDS_Edge E = TopoDS::Edge(anEdgeEx.Current()); double aFP, aLP; - Handle_Geom_Curve aCur = BRep_Tool::Curve(E, aFP, aLP); + Handle(Geom_Curve) aCur = BRep_Tool::Curve(E, aFP, aLP); Handle(Geom_Line) aLine = Handle(Geom_Line)::DownCast(aCur); if (aLine.IsNull()) { diff --git a/src/HYDROData/HYDROData_LandCoverMap.h b/src/HYDROData/HYDROData_LandCoverMap.h index 6827d52a..d5dfceb1 100644 --- a/src/HYDROData/HYDROData_LandCoverMap.h +++ b/src/HYDROData/HYDROData_LandCoverMap.h @@ -26,19 +26,16 @@ #include #include -class Handle_HYDROData_StricklerTable; +class HYDROData_StricklerTable; #include typedef NCollection_IndexedDataMap HYDROData_MapOfFaceToStricklerType; -DEFINE_STANDARD_HANDLE( HYDROData_LandCoverMap, HYDROData_Entity ) - class TopoDS_Shape; class TopoDS_Wire; class TopoDS_Iterator; -class TopTools_ListOfShape; -class Handle( HYDROData_PolylineXY ); -class Handle( HYDROData_Object ); +class HYDROData_PolylineXY; +class HYDROData_Object; class gp_Pnt2d; class HYDROData_LandCoverMap : public HYDROData_Entity @@ -109,7 +106,7 @@ public: HYDRODATA_EXPORT bool ExportTelemac( const QString& theFileName, double theDeflection, - const Handle_HYDROData_StricklerTable& theTable ) const; + const Handle(HYDROData_StricklerTable)& theTable ) const; HYDRODATA_EXPORT bool Add( const Handle( HYDROData_Object )&, const QString& theType ); HYDRODATA_EXPORT bool Add( const Handle( HYDROData_PolylineXY )&, const QString& theType ); @@ -161,7 +158,7 @@ protected: double theTolerance = 1E-5 ); public: - DEFINE_STANDARD_RTTI( HYDROData_LandCoverMap ); + DEFINE_STANDARD_RTTIEXT( HYDROData_LandCoverMap, HYDROData_Entity ); private: friend class Explorer; diff --git a/src/HYDROData/HYDROData_NaturalObject.cxx b/src/HYDROData/HYDROData_NaturalObject.cxx index 00110438..ff4b3302 100644 --- a/src/HYDROData/HYDROData_NaturalObject.cxx +++ b/src/HYDROData/HYDROData_NaturalObject.cxx @@ -18,7 +18,6 @@ #include "HYDROData_NaturalObject.h" -IMPLEMENT_STANDARD_HANDLE(HYDROData_NaturalObject,HYDROData_Object) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_NaturalObject,HYDROData_Object) HYDROData_NaturalObject::HYDROData_NaturalObject( Geometry theGeometry ) diff --git a/src/HYDROData/HYDROData_NaturalObject.h b/src/HYDROData/HYDROData_NaturalObject.h index e002b9a7..ecc4736a 100644 --- a/src/HYDROData/HYDROData_NaturalObject.h +++ b/src/HYDROData/HYDROData_NaturalObject.h @@ -21,9 +21,6 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_NaturalObject, HYDROData_Object) - - /**\class HYDROData_NaturalObject * \brief The natural objects are objects of environment not created by human. * @@ -40,7 +37,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_NaturalObject); + DEFINE_STANDARD_RTTIEXT(HYDROData_NaturalObject, HYDROData_Object); protected: diff --git a/src/HYDROData/HYDROData_Object.cxx b/src/HYDROData/HYDROData_Object.cxx index 240db460..01543c41 100644 --- a/src/HYDROData/HYDROData_Object.cxx +++ b/src/HYDROData/HYDROData_Object.cxx @@ -32,7 +32,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_Object,HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Object,HYDROData_Entity) HYDROData_Object::HYDROData_Object( Geometry theGeometry ) diff --git a/src/HYDROData/HYDROData_Object.h b/src/HYDROData/HYDROData_Object.h index 0c217f27..e3646b21 100644 --- a/src/HYDROData/HYDROData_Object.h +++ b/src/HYDROData/HYDROData_Object.h @@ -21,12 +21,10 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_Object, HYDROData_Entity) - class TopoDS_Shape; -class Handle(HYDROData_IAltitudeObject); -class Handle(HYDROData_DummyObject3D); -class Handle(HYDROData_ShapesGroup); +class HYDROData_IAltitudeObject; +class HYDROData_DummyObject3D; +class HYDROData_ShapesGroup; /**\class HYDROData_Object * \brief The base class for all geometrical objects in the HYDRO module. @@ -53,7 +51,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Object); + DEFINE_STANDARD_RTTIEXT(HYDROData_Object, HYDROData_Entity); /** * Updates the name of this object. diff --git a/src/HYDROData/HYDROData_Obstacle.cxx b/src/HYDROData/HYDROData_Obstacle.cxx index 4bcc7aa9..29b0a64c 100644 --- a/src/HYDROData/HYDROData_Obstacle.cxx +++ b/src/HYDROData/HYDROData_Obstacle.cxx @@ -78,7 +78,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_Obstacle,HYDROData_ArtificialObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Obstacle,HYDROData_ArtificialObject) diff --git a/src/HYDROData/HYDROData_Obstacle.h b/src/HYDROData/HYDROData_Obstacle.h index bbf690a2..e2b0c392 100644 --- a/src/HYDROData/HYDROData_Obstacle.h +++ b/src/HYDROData/HYDROData_Obstacle.h @@ -21,8 +21,6 @@ #include "HYDROData_ArtificialObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_Obstacle, HYDROData_ArtificialObject) - /**\class HYDROData_Obstacle * \brief * @@ -42,7 +40,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Obstacle); + DEFINE_STANDARD_RTTIEXT(HYDROData_Obstacle, HYDROData_ArtificialObject); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.cxx b/src/HYDROData/HYDROData_ObstacleAltitude.cxx index cba53dfa..7bc4ed00 100644 --- a/src/HYDROData/HYDROData_ObstacleAltitude.cxx +++ b/src/HYDROData/HYDROData_ObstacleAltitude.cxx @@ -31,7 +31,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject) HYDROData_ObstacleAltitude::HYDROData_ObstacleAltitude() diff --git a/src/HYDROData/HYDROData_ObstacleAltitude.h b/src/HYDROData/HYDROData_ObstacleAltitude.h index 3dc1e2ce..3fd489d1 100644 --- a/src/HYDROData/HYDROData_ObstacleAltitude.h +++ b/src/HYDROData/HYDROData_ObstacleAltitude.h @@ -23,8 +23,6 @@ #include "HYDROData_IAltitudeObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject) - /**\class HYDROData_ObstacleAltitude * \brief Class that stores/retreives information about the obstacle altitude. @@ -44,7 +42,7 @@ protected: public: - DEFINE_STANDARD_RTTI(HYDROData_ObstacleAltitude); + DEFINE_STANDARD_RTTIEXT(HYDROData_ObstacleAltitude, HYDROData_IAltitudeObject); /** * Returns the kind of this object. diff --git a/src/HYDROData/HYDROData_OperationsFactory.h b/src/HYDROData/HYDROData_OperationsFactory.h index 2de9ca0b..b9df8e71 100644 --- a/src/HYDROData/HYDROData_OperationsFactory.h +++ b/src/HYDROData/HYDROData_OperationsFactory.h @@ -24,7 +24,7 @@ #include class ImageComposer_Operator; -class Handle_HYDROData_Document; +class HYDROData_Document; /**\class HYDROData_OperationsFactory * @@ -60,7 +60,7 @@ public: * \returns created object related to the data structure */ HYDRODATA_EXPORT Handle(HYDROData_Image) CreateImage( - Handle_HYDROData_Document theDoc, const ImageComposer_Operator* theOperator); + Handle(HYDROData_Document) theDoc, const ImageComposer_Operator* theOperator); /** * Returns the operator, initialized by the properties of theImage diff --git a/src/HYDROData/HYDROData_Polyline3D.cxx b/src/HYDROData/HYDROData_Polyline3D.cxx index 66cec7be..15959d97 100644 --- a/src/HYDROData/HYDROData_Polyline3D.cxx +++ b/src/HYDROData/HYDROData_Polyline3D.cxx @@ -56,7 +56,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_Polyline3D,HYDROData_Object) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Polyline3D,HYDROData_Object) diff --git a/src/HYDROData/HYDROData_Polyline3D.h b/src/HYDROData/HYDROData_Polyline3D.h index e90b1cec..9500afa5 100644 --- a/src/HYDROData/HYDROData_Polyline3D.h +++ b/src/HYDROData/HYDROData_Polyline3D.h @@ -21,10 +21,8 @@ #include "HYDROData_Object.h" -DEFINE_STANDARD_HANDLE(HYDROData_Polyline3D, HYDROData_Object) - -class Handle(HYDROData_PolylineXY); -class Handle(HYDROData_ProfileUZ); +class HYDROData_PolylineXY; +class HYDROData_ProfileUZ; class gp_XYZ; /**\class HYDROData_Polyline3D @@ -51,7 +49,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Polyline3D); + DEFINE_STANDARD_RTTIEXT(HYDROData_Polyline3D, HYDROData_Object); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_PolylineOperator.h b/src/HYDROData/HYDROData_PolylineOperator.h index a4c280b8..6fea4512 100644 --- a/src/HYDROData/HYDROData_PolylineOperator.h +++ b/src/HYDROData/HYDROData_PolylineOperator.h @@ -24,9 +24,9 @@ #include #include -class Handle( HYDROData_Document ); +class HYDROData_Document; class HYDROData_TopoCurve; -class Handle(HYDROData_Object); +class HYDROData_Object; class HYDRODATA_EXPORT HYDROData_PolylineOperator { diff --git a/src/HYDROData/HYDROData_PolylineXY.cxx b/src/HYDROData/HYDROData_PolylineXY.cxx index 3eaa0ad9..9987e164 100644 --- a/src/HYDROData/HYDROData_PolylineXY.cxx +++ b/src/HYDROData/HYDROData_PolylineXY.cxx @@ -126,7 +126,6 @@ TCollection_AsciiString getUniqueSectionName( const Handle(TDataStd_ExtStringLis return getUniqueSectionName( aNamesSeq ); } -IMPLEMENT_STANDARD_HANDLE(HYDROData_PolylineXY, HYDROData_IPolyline) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_PolylineXY, HYDROData_IPolyline) HYDROData_PolylineXY::HYDROData_PolylineXY() diff --git a/src/HYDROData/HYDROData_PolylineXY.h b/src/HYDROData/HYDROData_PolylineXY.h index d67f0ad5..8375616b 100644 --- a/src/HYDROData/HYDROData_PolylineXY.h +++ b/src/HYDROData/HYDROData_PolylineXY.h @@ -22,8 +22,6 @@ #include "HYDROData_IPolyline.h" #include -DEFINE_STANDARD_HANDLE(HYDROData_PolylineXY, HYDROData_IPolyline) - class QPainterPath; class QTransform; class TopoDS_Wire; @@ -47,7 +45,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_PolylineXY); + DEFINE_STANDARD_RTTIEXT(HYDROData_PolylineXY, HYDROData_IPolyline); /** diff --git a/src/HYDROData/HYDROData_PriorityQueue.h b/src/HYDROData/HYDROData_PriorityQueue.h index 7983a1f7..ef5660ab 100644 --- a/src/HYDROData/HYDROData_PriorityQueue.h +++ b/src/HYDROData/HYDROData_PriorityQueue.h @@ -48,7 +48,7 @@ public: Standard_Integer aTag ); ~HYDROData_PriorityQueue(); - Handle_HYDROData_Entity GetMostPriorityObject( const QStringList& theZoneObjects, + Handle(HYDROData_Entity) GetMostPriorityObject( const QStringList& theZoneObjects, HYDROData_Zone::MergeType& theMergeType ) const; bool IsMorePriority( const Handle(HYDROData_Entity)& theObj1, diff --git a/src/HYDROData/HYDROData_Profile.cxx b/src/HYDROData/HYDROData_Profile.cxx index 1faa2960..6308af14 100644 --- a/src/HYDROData/HYDROData_Profile.cxx +++ b/src/HYDROData/HYDROData_Profile.cxx @@ -50,7 +50,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object) HYDROData_Profile::HYDROData_Profile() diff --git a/src/HYDROData/HYDROData_Profile.h b/src/HYDROData/HYDROData_Profile.h index 5bcc450d..1809a02c 100644 --- a/src/HYDROData/HYDROData_Profile.h +++ b/src/HYDROData/HYDROData_Profile.h @@ -23,11 +23,9 @@ #include "HYDROData_ProfileUZ.h" -DEFINE_STANDARD_HANDLE(HYDROData_Profile, HYDROData_Object) - class gp_XYZ; class OSD_File; -class Handle(HYDROData_Document); +class HYDROData_Document; /**\class HYDROData_Profile * \brief Class that stores/retreives information about the profile. @@ -53,7 +51,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Profile); + DEFINE_STANDARD_RTTIEXT(HYDROData_Profile, HYDROData_Object); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_ProfileUZ.cxx b/src/HYDROData/HYDROData_ProfileUZ.cxx index bfe75e3b..5dccf20c 100644 --- a/src/HYDROData/HYDROData_ProfileUZ.cxx +++ b/src/HYDROData/HYDROData_ProfileUZ.cxx @@ -36,7 +36,6 @@ #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_ProfileUZ, HYDROData_IPolyline) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ProfileUZ, HYDROData_IPolyline) HYDROData_ProfileUZ::HYDROData_ProfileUZ() @@ -279,7 +278,7 @@ HYDROData_ProfileUZ::PointsList HYDROData_ProfileUZ::GetPoints( const int /*theS return aResList; } -void HYDROData_ProfileUZ::CalculateAndAddPoints(const NCollection_Sequence& theXYZPoints, Handle_HYDROData_PolylineXY& thePolylineXY) +void HYDROData_ProfileUZ::CalculateAndAddPoints(const NCollection_Sequence& theXYZPoints, Handle(HYDROData_PolylineXY)& thePolylineXY) { // Fill 2D polyline for ( int i = 1; i <= theXYZPoints.Size(); i++ ) { diff --git a/src/HYDROData/HYDROData_ProfileUZ.h b/src/HYDROData/HYDROData_ProfileUZ.h index aa9ebbc9..2fcb3899 100644 --- a/src/HYDROData/HYDROData_ProfileUZ.h +++ b/src/HYDROData/HYDROData_ProfileUZ.h @@ -21,10 +21,8 @@ #include "HYDROData_IPolyline.h" -DEFINE_STANDARD_HANDLE(HYDROData_ProfileUZ, HYDROData_IPolyline) - class gp_XYZ; -class Handle_HYDROData_PolylineXY; +class HYDROData_PolylineXY; /**\class HYDROData_ProfileUZ * \brief Class that stores/retreives information about the @@ -42,7 +40,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_ProfileUZ); + DEFINE_STANDARD_RTTIEXT(HYDROData_ProfileUZ, HYDROData_IPolyline); /** @@ -170,7 +168,8 @@ public: */ HYDRODATA_EXPORT virtual PointsList GetPoints( const int theSectionIndex = -1, bool IsConvertToGlobal = false ) const; - HYDRODATA_EXPORT virtual void CalculateAndAddPoints(const NCollection_Sequence& theXYZPoints, Handle_HYDROData_PolylineXY& thePolylineXY); + HYDRODATA_EXPORT virtual void CalculateAndAddPoints(const NCollection_Sequence& theXYZPoints, + Handle(HYDROData_PolylineXY)& thePolylineXY); protected: diff --git a/src/HYDROData/HYDROData_Projection.cxx b/src/HYDROData/HYDROData_Projection.cxx index c88501ba..855ae1e7 100644 --- a/src/HYDROData/HYDROData_Projection.cxx +++ b/src/HYDROData/HYDROData_Projection.cxx @@ -42,7 +42,6 @@ #include #include #include -#include #include HYDROData_Make3dMesh::HYDROData_Make3dMesh( const TopoDS_Shape& aShape, diff --git a/src/HYDROData/HYDROData_Projection.h b/src/HYDROData/HYDROData_Projection.h index dab681c6..917949ca 100644 --- a/src/HYDROData/HYDROData_Projection.h +++ b/src/HYDROData/HYDROData_Projection.h @@ -21,14 +21,14 @@ #include #include +#include +#include class TopoDS_Shape; class TopoDS_Edge; class TopoDS_Face; class TopoDS_Wire; class TopoDS_Vertex; -class TopTools_ListOfShape; -class TopTools_IndexedDataMapOfShapeListOfShape; class gp_Pnt; class HYDROData_Make3dMesh diff --git a/src/HYDROData/HYDROData_Region.cxx b/src/HYDROData/HYDROData_Region.cxx index 698cfc94..f74956ce 100644 --- a/src/HYDROData/HYDROData_Region.cxx +++ b/src/HYDROData/HYDROData_Region.cxx @@ -48,7 +48,6 @@ //#define DEB_GET_REGION_SHAPE -IMPLEMENT_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity) diff --git a/src/HYDROData/HYDROData_Region.h b/src/HYDROData/HYDROData_Region.h index 08af0ab6..e7fcfeab 100644 --- a/src/HYDROData/HYDROData_Region.h +++ b/src/HYDROData/HYDROData_Region.h @@ -22,10 +22,8 @@ #include "HYDROData_ShapesGroup.h" -DEFINE_STANDARD_HANDLE(HYDROData_Region, HYDROData_Entity) - -class Handle(HYDROData_Zone); -class Handle(HYDROData_Document); +class HYDROData_Zone; +class HYDROData_Document; class TopoDS_Shape; class TopoDS_Face; class QStringList; @@ -35,9 +33,7 @@ class QStringList; */ class HYDROData_Region : public HYDROData_Entity { - protected: - /** * Enumeration of tags corresponding to the persistent object parameters. */ @@ -49,7 +45,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Region); + DEFINE_STANDARD_RTTIEXT(HYDROData_Region, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_River.cxx b/src/HYDROData/HYDROData_River.cxx index 1f197c03..b43f8a33 100644 --- a/src/HYDROData/HYDROData_River.cxx +++ b/src/HYDROData/HYDROData_River.cxx @@ -24,7 +24,6 @@ #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_River,HYDROData_NaturalObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_River,HYDROData_NaturalObject) diff --git a/src/HYDROData/HYDROData_River.h b/src/HYDROData/HYDROData_River.h index 0873ce15..27376559 100644 --- a/src/HYDROData/HYDROData_River.h +++ b/src/HYDROData/HYDROData_River.h @@ -21,8 +21,6 @@ #include "HYDROData_NaturalObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_River, HYDROData_NaturalObject) - /**\class HYDROData_River * \brief * @@ -39,7 +37,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_River); + DEFINE_STANDARD_RTTIEXT(HYDROData_River, HYDROData_NaturalObject); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_ShapeFile.cxx b/src/HYDROData/HYDROData_ShapeFile.cxx index 37f759f0..b928ce8d 100644 --- a/src/HYDROData/HYDROData_ShapeFile.cxx +++ b/src/HYDROData/HYDROData_ShapeFile.cxx @@ -35,9 +35,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -80,21 +80,21 @@ HYDROData_ShapeFile::~HYDROData_ShapeFile() void HYDROData_ShapeFile::Export(Handle(HYDROData_Document) theDocument, const QString& aFileName, - NCollection_Sequence aPolyXYSeq, - NCollection_Sequence aPoly3DSeq, + NCollection_Sequence aPolyXYSeq, + NCollection_Sequence aPoly3DSeq, QStringList& aNonExpList) { SHPHandle hSHPHandle; if (!aPolyXYSeq.IsEmpty() && aPoly3DSeq.IsEmpty()) { - hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_ARC ); + hSHPHandle = SHPCreate( aFileName.toLatin1().data(), SHPT_ARC ); for (int i = 1; i <= aPolyXYSeq.Size(); i++) if (WriteObjectPolyXY(theDocument, hSHPHandle, aPolyXYSeq(i)) != 1) aNonExpList.append(aPolyXYSeq(i)->GetName()); } else if (aPolyXYSeq.IsEmpty() && !aPoly3DSeq.IsEmpty()) { - hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_ARCZ ); + hSHPHandle = SHPCreate( aFileName.toLatin1().data(), SHPT_ARCZ ); for (int i = 1; i <= aPoly3DSeq.Size(); i++) if (WriteObjectPoly3D(theDocument, hSHPHandle, aPoly3DSeq(i)) != 1) aNonExpList.append(aPoly3DSeq(i)->GetName()); @@ -112,7 +112,7 @@ void HYDROData_ShapeFile::Export(Handle(HYDROData_Document) theDocument, void HYDROData_ShapeFile::Export(Handle(HYDROData_Document) theDocument, const QString& aFileName, - const Handle_HYDROData_LandCoverMap& aLCM, + const Handle(HYDROData_LandCoverMap)& aLCM, QStringList& aNonExpList, bool bCheckLinear, bool bUseDiscr, double theDefl) { @@ -122,7 +122,7 @@ void HYDROData_ShapeFile::Export(Handle(HYDROData_Document) theDocument, SHPHandle hSHPHandle = NULL; if ( !aLCM.IsNull() && !aLCM->IsEmpty()) { - hSHPHandle = SHPCreate( aFileName.toAscii().data(), SHPT_POLYGON ); + hSHPHandle = SHPCreate( aFileName.toLatin1().data(), SHPT_POLYGON ); HYDROData_LandCoverMap::Explorer It( aLCM ); for( ; It.More(); It.Next()) { @@ -145,7 +145,7 @@ void HYDROData_ShapeFile::Export(Handle(HYDROData_Document) theDocument, int HYDROData_ShapeFile::WriteObjectPolyXY(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, - Handle_HYDROData_PolylineXY thePoly ) + Handle(HYDROData_PolylineXY) thePoly ) { SHPObject *aSHPObj; std::vector x, y; @@ -183,7 +183,7 @@ int HYDROData_ShapeFile::WriteObjectPolyXY(Handle(HYDROData_Document) theDocumen int HYDROData_ShapeFile::WriteObjectPoly3D(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, - Handle_HYDROData_Polyline3D thePoly ) + Handle(HYDROData_Polyline3D) thePoly ) { SHPObject *aSHPObj; std::vector x, y, z; @@ -397,7 +397,7 @@ void HYDROData_ShapeFile::ReadSHPPolygon(Handle(HYDROData_Document) theDocument, return; TopoDS_Edge E; int nParts = anObj->nParts; - Handle_Geom_Plane aPlaneSur = new Geom_Plane(gp_Pnt(0,0,0), gp_Dir(0,0,1)); + Handle(Geom_Plane) aPlaneSur = new Geom_Plane(gp_Pnt(0,0,0), gp_Dir(0,0,1)); BRep_Builder BB; BB.MakeFace(F); @@ -436,7 +436,7 @@ void HYDROData_ShapeFile::ReadSHPPolygon(Handle(HYDROData_Document) theDocument, gp_Pnt P2 = BRep_Tool::Pnt(VPoints(k + 1)); if (P1.Distance(P2) < Precision::Confusion()) continue; - Handle_Geom_TrimmedCurve aTC = GC_MakeSegment(P1, P2).Value(); + Handle(Geom_TrimmedCurve) aTC = GC_MakeSegment(P1, P2).Value(); TopoDS_Edge E; if ( k != VPoints.Size() - 2) E = BRepLib_MakeEdge(aTC, VPoints(k), VPoints(k + 1)).Edge(); @@ -519,7 +519,7 @@ int HYDROData_ShapeFile::ImportPolygons(Handle(HYDROData_Document) theDocument, int Stat = TryOpenShapeFile(theFileName); if (Stat != 0) return Stat; - myHSHP = SHPOpen( theFileName.toAscii().data(), "rb" ); + myHSHP = SHPOpen( theFileName.toLatin1().data(), "rb" ); if (!Parse(myHSHP, HYDROData_ShapeFile::ShapeType_Polygon, theShapeTypeOfFile)) return 0; for (size_t i = 0; i < mySHPObjects.size(); i++) @@ -562,7 +562,7 @@ void HYDROData_ShapeFile::Free() void HYDROData_ShapeFile::ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities) + int theInd, NCollection_Sequence& theEntities) { Handle(HYDROData_PolylineXY) aPolylineXY = Handle(HYDROData_PolylineXY)::DownCast( theDocument->CreateObject( KIND_POLYLINEXY ) ); @@ -583,10 +583,10 @@ void HYDROData_ShapeFile::ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, anObj->padfY[StartIndex] == anObj->padfY[EndIndex - 1] ) { IsClosed = true; - aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toAscii()), aSectType, true); + aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toLatin1()), aSectType, true); } else - aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toAscii()), aSectType, false); + aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toLatin1()), aSectType, false); if (IsClosed) EndIndex--; @@ -608,7 +608,7 @@ void HYDROData_ShapeFile::ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, } void HYDROData_ShapeFile::ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities) + int theInd, NCollection_Sequence& theEntities) { Handle(HYDROData_PolylineXY) aPolylineXY = Handle(HYDROData_PolylineXY)::DownCast( theDocument->CreateObject( KIND_POLYLINEXY ) ); @@ -635,10 +635,10 @@ void HYDROData_ShapeFile::ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, anObj->padfZ[StartIndex] == anObj->padfZ[EndIndex - 1]) { IsClosed = true; - aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toAscii()), aSectType, true ); + aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toLatin1()), aSectType, true ); } else - aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toAscii()), aSectType, false ); + aPolylineXY->AddSection( TCollection_AsciiString( ("poly_section_" + QString::number(i)).data()->toLatin1()), aSectType, false ); if (IsClosed) EndIndex--; @@ -678,7 +678,7 @@ void HYDROData_ShapeFile::ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, int HYDROData_ShapeFile::ImportPolylines(Handle(HYDROData_Document) theDocument, const QString& theFileName, - NCollection_Sequence& theEntities, int& theShapeTypeOfFile) + NCollection_Sequence& theEntities, int& theShapeTypeOfFile) { //Free(); int aStat = TryOpenShapeFile(theFileName); @@ -693,7 +693,7 @@ int HYDROData_ShapeFile::ImportPolylines(Handle(HYDROData_Document) theDocument, anExistingNames.push_back(anIter.Current()->GetName()); SHPHandle aHSHP; - aHSHP = SHPOpen( theFileName.toAscii().data(), "rb" ); + aHSHP = SHPOpen( theFileName.toLatin1().data(), "rb" ); QFileInfo aFileInfo(theFileName); QString aBaseFileName = aFileInfo.baseName(); @@ -799,9 +799,9 @@ int HYDROData_ShapeFile::TryOpenShapeFile(QString theFileName) return -3; FILE* pFileSHP = NULL; - pFileSHP = fopen (aSHPfile.toAscii().data(), "r"); + pFileSHP = fopen (aSHPfile.toLatin1().data(), "r"); FILE* pFileSHX = NULL; - pFileSHX = fopen (aSHXfile.toAscii().data(), "r"); + pFileSHX = fopen (aSHXfile.toLatin1().data(), "r"); if (pFileSHP == NULL || pFileSHX == NULL) { @@ -822,7 +822,7 @@ bool HYDROData_ShapeFile::CheckDBFFileExisting(const QString& theSHPFilePath, QS QString aSHPfile = theSHPFilePath.simplified(); QString aDBFfile = theSHPFilePath.simplified().replace( theSHPFilePath.simplified().size() - 4, 4, ".dbf"); FILE* pFileDBF = NULL; - pFileDBF = fopen (aDBFfile.toAscii().data(), "r"); + pFileDBF = fopen (aDBFfile.toLatin1().data(), "r"); if (pFileDBF == NULL) { @@ -837,7 +837,7 @@ bool HYDROData_ShapeFile::CheckDBFFileExisting(const QString& theSHPFilePath, QS bool HYDROData_ShapeFile::DBF_OpenDBF(const QString& thePathToDBFFile) { - myHDBF = DBFOpen( thePathToDBFFile.toAscii().data(), "r" ); + myHDBF = DBFOpen( thePathToDBFFile.toLatin1().data(), "r" ); if(myHDBF != NULL) return true; else diff --git a/src/HYDROData/HYDROData_ShapeFile.h b/src/HYDROData/HYDROData_ShapeFile.h index fbeeb643..10dec110 100644 --- a/src/HYDROData/HYDROData_ShapeFile.h +++ b/src/HYDROData/HYDROData_ShapeFile.h @@ -23,20 +23,20 @@ #include #include #include "HYDROData.h" +#include //extern "C" { #include //}; class gp_XYZ; -class Handle_HYDROData_PolylineXY; -class Handle_HYDROData_Polyline3D; -class Handle(HYDROData_Document); -class TopTools_SequenceOfShape; +class HYDROData_PolylineXY; +class HYDROData_Polyline3D; +class HYDROData_Document; class TopoDS_Face; class TopoDS_Shape; -class Handle_HYDROData_Entity; -class Handle_HYDROData_LandCoverMap; +class HYDROData_Entity; +class HYDROData_LandCoverMap; class HYDROData_ShapeFile { @@ -83,23 +83,23 @@ public: //Export operation HYDRODATA_EXPORT void Export(Handle(HYDROData_Document) theDocument, const QString& aFileName, - NCollection_Sequence aPolyXYSeq, - NCollection_Sequence aPoly3DSeq, + NCollection_Sequence aPolyXYSeq, + NCollection_Sequence aPoly3DSeq, QStringList& aNonExpList); HYDRODATA_EXPORT void Export(Handle(HYDROData_Document) theDocument, const QString& aFileName, - const Handle_HYDROData_LandCoverMap& aLCM, + const Handle(HYDROData_LandCoverMap)& aLCM, QStringList& aNonExpList, bool bCheckLinear = true, bool bUseDiscr = false, double theDefl = 0.1); int WriteObjectPolyXY(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, - Handle_HYDROData_PolylineXY thePoly ); + Handle(HYDROData_PolylineXY) thePoly ); int WriteObjectPoly3D(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, - Handle_HYDROData_Polyline3D thePoly ); + Handle(HYDROData_Polyline3D) thePoly ); int WriteObjectPolygon(Handle(HYDROData_Document) theDocument, SHPHandle theShpHandle, const TopoDS_Shape& theInputShape, bool bUseDiscr, double theDefl ); @@ -118,13 +118,13 @@ public: //Import Polyline void ReadSHPPolyXY(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities); + int theInd, NCollection_Sequence& theEntities); void ReadSHPPoly3D(Handle(HYDROData_Document) theDocument, SHPObject* anObj, QString theFileName, - int theInd, NCollection_Sequence& theEntities); + int theInd, NCollection_Sequence& theEntities); HYDRODATA_EXPORT int ImportPolylines(Handle(HYDROData_Document) theDocument, const QString& theFileName, - NCollection_Sequence& theEntities, int& theShapeTypeOfFile); + NCollection_Sequence& theEntities, int& theShapeTypeOfFile); HYDRODATA_EXPORT QString GetShapeTypeName(int theType); diff --git a/src/HYDROData/HYDROData_ShapesGroup.cxx b/src/HYDROData/HYDROData_ShapesGroup.cxx index 6c0d5ae0..1a086b76 100644 --- a/src/HYDROData/HYDROData_ShapesGroup.cxx +++ b/src/HYDROData/HYDROData_ShapesGroup.cxx @@ -31,7 +31,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_ShapesGroup,HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_ShapesGroup,HYDROData_Entity) void HYDROData_ShapesGroup::GroupDefinition::Update( SeqOfGroupsDefs* theGroupsDefs, diff --git a/src/HYDROData/HYDROData_ShapesGroup.h b/src/HYDROData/HYDROData_ShapesGroup.h index db2a29ea..92018bf5 100644 --- a/src/HYDROData/HYDROData_ShapesGroup.h +++ b/src/HYDROData/HYDROData_ShapesGroup.h @@ -20,18 +20,14 @@ #define HYDROData_ShapesGroup_HeaderFile #include - #include - +#include #include class TopoDS_Shape; -class TopTools_ListOfShape; class BRepBuilderAPI_MakeShape; class ShapeUpgrade_UnifySameDomain; -DEFINE_STANDARD_HANDLE(HYDROData_ShapesGroup, HYDROData_Entity) - /**\class HYDROData_ShapesGroup * \brief Class that stores/retreives the sequence of shapes. */ @@ -70,7 +66,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_ShapesGroup); + DEFINE_STANDARD_RTTIEXT(HYDROData_ShapesGroup, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_ShapesTool.h b/src/HYDROData/HYDROData_ShapesTool.h index 65b9b277..53d391db 100644 --- a/src/HYDROData/HYDROData_ShapesTool.h +++ b/src/HYDROData/HYDROData_ShapesTool.h @@ -22,12 +22,12 @@ #include "HYDROData.h" #include +#include +#include class TopoDS_Shape; class TopoDS_Vertex; class TopoDS_Edge; -class TopTools_SequenceOfShape; -class TopTools_ListOfShape; class HYDRODATA_EXPORT HYDROData_ShapesTool { diff --git a/src/HYDROData/HYDROData_SinusX.cxx b/src/HYDROData/HYDROData_SinusX.cxx index 4b9dc6f4..8bee17ad 100644 --- a/src/HYDROData/HYDROData_SinusX.cxx +++ b/src/HYDROData/HYDROData_SinusX.cxx @@ -43,7 +43,7 @@ HYDROData_SinusX::~HYDROData_SinusX() { } -void HYDROData_SinusX::CollectExistingNames(Handle_HYDROData_Document theDocument) +void HYDROData_SinusX::CollectExistingNames(Handle(HYDROData_Document) theDocument) { HYDROData_Iterator anIter( theDocument ); int anInd = 0; @@ -86,7 +86,8 @@ QString HYDROData_SinusX::GetName(const QString& theName) } -bool HYDROData_SinusX::Import(const QString& theFilePath, Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities) +bool HYDROData_SinusX::Import(const QString& theFilePath, Handle(HYDROData_Document) theDocument, + NCollection_Sequence& theEntities) { if ( theFilePath.isEmpty() ) { @@ -115,7 +116,7 @@ bool HYDROData_SinusX::Import(const QString& theFilePath, Handle(HYDROData_Docum } -void HYDROData_SinusX::SXToHydro(Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities) +void HYDROData_SinusX::SXToHydro(Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities) { for ( size_t i = 0; i < myCurveBlocks.size(); i++ ) { @@ -322,7 +323,7 @@ bool HYDROData_SinusX::Parse(QFile& theFile) } -bool HYDROData_SinusX::Export(const QString& theFilePath, const NCollection_Sequence& theEntities) +bool HYDROData_SinusX::Export(const QString& theFilePath, const NCollection_Sequence& theEntities) { if ( theFilePath.isEmpty() ) { @@ -348,7 +349,7 @@ bool HYDROData_SinusX::Export(const QString& theFilePath, const NCollection_Sequ } -void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_Sequence& theEntities) +void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_Sequence& theEntities) { QTextStream aTextStream(&theFile); aTextStream << "C Generated by HYDRO Module\n"; @@ -356,7 +357,7 @@ void HYDROData_SinusX::HydroToSX(QFile& theFile, const NCollection_SequenceIsKind( STANDARD_TYPE(HYDROData_Bathymetry) )) { Handle(HYDROData_Bathymetry) aBathy = Handle(HYDROData_Bathymetry)::DownCast( anEnt ); diff --git a/src/HYDROData/HYDROData_SinusX.h b/src/HYDROData/HYDROData_SinusX.h index b2f6a8e6..03899572 100644 --- a/src/HYDROData/HYDROData_SinusX.h +++ b/src/HYDROData/HYDROData_SinusX.h @@ -27,8 +27,8 @@ class QFile; class gp_XYZ; -class Handle_HYDROData_Entity; -class Handle_HYDROData_Document; +class HYDROData_Entity; +class HYDROData_Document; struct HYDROGUI_CurveBlock { @@ -51,15 +51,15 @@ class HYDRODATA_EXPORT HYDROData_SinusX public: HYDROData_SinusX( ); virtual ~HYDROData_SinusX(); - bool Import (const QString& theFilePath, Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities); - bool Export(const QString& theFilePath, const NCollection_Sequence& theEntities); + bool Import (const QString& theFilePath, Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities); + bool Export(const QString& theFilePath, const NCollection_Sequence& theEntities); private: - void SXToHydro(Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities); + void SXToHydro(Handle(HYDROData_Document) theDocument, NCollection_Sequence& theEntities); bool Parse( QFile& theFile ); - void CollectExistingNames(Handle_HYDROData_Document theDocument); + void CollectExistingNames(Handle(HYDROData_Document) theDocument); QString GetName(const QString& theName); - void HydroToSX( QFile& theFile, const NCollection_Sequence& theEntities); + void HydroToSX( QFile& theFile, const NCollection_Sequence& theEntities); private: diff --git a/src/HYDROData/HYDROData_SplitShapesGroup.cxx b/src/HYDROData/HYDROData_SplitShapesGroup.cxx index dd50bc4e..090473fd 100644 --- a/src/HYDROData/HYDROData_SplitShapesGroup.cxx +++ b/src/HYDROData/HYDROData_SplitShapesGroup.cxx @@ -18,7 +18,6 @@ #include "HYDROData_SplitShapesGroup.h" -IMPLEMENT_STANDARD_HANDLE(HYDROData_SplitShapesGroup,HYDROData_ShapesGroup) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_SplitShapesGroup,HYDROData_ShapesGroup) HYDROData_SplitShapesGroup::HYDROData_SplitShapesGroup() diff --git a/src/HYDROData/HYDROData_SplitShapesGroup.h b/src/HYDROData/HYDROData_SplitShapesGroup.h index 81e04ded..8cd00a8d 100644 --- a/src/HYDROData/HYDROData_SplitShapesGroup.h +++ b/src/HYDROData/HYDROData_SplitShapesGroup.h @@ -21,9 +21,6 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_SplitShapesGroup, HYDROData_ShapesGroup) - - /**\class HYDROData_SplitShapesGroup * \brief Class that stores/retreives the sequence of split shapes. */ @@ -39,7 +36,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_SplitShapesGroup); + DEFINE_STANDARD_RTTIEXT(HYDROData_SplitShapesGroup, HYDROData_ShapesGroup); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_SplitToZonesTool.h b/src/HYDROData/HYDROData_SplitToZonesTool.h index eaa58208..c5545978 100644 --- a/src/HYDROData/HYDROData_SplitToZonesTool.h +++ b/src/HYDROData/HYDROData_SplitToZonesTool.h @@ -34,7 +34,7 @@ #include #include -class Handle(HYDROData_PolylineXY); +class HYDROData_PolylineXY; /** * \class HYDROData_SplitToZonesTool diff --git a/src/HYDROData/HYDROData_Stream.cxx b/src/HYDROData/HYDROData_Stream.cxx index 44833c6a..518753aa 100644 --- a/src/HYDROData/HYDROData_Stream.cxx +++ b/src/HYDROData/HYDROData_Stream.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include @@ -75,10 +74,9 @@ #include -#include - #include #include +#include //#define DEB_STREAM 1 #ifdef DEB_STREAM @@ -90,7 +88,6 @@ typedef NCollection_DataMap HYDROData_DataMapOfRealOfHDProfile; -IMPLEMENT_STANDARD_HANDLE(HYDROData_Stream,HYDROData_NaturalObject) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Stream,HYDROData_NaturalObject) @@ -679,20 +676,21 @@ void HYDROData_Stream::updateProfilesOrder() if ( aList.IsEmpty() ) return; - TColStd_Array1OfReal anArr( 1, aList.Extent() ); + QVector anArr( aList.Extent() ); TColStd_ListIteratorOfListOfReal it( aList ); for ( int j = 1; it.More(); it.Next(), j++ ) - anArr( j ) = it.Value(); + anArr[j-1] = it.Value(); // sorting if ( aList.Extent() > 1 ) { - TCollection_CompareOfReal Compar; - SortTools_QuickSortOfReal::Sort( anArr, Compar ); + //TCollection_CompareOfReal Compar; + //SortTools_QuickSortOfReal::Sort( anArr, Compar ); + std::sort( anArr.begin(), anArr.end() ); - for (int j = 1; j <= anArr.Length(); j++) { - const Standard_Real aKey = anArr(j); + for (int j = 1; j <= anArr.size(); j++) { + const Standard_Real aKey = anArr[j-1]; const Handle(HYDROData_Profile)& aProfile = aDM.Find(aKey); insertProfileInToOrder( aProfile ); } @@ -716,9 +714,9 @@ ObjectKind HYDROData_Stream::getAltitudeObjectType() const return KIND_STREAM_ALTITUDE; } -void HYDROData_Stream::setParametersArray( const TColStd_Array1OfReal& theArray ) +void HYDROData_Stream::setParametersArray( const QVector& theArray ) { - if ( theArray.Length() == 0 ) + if ( theArray.size() == 0 ) { removeParametersArray(); return; @@ -726,13 +724,13 @@ void HYDROData_Stream::setParametersArray( const TColStd_Array1OfReal& theArray TDF_Label aLabel = myLab.FindChild( DataTag_ParamsArray ); + int n = theArray.size(); Handle(TDataStd_RealArray) aParamsArray = - TDataStd_RealArray::Set( aLabel, theArray.Lower(), theArray.Upper() ); - - for ( int i = theArray.Lower(), n = theArray.Upper(); i <= n; ++i ) + TDataStd_RealArray::Set( aLabel, 1, n ); + for ( int i = 0; i < n; ++i ) { - const Standard_Real& aParam = theArray( i ); - aParamsArray->SetValue( i, aParam ); + const Standard_Real& aParam = theArray[i]; + aParamsArray->SetValue( i+1, aParam ); } } @@ -774,7 +772,7 @@ int HYDROData_Stream::insertParameter( const Standard_Real& theParam ) { aResIndex = 0; - TColStd_Array1OfReal aNewArr( anArr->Lower(), anArr->Upper() + 1 ); + QVector aNewArr( anArr->Upper() ); bool isInserted = false; for ( int i = anArr->Lower(), j = i, n = anArr->Upper(); i <= n; ++i, ++j ) @@ -788,19 +786,19 @@ int HYDROData_Stream::insertParameter( const Standard_Real& theParam ) } else { - aNewArr( j ) = theParam; + aNewArr[j-1] = theParam; isInserted = true; ++j; } } - aNewArr( j ) = aStoredParam; + aNewArr[j-1] = aStoredParam; } if ( !isInserted ) { aResIndex = -1; - aNewArr( aNewArr.Upper() ) = theParam; + aNewArr[aNewArr.size()-1] = theParam; } setParametersArray( aNewArr ); @@ -808,8 +806,8 @@ int HYDROData_Stream::insertParameter( const Standard_Real& theParam ) } else { - TColStd_Array1OfReal aNewArr( 1, 1 ); - aNewArr.SetValue( 1, theParam ); + QVector aNewArr( 1 ); + aNewArr[0] = theParam; setParametersArray( aNewArr ); } @@ -832,7 +830,7 @@ void HYDROData_Stream::removeParameter( const int& theIndex ) return; } - TColStd_Array1OfReal aNewArr( aParamsArray->Lower(), aParamsArray->Upper() - 1 ); + QVector aNewArr( aParamsArray->Upper() - 2 ); for ( int i = aParamsArray->Lower(), j = i, k = 0, n = aParamsArray->Upper(); i <= n; ++i, ++k ) { @@ -840,7 +838,7 @@ void HYDROData_Stream::removeParameter( const int& theIndex ) if ( k == theIndex ) continue; - aNewArr.SetValue( j, aStoredParam ); + aNewArr[j-1] = aStoredParam; ++j; } @@ -1166,4 +1164,4 @@ bool HYDROData_Stream::CreatePresentations( const Handle(TColgp_HArray1OfPnt) #endif return true; -} \ No newline at end of file +} diff --git a/src/HYDROData/HYDROData_Stream.h b/src/HYDROData/HYDROData_Stream.h index 73691575..ee72a164 100644 --- a/src/HYDROData/HYDROData_Stream.h +++ b/src/HYDROData/HYDROData_Stream.h @@ -26,14 +26,11 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_Stream, HYDROData_NaturalObject) - -class Handle(HYDROData_PolylineXY); -class Handle(HYDROData_Polyline3D); -class Handle(HYDROData_Profile); +class HYDROData_PolylineXY; +class HYDROData_Polyline3D; +class HYDROData_Profile; class HYDROData_IProfilesInterpolator; -class TColStd_Array1OfReal; -class Handle(TopTools_HArray1OfShape); +class TopTools_HArray1OfShape; /**\class HYDROData_Stream @@ -68,8 +65,7 @@ protected: }; public: - - DEFINE_STANDARD_RTTI(HYDROData_Stream); + DEFINE_STANDARD_RTTIEXT(HYDROData_Stream, HYDROData_NaturalObject); public: @@ -292,7 +288,7 @@ protected: private: - void setParametersArray( const TColStd_Array1OfReal& theArray ); + void setParametersArray( const QVector& theArray ); TColStd_Array1OfReal* getParametersArray() const; diff --git a/src/HYDROData/HYDROData_StreamAltitude.cxx b/src/HYDROData/HYDROData_StreamAltitude.cxx index d00d47c8..cbd1cca0 100644 --- a/src/HYDROData/HYDROData_StreamAltitude.cxx +++ b/src/HYDROData/HYDROData_StreamAltitude.cxx @@ -61,7 +61,7 @@ #include #include #endif -IMPLEMENT_STANDARD_HANDLE(HYDROData_StreamAltitude, HYDROData_IAltitudeObject) + IMPLEMENT_STANDARD_RTTIEXT(HYDROData_StreamAltitude, HYDROData_IAltitudeObject) HYDROData_StreamAltitude::HYDROData_StreamAltitude() diff --git a/src/HYDROData/HYDROData_StreamAltitude.h b/src/HYDROData/HYDROData_StreamAltitude.h index 77bf0b2a..25bd528e 100644 --- a/src/HYDROData/HYDROData_StreamAltitude.h +++ b/src/HYDROData/HYDROData_StreamAltitude.h @@ -23,8 +23,6 @@ #include "HYDROData_IAltitudeObject.h" -DEFINE_STANDARD_HANDLE(HYDROData_StreamAltitude, HYDROData_IAltitudeObject) - class TopoDS_Wire; /**\class HYDROData_StreamAltitude @@ -45,7 +43,7 @@ protected: public: - DEFINE_STANDARD_RTTI(HYDROData_StreamAltitude); + DEFINE_STANDARD_RTTIEXT(HYDROData_StreamAltitude, HYDROData_IAltitudeObject); /** * Returns the kind of this object. diff --git a/src/HYDROData/HYDROData_StricklerTable.cxx b/src/HYDROData/HYDROData_StricklerTable.cxx index 6cf7c2cc..1c51cf1e 100644 --- a/src/HYDROData/HYDROData_StricklerTable.cxx +++ b/src/HYDROData/HYDROData_StricklerTable.cxx @@ -38,7 +38,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE( HYDROData_StricklerTable, HYDROData_Entity ) IMPLEMENT_STANDARD_RTTIEXT( HYDROData_StricklerTable, HYDROData_Entity ) HYDROData_StricklerTable::HYDROData_StricklerTable() diff --git a/src/HYDROData/HYDROData_StricklerTable.h b/src/HYDROData/HYDROData_StricklerTable.h index f50f4546..de409785 100644 --- a/src/HYDROData/HYDROData_StricklerTable.h +++ b/src/HYDROData/HYDROData_StricklerTable.h @@ -23,9 +23,7 @@ #include -class Handle( TDataStd_NamedData ); - -DEFINE_STANDARD_HANDLE( HYDROData_StricklerTable, HYDROData_Entity ) +class TDataStd_NamedData; class HYDROData_StricklerTable : public HYDROData_Entity { @@ -42,7 +40,7 @@ protected: HYDRODATA_EXPORT ~HYDROData_StricklerTable(); public: - DEFINE_STANDARD_RTTI( HYDROData_StricklerTable ); + DEFINE_STANDARD_RTTIEXT( HYDROData_StricklerTable, HYDROData_Entity ); HYDRODATA_EXPORT virtual const ObjectKind GetKind() const; diff --git a/src/HYDROData/HYDROData_Tool.h b/src/HYDROData/HYDROData_Tool.h index e8fd7967..69afafa6 100644 --- a/src/HYDROData/HYDROData_Tool.h +++ b/src/HYDROData/HYDROData_Tool.h @@ -23,8 +23,8 @@ #include #include -class Handle_HYDROData_Document; -class Handle_HYDROData_Entity; +class HYDROData_Document; +class HYDROData_Entity; class HYDROData_SequenceOfObjects; class MapOfTreatedObjects; class gp_XY; @@ -40,7 +40,6 @@ class TopoDS_Edge; class TopoDS_Face; class TopoDS_Shape; class TopoDS_Wire; -class TopTools_SequenceOfShape; class Quantity_Color; class HYDRODATA_EXPORT HYDROData_Tool { @@ -59,7 +58,7 @@ public: * \param theIsTryToUsePurePrefix if true - the prefix will be returned if the name equal to the prefix is not busy * \return generated name */ - static QString GenerateObjectName( const Handle_HYDROData_Document& theDoc, + static QString GenerateObjectName( const Handle(HYDROData_Document)& theDoc, const QString& thePrefix, const QStringList& theUsedNames = QStringList(), const bool theIsTryToUsePurePrefix = false ); @@ -69,7 +68,7 @@ public: * \param theObject object to check * \return true if object is geometry object */ - static bool IsGeometryObject( const Handle_HYDROData_Entity& theObject ); + static bool IsGeometryObject( const Handle(HYDROData_Entity)& theObject ); /** * \brief Updates the child object name. @@ -79,7 +78,7 @@ public: */ static void UpdateChildObjectName( const QString& theOldStr, const QString& theNewStr, - const Handle_HYDROData_Entity& theObject ); + const Handle(HYDROData_Entity)& theObject ); /** diff --git a/src/HYDROData/HYDROData_TopoCurve.h b/src/HYDROData/HYDROData_TopoCurve.h index e85b7550..5bba3b28 100644 --- a/src/HYDROData/HYDROData_TopoCurve.h +++ b/src/HYDROData/HYDROData_TopoCurve.h @@ -20,7 +20,7 @@ #define HYDRODATA_TOPOCURVE_H #include -#include +#include #include #include #include diff --git a/src/HYDROData/HYDROData_VisualState.cxx b/src/HYDROData/HYDROData_VisualState.cxx index e7d8ff79..48d8ba1e 100644 --- a/src/HYDROData/HYDROData_VisualState.cxx +++ b/src/HYDROData/HYDROData_VisualState.cxx @@ -20,7 +20,6 @@ #include -IMPLEMENT_STANDARD_HANDLE(HYDROData_VisualState, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_VisualState, HYDROData_Entity) HYDROData_VisualState::HYDROData_VisualState() diff --git a/src/HYDROData/HYDROData_VisualState.h b/src/HYDROData/HYDROData_VisualState.h index 49890c1f..ea694a9b 100644 --- a/src/HYDROData/HYDROData_VisualState.h +++ b/src/HYDROData/HYDROData_VisualState.h @@ -21,8 +21,6 @@ #include -DEFINE_STANDARD_HANDLE(HYDROData_VisualState, HYDROData_Entity) - /**\class HYDROData_VisualState * \brief Class that stores/retreives information about the visual state. * @@ -41,7 +39,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_VisualState); + DEFINE_STANDARD_RTTIEXT(HYDROData_VisualState, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROData/HYDROData_Zone.cxx b/src/HYDROData/HYDROData_Zone.cxx index 6f247edd..15dfd3aa 100644 --- a/src/HYDROData/HYDROData_Zone.cxx +++ b/src/HYDROData/HYDROData_Zone.cxx @@ -29,7 +29,6 @@ #define _DEVDEBUG_ #include "HYDRO_trace.hxx" -IMPLEMENT_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity) IMPLEMENT_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity) diff --git a/src/HYDROData/HYDROData_Zone.h b/src/HYDROData/HYDROData_Zone.h index cde3b789..2ed80acc 100644 --- a/src/HYDROData/HYDROData_Zone.h +++ b/src/HYDROData/HYDROData_Zone.h @@ -22,11 +22,9 @@ #include "HYDROData_Entity.h" #include "HYDROData_IInterpolator.h" -class Handle(HYDROData_LandCover); +class HYDROData_LandCover; class TopoDS_Shape; -DEFINE_STANDARD_HANDLE(HYDROData_Zone, HYDROData_Entity) - /**\class HYDROData_Zone * \brief Class that stores/retreives information about the 2d face. @@ -35,7 +33,6 @@ class HYDROData_Zone : public HYDROData_Entity { public: - // Enumeration of mergin types for conflict altitudes/types enum MergeType { @@ -59,7 +56,7 @@ protected: }; public: - DEFINE_STANDARD_RTTI(HYDROData_Zone); + DEFINE_STANDARD_RTTIEXT(HYDROData_Zone, HYDROData_Entity); /** * Returns the kind of this object. Must be redefined in all objects of known type. diff --git a/src/HYDROGUI/CMakeLists.txt b/src/HYDROGUI/CMakeLists.txt index bcb457a4..481b0865 100644 --- a/src/HYDROGUI/CMakeLists.txt +++ b/src/HYDROGUI/CMakeLists.txt @@ -1,6 +1,7 @@ include(../../CMake/Common.cmake) include(../../CMake/UseQT4EXT.cmake) - +INCLUDE(UseQtExt) + set(PROJECT_HEADERS HYDROGUI.h HYDROGUI_AbstractDisplayer.h @@ -145,14 +146,14 @@ set(PROJECT_HEADERS HYDROGUI_TransparencyDlg.h ) -QT4_WRAP_CPP(PROJECT_HEADERS_MOC ${PROJECT_HEADERS}) +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 @@ -160,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 @@ -183,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 @@ -202,12 +203,13 @@ 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 HYDROGUI_Poly3DOp.cxx + HYDROGUI_Polyline.cxx HYDROGUI_PolylineDlg.cxx HYDROGUI_PolylineOp.cxx HYDROGUI_ProfileDlg.cxx @@ -225,26 +227,25 @@ set(PROJECT_SOURCES HYDROGUI_PrsZoneDriver.cxx HYDROGUI_Region.cxx HYDROGUI_RemoveImageRefsOp.cxx - HYDROGUI_Shape.cxx - HYDROGUI_Polyline.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 @@ -256,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 @@ -276,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 diff --git a/src/HYDROGUI/HYDROGUI_AISShape.cxx b/src/HYDROGUI/HYDROGUI_AISShape.cxx index 162e44cd..c6516527 100644 --- a/src/HYDROGUI/HYDROGUI_AISShape.cxx +++ b/src/HYDROGUI/HYDROGUI_AISShape.cxx @@ -22,7 +22,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(HYDROGUI_AISShape, AIS_Shape) IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_AISShape, AIS_Shape) HYDROGUI_AISShape::HYDROGUI_AISShape( const TopoDS_Shape& theShape ) diff --git a/src/HYDROGUI/HYDROGUI_AISShape.h b/src/HYDROGUI/HYDROGUI_AISShape.h index 7353dcb5..91fa4fa2 100644 --- a/src/HYDROGUI/HYDROGUI_AISShape.h +++ b/src/HYDROGUI/HYDROGUI_AISShape.h @@ -22,12 +22,10 @@ #include -DEFINE_STANDARD_HANDLE(HYDROGUI_AISShape, AIS_Shape) - class HYDROGUI_AISShape : public AIS_Shape { public: - DEFINE_STANDARD_RTTI(HYDROGUI_AISShape); + DEFINE_STANDARD_RTTIEXT(HYDROGUI_AISShape, AIS_Shape); HYDROGUI_AISShape( const TopoDS_Shape& ); virtual ~HYDROGUI_AISShape(); diff --git a/src/HYDROGUI/HYDROGUI_AISTrihedron.h b/src/HYDROGUI/HYDROGUI_AISTrihedron.h index b8c13235..8722c508 100644 --- a/src/HYDROGUI/HYDROGUI_AISTrihedron.h +++ b/src/HYDROGUI/HYDROGUI_AISTrihedron.h @@ -31,7 +31,6 @@ * \brief AIS trihedron is redefined in order to show U text on the OX axis * and Z text on the OY axis. */ -DEFINE_STANDARD_HANDLE(HYDROGUI_AISTrihedron, AIS_Trihedron) class HYDROGUI_AISTrihedron : public AIS_Trihedron { @@ -86,9 +85,9 @@ public: * \param theTransformation the transformation * \param thePresentationManager the presentation */ - void Compute( const Handle_Prs3d_Projector& theProjector, - const Handle_Geom_Transformation& theTransformation, - const Handle_Prs3d_Presentation& thePresentation ); + void Compute( const Handle(Prs3d_Projector)& theProjector, + const Handle(Geom_Transformation)& theTransformation, + const Handle(Prs3d_Presentation)& thePresentation ); /** * AIS trihedron compute selection method. It is empty. We do not select the trihedron diff --git a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx index 0af2109b..797e5fca 100644 --- a/src/HYDROGUI/HYDROGUI_CalculationOp.cxx +++ b/src/HYDROGUI/HYDROGUI_CalculationOp.cxx @@ -1313,11 +1313,11 @@ void HYDROGUI_CalculationOp::setAvailableGroups() HYDROData_SequenceOfObjects anObjs = myEditedObject->GetGeometryObjects(); for( int anIndex = 1, aLength = anObjs.Length(); anIndex <= aLength; anIndex++ ) { - Handle_HYDROData_Object anObj = Handle_HYDROData_Object::DownCast( anObjs.Value( anIndex ) ); + Handle(HYDROData_Object) anObj = Handle(HYDROData_Object)::DownCast( anObjs.Value( anIndex ) ); HYDROData_SequenceOfObjects aGroups = anObj->GetGroups(); for( int aGIndex = 1, aGLength = aGroups.Length(); aGIndex <= aGLength; aGIndex++ ) { - Handle_HYDROData_ShapesGroup aGroup = Handle_HYDROData_ShapesGroup::DownCast( aGroups.Value( aGIndex ) ); + Handle(HYDROData_ShapesGroup) aGroup = Handle(HYDROData_ShapesGroup)::DownCast( aGroups.Value( aGIndex ) ); aGroupsNames.append( aGroup->GetName() ); } } diff --git a/src/HYDROGUI/HYDROGUI_DataModel.cxx b/src/HYDROGUI/HYDROGUI_DataModel.cxx index 8968fad7..232475f9 100644 --- a/src/HYDROGUI/HYDROGUI_DataModel.cxx +++ b/src/HYDROGUI/HYDROGUI_DataModel.cxx @@ -270,40 +270,40 @@ void HYDROGUI_DataModel::update( const int theStudyId ) // Create root objects: // IMAGES - LightApp_DataObject* anImageRootObj = createObject( aNewRootObj, tr( partitionName( KIND_IMAGE ).toAscii() ) ); + LightApp_DataObject* anImageRootObj = createObject( aNewRootObj, tr( partitionName( KIND_IMAGE ).toLatin1() ) ); // BATHYMETRY - LightApp_DataObject* aBathymetryRootObj = createObject( aNewRootObj, tr( partitionName( KIND_BATHYMETRY ).toAscii() ) ); + LightApp_DataObject* aBathymetryRootObj = createObject( aNewRootObj, tr( partitionName( KIND_BATHYMETRY ).toLatin1() ) ); // POLYLINES - LightApp_DataObject* aPolylineRootObj = createObject( aNewRootObj, tr( partitionName( KIND_POLYLINEXY ).toAscii() ) ); + LightApp_DataObject* aPolylineRootObj = createObject( aNewRootObj, tr( partitionName( KIND_POLYLINEXY ).toLatin1() ) ); // PROFILES - LightApp_DataObject* aProfileRootObj = createObject( aNewRootObj, tr( partitionName( KIND_PROFILE ).toAscii() ) ); + LightApp_DataObject* aProfileRootObj = createObject( aNewRootObj, tr( partitionName( KIND_PROFILE ).toLatin1() ) ); // POLYLINES 3D - LightApp_DataObject* aPolyline3DRootObj = createObject( aNewRootObj, tr( partitionName( KIND_POLYLINE ).toAscii() ) ); + LightApp_DataObject* aPolyline3DRootObj = createObject( aNewRootObj, tr( partitionName( KIND_POLYLINE ).toLatin1() ) ); // NATURAL OBJECTS - LightApp_DataObject* aNaturalObjectsRootObj = createObject( aNewRootObj, tr( partitionName( KIND_NATURAL_OBJECT ).toAscii() ) ); + LightApp_DataObject* aNaturalObjectsRootObj = createObject( aNewRootObj, tr( partitionName( KIND_NATURAL_OBJECT ).toLatin1() ) ); // ARTIFICIAL OBJECTS - LightApp_DataObject* anArtificialObjectsRootObj = createObject( aNewRootObj, tr( partitionName( KIND_ARTIFICIAL_OBJECT ).toAscii() ) ); + LightApp_DataObject* anArtificialObjectsRootObj = createObject( aNewRootObj, tr( partitionName( KIND_ARTIFICIAL_OBJECT ).toLatin1() ) ); // OBSTACLES - LightApp_DataObject* anObstaclesRootObj = createObject( aNewRootObj, tr( partitionName( KIND_OBSTACLE ).toAscii() ) ); + LightApp_DataObject* anObstaclesRootObj = createObject( aNewRootObj, tr( partitionName( KIND_OBSTACLE ).toLatin1() ) ); // STRICKLER TABLES - LightApp_DataObject* aStricklerTablesRootObj = createObject( aNewRootObj, tr( partitionName( KIND_STRICKLER_TABLE ).toAscii() ) ); + LightApp_DataObject* aStricklerTablesRootObj = createObject( aNewRootObj, tr( partitionName( KIND_STRICKLER_TABLE ).toLatin1() ) ); // LAND COVER MAPS - LightApp_DataObject* aLandCoversRootObj = createObject( aNewRootObj, tr( partitionName( KIND_LAND_COVER_MAP ).toAscii() ) ); + LightApp_DataObject* aLandCoversRootObj = createObject( aNewRootObj, tr( partitionName( KIND_LAND_COVER_MAP ).toLatin1() ) ); // CALCULATION CASES - LightApp_DataObject* aCalculRootObj = createObject( aNewRootObj, tr( partitionName( KIND_CALCULATION ).toAscii() ) ); + LightApp_DataObject* aCalculRootObj = createObject( aNewRootObj, tr( partitionName( KIND_CALCULATION ).toLatin1() ) ); // VISUAL STATES - LightApp_DataObject* aVisualStateRootObj = createObject( aNewRootObj, tr( partitionName( KIND_VISUAL_STATE ).toAscii() ) ); + LightApp_DataObject* aVisualStateRootObj = createObject( aNewRootObj, tr( partitionName( KIND_VISUAL_STATE ).toLatin1() ) ); int aNoStricklerTableObj = 0; HYDROData_Iterator anIterator( aDocument, KIND_UNKNOWN ); @@ -964,10 +964,10 @@ void HYDROGUI_DataModel::buildObjectTree( SUIT_DataObject* theParent, createObject( aPolylineSect, aPolyline, aGuiObj->entry(), false ); LightApp_DataObject* aCaseAOSect = - createObject( aGuiObj, tr( partitionName( KIND_ARTIFICIAL_OBJECT ).toAscii() ), + createObject( aGuiObj, tr( partitionName( KIND_ARTIFICIAL_OBJECT ).toLatin1() ), aGuiObj->entry() ); LightApp_DataObject* aCaseNOSect = - createObject( aGuiObj, tr( partitionName( KIND_NATURAL_OBJECT ).toAscii() ), + createObject( aGuiObj, tr( partitionName( KIND_NATURAL_OBJECT ).toLatin1() ), aGuiObj->entry() ); HYDROData_SequenceOfObjects aSeq = aCaseObj->GetGeometryObjects(); diff --git a/src/HYDROGUI/HYDROGUI_DataObject.cxx b/src/HYDROGUI/HYDROGUI_DataObject.cxx index 8ec9658d..890e29a9 100644 --- a/src/HYDROGUI/HYDROGUI_DataObject.cxx +++ b/src/HYDROGUI/HYDROGUI_DataObject.cxx @@ -161,7 +161,7 @@ QPixmap HYDROGUI_DataObject::icon( const int theId ) const anObjectKind = aFatherObj->GetKind(); } - anIcon = QObject::tr( QString("HYDRO_%1TYPE%2_ICO").arg( aNeedUpdate ).arg( anObjectKind ).toAscii() ); + anIcon = QObject::tr( QString("HYDRO_%1TYPE%2_ICO").arg( aNeedUpdate ).arg( anObjectKind ).toLatin1() ); } return aResMgr->loadPixmap( "HYDRO", anIcon ); diff --git a/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx b/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx index 76cbf0dc..cf1565cf 100644 --- a/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ExportFileOp.cxx @@ -48,9 +48,9 @@ #include #include #include -#include -#include -#include +#include +#include +#include #include #include #include @@ -78,8 +78,8 @@ void HYDROGUI_ExportFileOp::startOperation() Handle(HYDROData_PolylineXY) aPolyXY; Handle(HYDROData_Polyline3D) aPoly3D; - NCollection_Sequence aPolyXYSeq; - NCollection_Sequence aPoly3DSeq; + NCollection_Sequence aPolyXYSeq; + NCollection_Sequence aPoly3DSeq; // HYDROData_SequenceOfObjects aSeq = HYDROGUI_Tool::GetSelectedObjects( module() ); for( int anIndex = 1, aLength = aSeq.Length(); anIndex <= aLength; anIndex++ ) @@ -107,7 +107,7 @@ void HYDROGUI_ExportFileOp::startOperation() { QStringList aNonExpList; HYDROData_ShapeFile anExporter; - Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); if (!aPolyXYSeq.IsEmpty() || !aPolyXYSeq.IsEmpty()) //Export polylines anExporter.Export(aDoc, aFileName, aPolyXYSeq, aPoly3DSeq, aNonExpList); @@ -134,7 +134,7 @@ void HYDROGUI_ExportFileOp::startOperation() QStringList SortedListOfAttr = anAttrNames.toList(); SortedListOfAttr.sort(); // - Handle_HYDROData_LandCoverMap aLCM = Handle(HYDROData_LandCoverMap)::DownCast( aSeq(1) ); + Handle(HYDROData_LandCoverMap) aLCM = Handle(HYDROData_LandCoverMap)::DownCast( aSeq(1) ); bool IsLinear = aLCM->CheckLinear(); HYDROGUI_ExportLandCoverMapDlg aDlg( module()->getApp()->desktop(), IsLinear, SortedListOfAttr); if ( aDlg.exec() == HYDROGUI_ExportLandCoverMapDlg::Accepted ) diff --git a/src/HYDROGUI/HYDROGUI_ImagePrs.cxx b/src/HYDROGUI/HYDROGUI_ImagePrs.cxx index d9c0076a..1a4b2bb9 100644 --- a/src/HYDROGUI/HYDROGUI_ImagePrs.cxx +++ b/src/HYDROGUI/HYDROGUI_ImagePrs.cxx @@ -33,21 +33,10 @@ #include -IMPLEMENT_STANDARD_TYPE(HYDROGUI_ImagePrs) - IMPLEMENT_STANDARD_SUPERTYPE_ARRAY() - STANDARD_TYPE(AIS_InteractiveObject), - STANDARD_TYPE(SelectMgr_SelectableObject), - STANDARD_TYPE(PrsMgr_PresentableObject), - STANDARD_TYPE(MMgt_TShared), - STANDARD_TYPE(Standard_Transient), - IMPLEMENT_STANDARD_SUPERTYPE_ARRAY_END() - IMPLEMENT_STANDARD_TYPE_END(HYDROGUI_ImagePrs) - - IMPLEMENT_DOWNCAST(HYDROGUI_ImagePrs,Standard_Transient) - IMPLEMENT_STANDARD_RTTI(HYDROGUI_ImagePrs) - - HYDROGUI_ImagePrs::HYDROGUI_ImagePrs() - : AIS_InteractiveObject() +IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_ImagePrs, AIS_InteractiveObject) + +HYDROGUI_ImagePrs::HYDROGUI_ImagePrs() + : AIS_InteractiveObject() { } diff --git a/src/HYDROGUI/HYDROGUI_ImagePrs.h b/src/HYDROGUI/HYDROGUI_ImagePrs.h index d74a9a79..63968caf 100644 --- a/src/HYDROGUI/HYDROGUI_ImagePrs.h +++ b/src/HYDROGUI/HYDROGUI_ImagePrs.h @@ -28,8 +28,6 @@ class Font_FTFont; class HYDROGUI_ImagePrs; -DEFINE_STANDARD_HANDLE(HYDROGUI_ImagePrs, AIS_InteractiveObject) - class HYDROGUI_ImagePrs : public AIS_InteractiveObject { public: @@ -47,7 +45,7 @@ public: const Handle(Prs3d_Presentation)&, const Standard_Integer = 0 ); virtual void ComputeSelection( const Handle(SelectMgr_Selection)&, const Standard_Integer ); - DEFINE_STANDARD_RTTI(HYDROGUI_ImagePrs) + DEFINE_STANDARD_RTTIEXT(HYDROGUI_ImagePrs, AIS_InteractiveObject) private: gp_Pnt convert( const QPointF& ) const; diff --git a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx index a2d3a09b..deba3d6c 100644 --- a/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportLandCoverMapOp.cxx @@ -262,7 +262,7 @@ bool HYDROGUI_ImportLandCoverMapOp::processApply( int& theUpdateFlags, if ( !aPanel->getFileName().isEmpty() ) anObjName = aPanel->getObjectName(); - Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); //check if name of LCM is already exists QSet aNameList; @@ -408,7 +408,7 @@ void HYDROGUI_ImportLandCoverMapOp::onNext( const int theIndex ) //Collect all strickler_types QSet aSTSet; - Handle_HYDROData_Document aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); + Handle(HYDROData_Document) aDoc = HYDROData_Document::Document( application()->activeStudy()->id() ); Handle(HYDROData_StricklerTable) DefStricklerTableObj; if ( aDoc ) { diff --git a/src/HYDROGUI/HYDROGUI_ImportPolylineOp.h b/src/HYDROGUI/HYDROGUI_ImportPolylineOp.h index 9bd684a9..23cb0b87 100644 --- a/src/HYDROGUI/HYDROGUI_ImportPolylineOp.h +++ b/src/HYDROGUI/HYDROGUI_ImportPolylineOp.h @@ -25,7 +25,7 @@ #include class SUIT_FileDlg; -class Handle_HYDROData_Entity; +class HYDROData_Entity; class HYDROGUI_ImportPolylineOp : public HYDROGUI_Operation { @@ -38,7 +38,7 @@ public: protected: virtual void startOperation(); virtual void onApply(); - void UpdateView( NCollection_Sequence& anEntities); + void UpdateView( NCollection_Sequence& anEntities); private: SUIT_FileDlg* myFileDlg; diff --git a/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx b/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx index 4f30e802..0d3f217a 100644 --- a/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx +++ b/src/HYDROGUI/HYDROGUI_ImportSinusXOp.cxx @@ -91,7 +91,7 @@ void HYDROGUI_ImportSinusXOp::onApply() if (anExt == "sx") { HYDROData_SinusX aSinusXImporter; - NCollection_Sequence anEntities; + NCollection_Sequence anEntities; if (aSinusXImporter.Import(aFileName, doc(), anEntities)) { UpdateView(anEntities); @@ -112,7 +112,7 @@ void HYDROGUI_ImportSinusXOp::onApply() QApplication::restoreOverrideCursor(); } -void HYDROGUI_ImportSinusXOp::UpdateView( NCollection_Sequence& anEntities) +void HYDROGUI_ImportSinusXOp::UpdateView( NCollection_Sequence& anEntities) { size_t anActiveViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() ); if ( anActiveViewId == 0 ) diff --git a/src/HYDROGUI/HYDROGUI_ImportSinusXOp.h b/src/HYDROGUI/HYDROGUI_ImportSinusXOp.h index 738d25e4..36665cae 100644 --- a/src/HYDROGUI/HYDROGUI_ImportSinusXOp.h +++ b/src/HYDROGUI/HYDROGUI_ImportSinusXOp.h @@ -23,7 +23,7 @@ #include class SUIT_FileDlg; -class Handle_HYDROData_Entity; +class HYDROData_Entity; class HYDROGUI_ImportSinusXOp : public HYDROGUI_Operation { @@ -36,7 +36,7 @@ public: protected: virtual void startOperation(); virtual void onApply(); - void UpdateView( NCollection_Sequence& anEntities); + void UpdateView( NCollection_Sequence& anEntities); private: SUIT_FileDlg* myFileDlg; }; diff --git a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.h b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.h index dabe4526..acabf5aa 100644 --- a/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.h +++ b/src/HYDROGUI/HYDROGUI_LandCoverMapPrs.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include DEFINE_STANDARD_HANDLE( HYDROGUI_LandCoverMapPrs, AIS_ColoredShape ) diff --git a/src/HYDROGUI/HYDROGUI_Module.h b/src/HYDROGUI/HYDROGUI_Module.h index 8780c389..2e62e508 100644 --- a/src/HYDROGUI/HYDROGUI_Module.h +++ b/src/HYDROGUI/HYDROGUI_Module.h @@ -41,7 +41,7 @@ class SVTK_Viewer; class SUIT_ViewWindow; class SUIT_ViewManager; -class Handle(HYDROData_StricklerTable); +class HYDROData_StricklerTable; class HYDROGUI_DataModel; class HYDROGUI_Displayer; diff --git a/src/HYDROGUI/HYDROGUI_OCCDisplayer.h b/src/HYDROGUI/HYDROGUI_OCCDisplayer.h index b454518d..968e051e 100644 --- a/src/HYDROGUI/HYDROGUI_OCCDisplayer.h +++ b/src/HYDROGUI/HYDROGUI_OCCDisplayer.h @@ -22,7 +22,7 @@ #include "HYDROGUI_AbstractDisplayer.h" class HYDROGUI_Shape; -class Handle(AIS_InteractiveContext); +class AIS_InteractiveContext; class OCCViewer_ViewManager; class OCCViewer_Viewer; diff --git a/src/HYDROGUI/HYDROGUI_OCCSelector.h b/src/HYDROGUI/HYDROGUI_OCCSelector.h index 093f0b3b..4f717c92 100644 --- a/src/HYDROGUI/HYDROGUI_OCCSelector.h +++ b/src/HYDROGUI/HYDROGUI_OCCSelector.h @@ -23,7 +23,7 @@ class HYDROGUI_Module; class OCCViewer_Viewer; -class Handle_AIS_InteractiveObject; +class AIS_InteractiveObject; class HYDROGUI_OCCSelector : public LightApp_OCCSelector { @@ -39,7 +39,7 @@ protected: virtual void getSelection( SUIT_DataOwnerPtrList& ) const; virtual void setSelection( const SUIT_DataOwnerPtrList& ); - virtual QString entry( const Handle_AIS_InteractiveObject& ) const; + virtual QString entry( const Handle(AIS_InteractiveObject)& ) const; private: HYDROGUI_Module* myModule; diff --git a/src/HYDROGUI/HYDROGUI_Operation.cxx b/src/HYDROGUI/HYDROGUI_Operation.cxx index 916a5a68..30caab31 100644 --- a/src/HYDROGUI/HYDROGUI_Operation.cxx +++ b/src/HYDROGUI/HYDROGUI_Operation.cxx @@ -390,7 +390,7 @@ void HYDROGUI_Operation::commitDocOperation() } } -Handle_HYDROData_Document HYDROGUI_Operation::doc() const +Handle(HYDROData_Document) HYDROGUI_Operation::doc() const { return HYDROData_Document::Document( myModule->getStudyId() ); } diff --git a/src/HYDROGUI/HYDROGUI_Operation.h b/src/HYDROGUI/HYDROGUI_Operation.h index b3b3d7bc..11e38511 100644 --- a/src/HYDROGUI/HYDROGUI_Operation.h +++ b/src/HYDROGUI/HYDROGUI_Operation.h @@ -20,7 +20,7 @@ #define HYDROGUI_OPERATION_H #include - +#include #include class HYDROGUI_Module; @@ -30,8 +30,8 @@ class HYDROGUI_Shape; class SUIT_SelectionMgr; class OCCViewer_ViewManager; -class Handle_HYDROData_Document; -class Handle_HYDROData_Object; +class HYDROData_Document; +class HYDROData_Object; class HYDROGUI_Operation : public LightApp_Operation { @@ -77,7 +77,7 @@ protected: void abortDocOperation(); void commitDocOperation(); - Handle_HYDROData_Document doc() const; + Handle(HYDROData_Document) doc() const; virtual bool isToAbortOnApply() const { return true; } diff --git a/src/HYDROGUI/HYDROGUI_Polyline.cxx b/src/HYDROGUI/HYDROGUI_Polyline.cxx index 532c6071..6091415e 100644 --- a/src/HYDROGUI/HYDROGUI_Polyline.cxx +++ b/src/HYDROGUI/HYDROGUI_Polyline.cxx @@ -41,7 +41,6 @@ #include #include -IMPLEMENT_STANDARD_HANDLE (HYDROGUI_Polyline, AIS_Shape) IMPLEMENT_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape) diff --git a/src/HYDROGUI/HYDROGUI_Polyline.h b/src/HYDROGUI/HYDROGUI_Polyline.h index 45e79dba..7b70a15f 100644 --- a/src/HYDROGUI/HYDROGUI_Polyline.h +++ b/src/HYDROGUI/HYDROGUI_Polyline.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include @@ -43,9 +43,7 @@ public: const Standard_Integer aMode = 0); public: - DEFINE_STANDARD_RTTI(HYDROGUI_Polyline); + DEFINE_STANDARD_RTTIEXT(HYDROGUI_Polyline, AIS_Shape); }; -DEFINE_STANDARD_HANDLE(HYDROGUI_Polyline, AIS_Shape) - #endif diff --git a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx index fd8158e5..cd9e9134 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx +++ b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.cxx @@ -63,7 +63,7 @@ Handle_AIS_InteractiveObject HYDROGUI_ShapeBathymetry::createShape() const Handle_HYDROData_Bathymetry aBath = Handle_HYDROData_Bathymetry::DownCast( getObject() ); if( !aBath.IsNull() ) { - Handle_AIS_PointCloud aPntCloud = new HYDROGUI_BathymetryPrs(); + Handle(AIS_PointCloud) aPntCloud = new HYDROGUI_BathymetryPrs(); aPntCloud->SetHilightMode( AIS_PointCloud::DM_BndBox ); aPntCloud->Attributes()->SetPointAspect (new Prs3d_PointAspect (Aspect_TOM_POINT, Quantity_NOC_WHITE, 2.0)); diff --git a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h index 25211195..f71e4336 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h +++ b/src/HYDROGUI/HYDROGUI_ShapeBathymetry.h @@ -23,8 +23,8 @@ #include #include -class Handle_HYDROData_Bathymetry; -class Handle_Aspect_ColorScale; +class HYDROData_Bathymetry; +class Aspect_ColorScale; class HYDROGUI_OCCDisplayer; class HYDROGUI_ShapeBathymetry : public HYDROGUI_Shape @@ -32,12 +32,12 @@ class HYDROGUI_ShapeBathymetry : public HYDROGUI_Shape public: HYDROGUI_ShapeBathymetry( HYDROGUI_OCCDisplayer* theDisplayer, const Handle(AIS_InteractiveContext)& theContext, - const Handle_HYDROData_Bathymetry& theBathymetry, + const Handle(HYDROData_Bathymetry)& theBathymetry, const int theZLayer = -1 ); virtual ~HYDROGUI_ShapeBathymetry(); void GetRange( double& theMin, double& theMax ) const; - void UpdateWithColorScale( const Handle_Aspect_ColorScale& ); + void UpdateWithColorScale( const Handle(Aspect_ColorScale)& ); virtual void display( const bool theIsUpdateViewer = true ); virtual void erase( const bool theIsUpdateViewer = true ); @@ -48,13 +48,13 @@ public: virtual void setVisible( const bool theState, const bool theIsUpdateViewer = true ); protected: - virtual Handle_AIS_InteractiveObject createShape() const; + virtual Handle(AIS_InteractiveObject) createShape() const; virtual void displayShape( const bool theIsUpdateViewer ); private: HYDROGUI_OCCDisplayer* myDisplayer; - Handle_TColgp_HArray1OfPnt myCoords; - Handle_Quantity_HArray1OfColor myColors; + Handle(TColgp_HArray1OfPnt) myCoords; + Handle(Quantity_HArray1OfColor) myColors; }; #endif diff --git a/src/HYDROGUI/HYDROGUI_ShapeImage.cxx b/src/HYDROGUI/HYDROGUI_ShapeImage.cxx index 3d519965..e9ecc0c5 100644 --- a/src/HYDROGUI/HYDROGUI_ShapeImage.cxx +++ b/src/HYDROGUI/HYDROGUI_ShapeImage.cxx @@ -27,7 +27,7 @@ #include HYDROGUI_ShapeImage::HYDROGUI_ShapeImage( const Handle(AIS_InteractiveContext)& theContext, - const Handle_HYDROData_Image& theImage, + const Handle(HYDROData_Image)& theImage, const int theZLayer ) : HYDROGUI_Shape( theContext, theImage, theZLayer ) { diff --git a/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h b/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h index 6801b55d..11704db4 100644 --- a/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h +++ b/src/HYDROGUI/HYDROGUI_StricklerTableDlg.h @@ -21,8 +21,9 @@ #include "HYDROGUI_InputPanel.h" #include +#include -class Handle_HYDROData_StricklerTable; +class HYDROData_StricklerTable; class QGroupBox; class QLineEdit; @@ -52,8 +53,8 @@ public: bool isTableNameReadOnly() const; void setTableNameReadOnly( bool ); - void getGuiData( Handle_HYDROData_StricklerTable& theTable ) const; - void setGuiData( const Handle_HYDROData_StricklerTable& theTable ); + void getGuiData( Handle(HYDROData_StricklerTable)& theTable ) const; + void setGuiData( const Handle(HYDROData_StricklerTable)& theTable ); protected: void updateControls(); diff --git a/src/HYDROGUI/HYDROGUI_Tool.h b/src/HYDROGUI/HYDROGUI_Tool.h index 99aa175c..90756880 100644 --- a/src/HYDROGUI/HYDROGUI_Tool.h +++ b/src/HYDROGUI/HYDROGUI_Tool.h @@ -23,10 +23,10 @@ #include class TCollection_AsciiString; -class Handle_HYDROData_Document; -class Handle_Image_PixMap; -class Handle_TCollection_HAsciiString; -class Handle_TCollection_HExtendedString; +class HYDROData_Document; +class Image_PixMap; +class TCollection_HAsciiString; +class TCollection_HExtendedString; class QDockWidget; class QImage; class QWidget; @@ -35,8 +35,8 @@ namespace HYDROGUI_Tool { QString ToQString( const TCollection_AsciiString& ); QString ToQString( const TCollection_ExtendedString& ); - QString ToQString( const Handle_TCollection_HAsciiString& ); - QString ToQString( const Handle_TCollection_HExtendedString& ); + QString ToQString( const Handle(TCollection_HAsciiString)& ); + QString ToQString( const Handle(TCollection_HExtendedString)& ); TCollection_AsciiString ToAsciiString( const QString& ); TCollection_ExtendedString ToExtString( const QString& ); Handle(TCollection_HAsciiString) ToHAsciiString( const QString& ); @@ -46,19 +46,19 @@ namespace HYDROGUI_Tool QDockWidget* WindowDock( QWidget* wid ); - QStringList FindExistingObjectsNames( const Handle_HYDROData_Document& theDoc, + QStringList FindExistingObjectsNames( const Handle(HYDROData_Document)& theDoc, const ObjectKind theObjectKind, bool isCheckValidProfile = false ); QString GetCoordinateString( const double theNumber, bool isInLocale ); - Handle_Image_PixMap Pixmap( const QImage& theImage ); + Handle(Image_PixMap) Pixmap( const QImage& theImage ); void GetObjectReferences( const Handle(HYDROData_Entity)& theObj, HYDROData_SequenceOfObjects& theRefObjects, QStringList& theRefNames ); HYDROData_SequenceOfObjects GetObjectBackReferences( const Handle(HYDROData_Entity)& theObj ); QMap GetObjectsBackReferences - ( const Handle_HYDROData_Document& theDocument, const QStringList& theObjectNames ); + ( const Handle(HYDROData_Document)& theDocument, const QStringList& theObjectNames ); }; #endif diff --git a/src/HYDROGUI/HYDROGUI_Tool2.h b/src/HYDROGUI/HYDROGUI_Tool2.h index e39bc3f6..980372ac 100644 --- a/src/HYDROGUI/HYDROGUI_Tool2.h +++ b/src/HYDROGUI/HYDROGUI_Tool2.h @@ -33,7 +33,7 @@ class HYDROGUI_Prs; class SUIT_ViewManager; class GraphicsView_ViewPort; class OCCViewer_ViewFrame; -class Handle_HYDROData_Document; +class HYDROData_Document; namespace HYDROGUI_Tool { @@ -52,7 +52,7 @@ namespace HYDROGUI_Tool HYDROData_SequenceOfObjects GetSelectedObjects( HYDROGUI_Module* theModule ); - bool IsObjectHasPresentation( const Handle_HYDROData_Entity& theObject, + bool IsObjectHasPresentation( const Handle(HYDROData_Entity)& theObject, const QString& theViewerType = "" ); Handle(HYDROData_Entity) GetSelectedObject( HYDROGUI_Module* theModule ); @@ -95,7 +95,7 @@ namespace HYDROGUI_Tool QColor GenerateFillingColor( HYDROGUI_Module* theModule, const QStringList& theZoneNames ); - QColor GenerateFillingColor( const Handle_HYDROData_Document& theDoc, + QColor GenerateFillingColor( const Handle(HYDROData_Document)& theDoc, const QStringList& theZoneNames ); QStringList GetSelectedGeomObjects( HYDROGUI_Module* theModule, diff --git a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h index 4e8b5ba0..70f1157f 100644 --- a/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h +++ b/src/HYDROGUI/HYDROGUI_UpdateObjectOp.h @@ -23,7 +23,7 @@ #include -class Handle_HYDROData_Entity; +class HYDROData_Entity; class HYDROGUI_UpdateObjectOp : public HYDROGUI_Operation { @@ -38,7 +38,7 @@ protected: virtual void startOperation(); - virtual void updateObject( const Handle_HYDROData_Entity& theObject, + virtual void updateObject( const Handle(HYDROData_Entity)& theObject, NCollection_Map& theMapOfTreated ) const; private: diff --git a/src/HYDROGUI/HYDROGUI_VTKPrs.cxx b/src/HYDROGUI/HYDROGUI_VTKPrs.cxx index c16dbb01..925f013c 100644 --- a/src/HYDROGUI/HYDROGUI_VTKPrs.cxx +++ b/src/HYDROGUI/HYDROGUI_VTKPrs.cxx @@ -34,7 +34,7 @@ HYDROGUI_VTKPrs::HYDROGUI_VTKPrs( const Handle(HYDROData_Entity)& theObject ) // Define IO for actors to be added: QString anEntry = HYDROGUI_DataObject::dataObjectEntry( theObject ); myIO = new SALOME_InteractiveObject( - anEntry.toAscii(), QString::number( theObject->GetKind() ).toAscii(), theObject->GetName().toAscii() ); + anEntry.toLatin1(), QString::number( theObject->GetKind() ).toLatin1(), theObject->GetName().toLatin1() ); myZRange[0] = HYDROData_IAltitudeObject::GetInvalidAltitude(); myZRange[1] = HYDROData_IAltitudeObject::GetInvalidAltitude(); } diff --git a/src/HYDROGUI/HYDROGUI_ZLayers.h b/src/HYDROGUI/HYDROGUI_ZLayers.h index 3fd3fd47..1b3069d9 100644 --- a/src/HYDROGUI/HYDROGUI_ZLayers.h +++ b/src/HYDROGUI/HYDROGUI_ZLayers.h @@ -22,16 +22,16 @@ #include #include -class Handle_PrsMgr_PresentableObject; -class Handle_AIS_InteractiveContext; +class PrsMgr_PresentableObject; +class AIS_InteractiveContext; class HYDROGUI_ZLayersIterator { public: - HYDROGUI_ZLayersIterator( const Handle_V3d_Viewer& ); + HYDROGUI_ZLayersIterator( const Handle(V3d_Viewer)& ); ~HYDROGUI_ZLayersIterator(); - void Init( const Handle_V3d_Viewer& ); + void Init( const Handle(V3d_Viewer)& ); bool More() const; void Next(); int LayerId() const; @@ -41,13 +41,13 @@ private: std::vector myZLayers; int myIndex; int myNewZLayer; - Handle_V3d_Viewer myViewer; + Handle(V3d_Viewer) myViewer; }; -void SetPrsZLayer( const Handle_PrsMgr_PresentableObject& thePresentableObject, +void SetPrsZLayer( const Handle(PrsMgr_PresentableObject)& thePresentableObject, const int theMode, const int theLayerId ); -void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle_AIS_InteractiveContext&, int theLayer ); -void SetZLayerSettings( const Handle_V3d_Viewer&, int theLayerId, bool theIsOrdered ); -int CreateTopZLayer( const Handle_V3d_Viewer& ); +void UpdateZLayersOfHilightPresentationsOfDisplayedObjects( const Handle(AIS_InteractiveContext)&, int theLayer ); +void SetZLayerSettings( const Handle(V3d_Viewer)&, int theLayerId, bool theIsOrdered ); +int CreateTopZLayer( const Handle(V3d_Viewer)& ); #endif diff --git a/src/HYDROPy/CMakeLists.txt b/src/HYDROPy/CMakeLists.txt index c15ed61c..60640097 100644 --- a/src/HYDROPy/CMakeLists.txt +++ b/src/HYDROPy/CMakeLists.txt @@ -1,5 +1,5 @@ include(../../CMake/Common.cmake) -include(UsePyQt4) +INCLUDE(UsePyQt) # --- options --- @@ -87,7 +87,7 @@ SET(_add_SOURCES # --- sources --- # sources / sip wrappings -PYQT4_WRAP_SIP(_sip_SOURCES ${_sip_files} SOURCES ${_add_SOURCES}) +PYQT_WRAP_SIP(_sip_SOURCES ${_sip_files} SOURCES ${_add_SOURCES}) # sources / to compile SET(HYDROPy_SOURCES ${_sip_SOURCES}) diff --git a/src/HYDRO_tests/CMakeLists.txt b/src/HYDRO_tests/CMakeLists.txt index 1e95d072..4eb4bde3 100644 --- a/src/HYDRO_tests/CMakeLists.txt +++ b/src/HYDRO_tests/CMakeLists.txt @@ -62,7 +62,7 @@ ENDIF() SET( CPPUNIT_INCLUDES $ENV{cppUNIT_ROOT}/include ) SET( CAS_INCLUDES $ENV{CASROOT}/inc ) -SET( QT_INCLUDES $ENV{QTDIR}/include $ENV{QTDIR}/include/QtCore $ENV{QTDIR}/include/QtGui $ENV{QTDIR}/include/QtTest ) +SET( QT_INCLUDES $ENV{QT5_ROOT_DIR}/include $ENV{QT5_ROOT_DIR}/include/QtCore $ENV{QT5_ROOT_DIR}/include/QtGui $ENV{QT5_ROOT_DIR}/include/QtTest ) SET( KERNEL_INCLUDES $ENV{KERNEL_ROOT_DIR}/include/salome ) SET( GUI_INCLUDES $ENV{GUI_ROOT_DIR}/include/salome ) SET( GEOM_INCLUDES $ENV{GEOM_ROOT_DIR}/include/salome ) @@ -74,7 +74,7 @@ ELSE() ENDIF() SET( CAS_LIBRARIES TKernel TKLCAF TKCAF TKCDF TKMath TKG2d TKG3d TKBRep TKGeomBase TKTopAlgo TKGeomAlgo TKBool TKShHealing TKXSBase TKOffset TKHLR TKBO TKV3d TKService TKMesh ) -link_directories( $ENV{QTDIR}/lib ) +link_directories( $ENV{QT5_ROOT_DIR}/lib ) IF( ${WIN32} ) SET( QT_LIBRARIES QtCored4 QtGuid4 QtTestd4 ) ELSE() diff --git a/src/HYDRO_tests/ExternalFiles.cmake b/src/HYDRO_tests/ExternalFiles.cmake index df610ea5..79f07699 100644 --- a/src/HYDRO_tests/ExternalFiles.cmake +++ b/src/HYDRO_tests/ExternalFiles.cmake @@ -1,5 +1,6 @@ -find_package(Qt4 4.8.4 REQUIRED QtCore QtGui ) +find_package( Qt5Core ) +find_package( Qt5Widgets ) set( EXTERNAL_FILES ../HYDROData/HYDROData_AltitudeObject.cxx @@ -73,4 +74,4 @@ set( MOC_HEADERS ../HYDROGUI/HYDROGUI_StricklerTableDlg.h ) -QT4_WRAP_CPP( PROJECT_MOC_HEADERS ${MOC_HEADERS} ) +QT_WRAP_MOC( PROJECT_MOC_HEADERS ${MOC_HEADERS} ) diff --git a/src/HYDRO_tests/TestViewer.h b/src/HYDRO_tests/TestViewer.h index 9030f33b..fbcd7da2 100644 --- a/src/HYDRO_tests/TestViewer.h +++ b/src/HYDRO_tests/TestViewer.h @@ -24,9 +24,9 @@ class OCCViewer_ViewWindow; class TopoDS_Shape; class QString; class QColor; -class Handle_AIS_InteractiveContext; -class Handle_AIS_InteractiveObject; -class Handle_Aspect_ColorScale; +class AIS_InteractiveContext; +class AIS_InteractiveObject; +class Aspect_ColorScale; class TestViewer { @@ -34,17 +34,17 @@ public: static OCCViewer_ViewManager* viewManager(); static OCCViewer_Viewer* viewer(); static OCCViewer_ViewWindow* viewWindow(); - static Handle_AIS_InteractiveContext context(); + static Handle(AIS_InteractiveContext) context(); static void eraseAll( bool isUpdate ); - static void show( const Handle_AIS_InteractiveObject& theObject, + static void show( const Handle(AIS_InteractiveObject)& theObject, int theMode, int theSelectionMode, bool isFitAll, const char* theKey ); static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const QColor& theColor ); static void show( const TopoDS_Shape& theShape, int theMode, bool isFitAll, const char* theKey ); static bool AssertImages( QString& theMessage ); static QColor GetColor(int i); - static Handle_Aspect_ColorScale colorScale(); + static Handle(Aspect_ColorScale) colorScale(); static void showColorScale( bool ); static void select( int theViewX, int theViewY );