From: mpa Date: Wed, 24 Feb 2016 13:42:06 +0000 (+0300) Subject: Migration to OCCT 7.0 X-Git-Tag: V8_1_0a1~17 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fc676e994a081937f71d310aeef85f9a301c0125;p=modules%2Fgui.git Migration to OCCT 7.0 --- diff --git a/src/CAF/CAF_Operation.h b/src/CAF/CAF_Operation.h index 9dbbbdc07..4ba0a31c4 100755 --- a/src/CAF/CAF_Operation.h +++ b/src/CAF/CAF_Operation.h @@ -28,9 +28,9 @@ #include "SUIT_Operation.h" #include +#include class CAF_Study; -class Handle(TDocStd_Document); class CAF_EXPORT CAF_Operation : public SUIT_Operation { diff --git a/src/CAF/CAF_Study.cxx b/src/CAF/CAF_Study.cxx index ab35820e0..15f6185ee 100755 --- a/src/CAF/CAF_Study.cxx +++ b/src/CAF/CAF_Study.cxx @@ -33,7 +33,6 @@ #include #include -#include #include #include diff --git a/src/CAF/CAF_Study.h b/src/CAF/CAF_Study.h index c80972b49..40e57995c 100755 --- a/src/CAF/CAF_Study.h +++ b/src/CAF/CAF_Study.h @@ -28,9 +28,9 @@ #include "SUIT_Study.h" #include +#include class CAF_Application; -class Handle(TDocStd_Application); #if defined WIN32 #pragma warning ( disable: 4251 ) diff --git a/src/CASCatch/CASCatch_Failure.cxx b/src/CASCatch/CASCatch_Failure.cxx index 37a3735a6..ecdaf950c 100644 --- a/src/CASCatch/CASCatch_Failure.cxx +++ b/src/CASCatch/CASCatch_Failure.cxx @@ -29,9 +29,7 @@ #include #include -IMPLEMENT_STANDARD_HANDLE( CASCatch_Failure, Standard_Transient ) -IMPLEMENT_STANDARD_RTTIEXT( CASCatch_Failure, Standard_Transient ) - +OCCT_IMPLEMENT_STANDARD_RTTIEXT( CASCatch_Failure, Standard_Transient ) #ifndef NO_CXX_EXCEPTION static Handle(CASCatch_Failure) RaisedError; diff --git a/src/CASCatch/CASCatch_Failure.hxx b/src/CASCatch/CASCatch_Failure.hxx index 51cd42927..27c1f6ea6 100644 --- a/src/CASCatch/CASCatch_Failure.hxx +++ b/src/CASCatch/CASCatch_Failure.hxx @@ -26,6 +26,8 @@ #ifndef CASCATCH_FAILURE_HXX #define CASCATCH_FAILURE_HXX +#include + #include #include DEFINE_STANDARD_HANDLE( CASCatch_Failure, Standard_Transient ) @@ -46,13 +48,13 @@ Standard_EXPORT CASCatch_Failure(); Standard_EXPORT CASCatch_Failure(const Standard_CString aString); Standard_EXPORT void Reraise(const Standard_CString aMessage) ; Standard_EXPORT Standard_CString GetError() const; -Standard_EXPORT static Handle_CASCatch_Failure Caught() ; +Standard_EXPORT static Handle(CASCatch_Failure) Caught() ; Standard_EXPORT static void Raise(const Standard_CString aMessage = "") ; Standard_EXPORT virtual void Throw() const;public: public: -DEFINE_STANDARD_RTTI( CASCatch_Failure ) + OCCT_DEFINE_STANDARD_RTTIEXT(CASCatch_Failure,Standard_Transient) private: /*!\var myMessage diff --git a/src/DDS/DDS.h b/src/DDS/DDS.h index 8d60969de..f2a03e931 100644 --- a/src/DDS/DDS.h +++ b/src/DDS/DDS.h @@ -23,6 +23,8 @@ #ifndef DDS_H #define DDS_H +#include + #include #include diff --git a/src/DDS/DDS_DicGroup.cxx b/src/DDS/DDS_DicGroup.cxx index 18fdfdf5c..ed5d18e5b 100644 --- a/src/DDS/DDS_DicGroup.cxx +++ b/src/DDS/DDS_DicGroup.cxx @@ -32,8 +32,7 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(DDS_DicGroup, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(DDS_DicGroup, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(DDS_DicGroup, MMgt_TShared) /*! \class DDS_DicGroup @@ -208,7 +207,7 @@ void DDS_DicGroup::FillDataMap( const LDOM_Element& theComponentData, const LDOM \param theID item identifier \return dictionary item */ -Handle_DDS_DicItem DDS_DicGroup::GetDicItem( const TCollection_AsciiString& theID ) const +Handle(DDS_DicItem) DDS_DicGroup::GetDicItem( const TCollection_AsciiString& theID ) const { Handle(DDS_DicItem) aDicItem; // get dictionary item by id diff --git a/src/DDS/DDS_DicGroup.h b/src/DDS/DDS_DicGroup.h index 9a3ed9070..debefdbe6 100644 --- a/src/DDS/DDS_DicGroup.h +++ b/src/DDS/DDS_DicGroup.h @@ -89,7 +89,7 @@ private: friend class DDS_Dictionary; public: - DEFINE_STANDARD_RTTI(DDS_DicGroup) + OCCT_DEFINE_STANDARD_RTTIEXT(DDS_DicGroup,MMgt_TShared) }; typedef NCollection_IndexedDataMap DDS_IndexedDataMapOfDicGroups; diff --git a/src/DDS/DDS_DicItem.cxx b/src/DDS/DDS_DicItem.cxx index 8679b4666..2ff1d1c37 100644 --- a/src/DDS/DDS_DicItem.cxx +++ b/src/DDS/DDS_DicItem.cxx @@ -23,9 +23,6 @@ #include "DDS_DicItem.h" #include "DDS_Dictionary.h" -#include -#include - #include #include #include @@ -33,11 +30,7 @@ #include #include -#include -#include - -IMPLEMENT_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(DDS_DicItem, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(DDS_DicItem, MMgt_TShared) /*! \class DDS_DicItem diff --git a/src/DDS/DDS_DicItem.h b/src/DDS/DDS_DicItem.h index 97091efb6..d3f01a517 100644 --- a/src/DDS/DDS_DicItem.h +++ b/src/DDS/DDS_DicItem.h @@ -35,12 +35,13 @@ #include #include +#include +#include +#include +#include + class LDOM_Element; class DDS_Dictionary; -class TColStd_MapOfReal; -class TColStd_SequenceOfInteger; -class TColStd_SequenceOfAsciiString; -class TColStd_SequenceOfExtendedString; // Class, containing all information about one parameter: // unique : id @@ -252,8 +253,7 @@ private: friend class DDS_DicGroup; public: - // Declaration of CASCADE RTTI - DEFINE_STANDARD_RTTI(DDS_DicItem) + OCCT_DEFINE_STANDARD_RTTIEXT(DDS_DicItem,MMgt_TShared) }; DEFINE_STANDARD_HANDLE(DDS_DicItem, MMgt_TShared) diff --git a/src/DDS/DDS_Dictionary.cxx b/src/DDS/DDS_Dictionary.cxx index 6c9c541e6..b26dc1e6d 100644 --- a/src/DDS/DDS_Dictionary.cxx +++ b/src/DDS/DDS_Dictionary.cxx @@ -38,8 +38,7 @@ #include #include -IMPLEMENT_STANDARD_HANDLE(DDS_Dictionary, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(DDS_Dictionary, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(DDS_Dictionary, MMgt_TShared) Handle(DDS_Dictionary) DDS_Dictionary::myDictionary = Handle(DDS_Dictionary)(); @@ -423,7 +422,7 @@ void DDS_Dictionary::SetActiveUnitSystem( const TCollection_AsciiString& theSyst \brief Get the only instance of the data dictionary. \return the only instance of the data dictionary */ -Handle_DDS_Dictionary DDS_Dictionary::Get() +Handle(DDS_Dictionary) DDS_Dictionary::Get() { if ( myDictionary.IsNull() ) myDictionary = new DDS_Dictionary(); @@ -493,7 +492,7 @@ LDOMString DDS_Dictionary::KeyWord( const TCollection_AsciiString& key ) \param theComponent component name \return handle to the data dictionary item */ -Handle_DDS_DicItem DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID, +Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID, const TCollection_AsciiString& theComponent ) const { Handle(DDS_DicItem) aDicItem; @@ -514,7 +513,7 @@ Handle_DDS_DicItem DDS_Dictionary::GetDicItem( const TCollection_AsciiString& th \param theID data dictionary item ID \return handle to the data dictionary item */ -Handle_DDS_DicItem DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID ) const +Handle(DDS_DicItem) DDS_Dictionary::GetDicItem( const TCollection_AsciiString& theID ) const { Handle(DDS_DicItem) aDicItem; for ( Standard_Integer i = 1; i <= myGroupMap.Extent() && aDicItem.IsNull(); i++ ) diff --git a/src/DDS/DDS_Dictionary.h b/src/DDS/DDS_Dictionary.h index 47bbad54a..458f13f0f 100644 --- a/src/DDS/DDS_Dictionary.h +++ b/src/DDS/DDS_Dictionary.h @@ -92,7 +92,7 @@ private: static Handle(DDS_Dictionary) myDictionary; public: - DEFINE_STANDARD_RTTI(DDS_Dictionary) + OCCT_DEFINE_STANDARD_RTTIEXT(DDS_Dictionary,MMgt_TShared) }; #endif diff --git a/src/DDS/DDS_KeyWords.cxx b/src/DDS/DDS_KeyWords.cxx index 6bfa6d7b5..f01c58b5a 100644 --- a/src/DDS/DDS_KeyWords.cxx +++ b/src/DDS/DDS_KeyWords.cxx @@ -22,8 +22,7 @@ #include "DDS_KeyWords.h" -IMPLEMENT_STANDARD_HANDLE(DDS_KeyWords, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(DDS_KeyWords, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(DDS_KeyWords, MMgt_TShared) /*! \class DDS_KeyWords @@ -147,7 +146,7 @@ DDS_KeyWords::DDS_KeyWords() \brief Get the only instance of the class DDS_KeyWords. \return the only instance of the class */ -Handle_DDS_KeyWords DDS_KeyWords::Get() +Handle(DDS_KeyWords) DDS_KeyWords::Get() { static Handle(DDS_KeyWords) keyWords; diff --git a/src/DDS/DDS_KeyWords.h b/src/DDS/DDS_KeyWords.h index ffdd1d78e..62de5d8ff 100644 --- a/src/DDS/DDS_KeyWords.h +++ b/src/DDS/DDS_KeyWords.h @@ -53,7 +53,7 @@ private: KeyWordMap myKeyWord; public: - DEFINE_STANDARD_RTTI(DDS_KeyWords) + OCCT_DEFINE_STANDARD_RTTIEXT(DDS_KeyWords,MMgt_TShared) }; #endif diff --git a/src/LightApp/LightApp_OCCSelector.h b/src/LightApp/LightApp_OCCSelector.h index fc9299c71..06026d2ad 100644 --- a/src/LightApp/LightApp_OCCSelector.h +++ b/src/LightApp/LightApp_OCCSelector.h @@ -33,7 +33,7 @@ #ifndef DISABLE_OCCVIEWER #include -class Handle_AIS_InteractiveObject; +#include #endif /*! diff --git a/src/LightApp/LightApp_SelectionMgr.cxx b/src/LightApp/LightApp_SelectionMgr.cxx index 4dd385782..aeec9d101 100644 --- a/src/LightApp/LightApp_SelectionMgr.cxx +++ b/src/LightApp/LightApp_SelectionMgr.cxx @@ -34,9 +34,7 @@ #include // Open CASCADE Include - #include #include - #include #include #endif @@ -458,9 +456,9 @@ void LightApp_SelectionMgr::setSelectionCacheEnabled( bool on ) #ifndef DISABLE_SALOMEOBJECT -QList LightApp_SelectionMgr::selectionCache( const QString& type ) const +QList LightApp_SelectionMgr::selectionCache( const QString& type ) const { - QList res; + QList res; QStringList types; if ( !type.isEmpty() ) diff --git a/src/LightApp/LightApp_SelectionMgr.h b/src/LightApp/LightApp_SelectionMgr.h index 06b02b193..57fc6eba9 100644 --- a/src/LightApp/LightApp_SelectionMgr.h +++ b/src/LightApp/LightApp_SelectionMgr.h @@ -34,9 +34,10 @@ #include #include + #include + #include + class SALOME_ListIO; - class TColStd_IndexedMapOfInteger; - class TColStd_MapOfInteger; class TCollection_AsciiString; #else #include diff --git a/src/OBJECT/SALOME_AISObject.cxx b/src/OBJECT/SALOME_AISObject.cxx index c72d5deb8..64bcbf9c9 100755 --- a/src/OBJECT/SALOME_AISObject.cxx +++ b/src/OBJECT/SALOME_AISObject.cxx @@ -22,8 +22,7 @@ #include "SALOME_AISObject.hxx" -IMPLEMENT_STANDARD_HANDLE (SALOME_AISObject, AIS_InteractiveObject) -IMPLEMENT_STANDARD_RTTIEXT(SALOME_AISObject, AIS_InteractiveObject) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SALOME_AISObject, AIS_InteractiveObject) SALOME_AISObject::SALOME_AISObject() { diff --git a/src/OBJECT/SALOME_AISObject.hxx b/src/OBJECT/SALOME_AISObject.hxx index 2028f2447..d30ce8a86 100755 --- a/src/OBJECT/SALOME_AISObject.hxx +++ b/src/OBJECT/SALOME_AISObject.hxx @@ -35,14 +35,14 @@ public: Standard_EXPORT SALOME_AISObject(); Standard_EXPORT ~SALOME_AISObject(); - Standard_EXPORT virtual Handle_SALOME_InteractiveObject getIO() = 0; + Standard_EXPORT virtual Handle(SALOME_InteractiveObject) getIO() = 0; Standard_EXPORT virtual Standard_Boolean hasIO() = 0; Standard_EXPORT virtual Standard_CString getName() = 0; Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; public: - DEFINE_STANDARD_RTTI(SALOME_AISObject); + OCCT_DEFINE_STANDARD_RTTIEXT(SALOME_AISObject,AIS_InteractiveObject) }; DEFINE_STANDARD_HANDLE(SALOME_AISObject, AIS_InteractiveObject) diff --git a/src/OBJECT/SALOME_AISShape.cxx b/src/OBJECT/SALOME_AISShape.cxx index 4e9f4c93b..7be2fd5c3 100755 --- a/src/OBJECT/SALOME_AISShape.cxx +++ b/src/OBJECT/SALOME_AISShape.cxx @@ -22,8 +22,7 @@ #include "SALOME_AISShape.hxx" -IMPLEMENT_STANDARD_HANDLE (SALOME_AISShape, ViewerData_AISShape) -IMPLEMENT_STANDARD_RTTIEXT(SALOME_AISShape, ViewerData_AISShape) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SALOME_AISShape, ViewerData_AISShape) /*! Constructor diff --git a/src/OBJECT/SALOME_AISShape.hxx b/src/OBJECT/SALOME_AISShape.hxx index 42fe6ce82..acf22fa61 100755 --- a/src/OBJECT/SALOME_AISShape.hxx +++ b/src/OBJECT/SALOME_AISShape.hxx @@ -29,8 +29,9 @@ #include #include +#include + class TopoDS_Shape; -class TColStd_IndexedMapOfInteger; class SALOME_AISShape : public ViewerData_AISShape { @@ -41,7 +42,7 @@ public: Standard_EXPORT virtual Standard_CString getName() = 0; Standard_EXPORT virtual void setName(const Standard_CString aName) = 0; - Standard_EXPORT virtual Handle_SALOME_InteractiveObject getIO() = 0; + Standard_EXPORT virtual Handle(SALOME_InteractiveObject) getIO() = 0; Standard_EXPORT virtual Standard_Boolean hasIO() = 0; Standard_EXPORT virtual void setTopLevel(Standard_Boolean) = 0; @@ -53,7 +54,7 @@ public: Standard_EXPORT virtual void highlightSubShapes(const TColStd_IndexedMapOfInteger& aIndexMap, const Standard_Boolean aHighlight ) = 0; public: - DEFINE_STANDARD_RTTI(SALOME_AISShape); + OCCT_DEFINE_STANDARD_RTTIEXT(SALOME_AISShape,ViewerData_AISShape) }; DEFINE_STANDARD_HANDLE(SALOME_AISShape, ViewerData_AISShape) diff --git a/src/OBJECT/SALOME_Filter.cxx b/src/OBJECT/SALOME_Filter.cxx index 1064bb5fa..f52c49bce 100644 --- a/src/OBJECT/SALOME_Filter.cxx +++ b/src/OBJECT/SALOME_Filter.cxx @@ -22,8 +22,7 @@ #include "SALOME_Filter.hxx" -IMPLEMENT_STANDARD_HANDLE (SALOME_Filter, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(SALOME_Filter, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SALOME_Filter, MMgt_TShared) SALOME_Filter::SALOME_Filter() { diff --git a/src/OBJECT/SALOME_Filter.hxx b/src/OBJECT/SALOME_Filter.hxx index 3e7bd08b8..4f1c200ca 100644 --- a/src/OBJECT/SALOME_Filter.hxx +++ b/src/OBJECT/SALOME_Filter.hxx @@ -38,7 +38,7 @@ public: Standard_EXPORT virtual Standard_Boolean IsOk(const Handle(SALOME_InteractiveObject)& anObj) const = 0; public: - DEFINE_STANDARD_RTTI(SALOME_Filter); + OCCT_DEFINE_STANDARD_RTTIEXT(SALOME_Filter,MMgt_TShared) }; DEFINE_STANDARD_HANDLE(SALOME_Filter, MMgt_TShared) diff --git a/src/OBJECT/SALOME_InteractiveObject.cxx b/src/OBJECT/SALOME_InteractiveObject.cxx index c97e5b0ab..e357b0b20 100755 --- a/src/OBJECT/SALOME_InteractiveObject.cxx +++ b/src/OBJECT/SALOME_InteractiveObject.cxx @@ -27,8 +27,7 @@ #include "SALOME_InteractiveObject.hxx" -IMPLEMENT_STANDARD_HANDLE (SALOME_InteractiveObject, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(SALOME_InteractiveObject, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SALOME_InteractiveObject, MMgt_TShared) /*! Default constructor diff --git a/src/OBJECT/SALOME_InteractiveObject.hxx b/src/OBJECT/SALOME_InteractiveObject.hxx index 35e161041..95a74fcea 100755 --- a/src/OBJECT/SALOME_InteractiveObject.hxx +++ b/src/OBJECT/SALOME_InteractiveObject.hxx @@ -27,6 +27,8 @@ #include #include +#include + #include class SALOME_InteractiveObject; @@ -69,7 +71,7 @@ protected: std::string myReference; public: - DEFINE_STANDARD_RTTI(SALOME_InteractiveObject); + OCCT_DEFINE_STANDARD_RTTIEXT(SALOME_InteractiveObject,MMgt_TShared) }; #endif // SALOME_INTERACTIVEOBJECT_HXX diff --git a/src/OBJECT/SALOME_TypeFilter.cxx b/src/OBJECT/SALOME_TypeFilter.cxx index fb5ad4181..b4191f105 100644 --- a/src/OBJECT/SALOME_TypeFilter.cxx +++ b/src/OBJECT/SALOME_TypeFilter.cxx @@ -22,8 +22,7 @@ #include "SALOME_TypeFilter.hxx" -IMPLEMENT_STANDARD_HANDLE (SALOME_TypeFilter, SALOME_Filter) -IMPLEMENT_STANDARD_RTTIEXT(SALOME_TypeFilter, SALOME_Filter) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(SALOME_TypeFilter, SALOME_Filter) /*! Constructor diff --git a/src/OBJECT/SALOME_TypeFilter.hxx b/src/OBJECT/SALOME_TypeFilter.hxx index 8bb5bfcfc..a9a58f634 100644 --- a/src/OBJECT/SALOME_TypeFilter.hxx +++ b/src/OBJECT/SALOME_TypeFilter.hxx @@ -40,7 +40,7 @@ protected: Standard_CString myKind; public: - DEFINE_STANDARD_RTTI(SALOME_TypeFilter); + OCCT_DEFINE_STANDARD_RTTIEXT(SALOME_TypeFilter,SALOME_Filter) }; DEFINE_STANDARD_HANDLE(SALOME_TypeFilter, SALOME_Filter) diff --git a/src/OCCViewer/CMakeLists.txt b/src/OCCViewer/CMakeLists.txt index 16c7237f2..528be766b 100755 --- a/src/OCCViewer/CMakeLists.txt +++ b/src/OCCViewer/CMakeLists.txt @@ -79,7 +79,6 @@ SET(_moc_HEADERS SET(_other_HEADERS OCCViewer.h OCCViewer_ClipPlane.h - OCCViewer_Trihedron.h OCCViewer_VService.h OCCViewer_Utilities.h ) @@ -172,7 +171,6 @@ SET(_other_SOURCES OCCViewer_FontWidget.cxx OCCViewer_SetRotationPointDlg.cxx OCCViewer_ToolTip.cxx - OCCViewer_Trihedron.cxx OCCViewer_VService.cxx OCCViewer_ViewFrame.cxx OCCViewer_ViewManager.cxx diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx index f810ebff6..45e669396 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.cxx @@ -141,7 +141,7 @@ bool OCCViewer_ClipPlaneInteractor::isClickable( const Handle(AIS_Plane)& thePla Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext(); - if ( anAISContext->IsSelected( thePlane ) ) + if ( anAISContext->IsSelected( Handle(AIS_InteractiveObject)::DownCast(thePlane) ) ) { return false; } @@ -172,7 +172,7 @@ bool OCCViewer_ClipPlaneInteractor::isDraggable( const Handle(AIS_Plane)& thePla Handle(AIS_InteractiveContext) anAISContext = myViewer->getAISContext(); - if ( !anAISContext->IsSelected( thePlane ) ) + if ( !anAISContext->IsSelected( Handle(AIS_InteractiveObject)::DownCast(thePlane) ) ) { return false; } @@ -522,7 +522,7 @@ bool OCCViewer_ClipPlaneInteractor::mousePress( QMouseEvent* theEvent, // process mouse click on the object if ( myIsClickable ) { - myViewer->getAISContext()->SetSelected( aPlane ); + myViewer->getAISContext()->SetSelected( Handle(AIS_InteractiveObject)::DownCast(aPlane) ); emit planeClicked( aPlane ); } diff --git a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h index ae79a441e..da13bdff8 100644 --- a/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h +++ b/src/OCCViewer/OCCViewer_ClipPlaneInteractor.h @@ -34,7 +34,7 @@ #include -class Handle(V3d_View); +#include /*! \class OCCViewer_ClipPlaneInteractor. diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.cxx b/src/OCCViewer/OCCViewer_ClippingDlg.cxx index 1c9e4633e..83dcfdb60 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.cxx +++ b/src/OCCViewer/OCCViewer_ClippingDlg.cxx @@ -40,7 +40,6 @@ #include #include -#include #include #include #include @@ -647,8 +646,8 @@ OCCViewer_ClippingDlg::OCCViewer_ClippingDlg(OCCViewer_ViewWindow* parent , OCCV OCCViewer_ViewManager* aViewMgr = (OCCViewer_ViewManager*) myModel->getViewManager(); myInteractor = new OCCViewer_ClipPlaneInteractor( aViewMgr, this ); - connect( myInteractor, SIGNAL( planeClicked( const Handle_AIS_Plane& ) ), SLOT( onPlaneClicked( const Handle_AIS_Plane& ) ) ); - connect( myInteractor, SIGNAL( planeDragged( const Handle_AIS_Plane& ) ), SLOT( onPlaneDragged( const Handle_AIS_Plane& ) ) ); + connect( myInteractor, SIGNAL( planeClicked( const Handle(AIS_Plane)& ) ), SLOT( onPlaneClicked( const Handle(AIS_Plane)& ) ) ); + connect( myInteractor, SIGNAL( planeDragged( const Handle(AIS_Plane)& ) ), SLOT( onPlaneDragged( const Handle(AIS_Plane)& ) ) ); myLocalPlanes = myModel->getClipPlanes(); synchronize(); diff --git a/src/OCCViewer/OCCViewer_ToolTip.cxx b/src/OCCViewer/OCCViewer_ToolTip.cxx index d987eb49d..900a9818f 100644 --- a/src/OCCViewer/OCCViewer_ToolTip.cxx +++ b/src/OCCViewer/OCCViewer_ToolTip.cxx @@ -27,8 +27,6 @@ #include -#include - /*! Constructor @@ -88,7 +86,7 @@ void OCCViewer_ToolTip::onToolTip( QPoint p, QString& str, QFont& f, QRect& txtR if( !owner.IsNull() ) emit toolTipFor( owner, txt ); - Handle_AIS_InteractiveObject obj = aCont->DetectedInteractive(); + Handle(AIS_InteractiveObject) obj = aCont->DetectedInteractive(); if( txt.isEmpty() && !obj.IsNull() ) emit toolTipFor( obj, txt ); diff --git a/src/OCCViewer/OCCViewer_ToolTip.h b/src/OCCViewer/OCCViewer_ToolTip.h index d3fbe851b..00e384352 100644 --- a/src/OCCViewer/OCCViewer_ToolTip.h +++ b/src/OCCViewer/OCCViewer_ToolTip.h @@ -24,9 +24,10 @@ #include #include +#include +#include + class OCCViewer_ViewWindow; -class Handle_SelectMgr_EntityOwner; -class Handle_AIS_InteractiveObject; /*! \class OCCViewer_ToolTip diff --git a/src/OCCViewer/OCCViewer_Trihedron.cxx b/src/OCCViewer/OCCViewer_Trihedron.cxx index 826d8cdd3..4682ce950 100644 --- a/src/OCCViewer/OCCViewer_Trihedron.cxx +++ b/src/OCCViewer/OCCViewer_Trihedron.cxx @@ -45,8 +45,7 @@ #define PI 3.14159265359 -IMPLEMENT_STANDARD_HANDLE( OCCViewer_Trihedron, AIS_InteractiveObject ) -IMPLEMENT_STANDARD_RTTIEXT( OCCViewer_Trihedron, AIS_InteractiveObject ) +OCCT_IMPLEMENT_STANDARD_RTTIEXT( OCCViewer_Trihedron, AIS_InteractiveObject ) /*! * Constructor diff --git a/src/OCCViewer/OCCViewer_Trihedron.h b/src/OCCViewer/OCCViewer_Trihedron.h index 0c57bf442..0618e4f20 100644 --- a/src/OCCViewer/OCCViewer_Trihedron.h +++ b/src/OCCViewer/OCCViewer_Trihedron.h @@ -56,7 +56,7 @@ public: virtual void display(); - DEFINE_STANDARD_RTTI( OCCViewer_Trihedron ) + OCCT_DEFINE_STANDARD_RTTIEXT(OCCViewer_Trihedron,AIS_InteractiveObject) private: unsigned int myTextList; diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index 0fe1ac0a6..706d2320d 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -60,7 +60,6 @@ #else #include #endif -#include #include #include @@ -73,11 +72,13 @@ #include #include -#include - #include #include +#if OCC_VERSION_MAJOR < 7 + #include +#endif + /*! Get data for supported background modes: gradient types, identifiers and supported image formats */ diff --git a/src/OCCViewer/OCCViewer_ViewModel.h b/src/OCCViewer/OCCViewer_ViewModel.h index 5e344e074..41079ea3c 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.h +++ b/src/OCCViewer/OCCViewer_ViewModel.h @@ -36,6 +36,7 @@ #include #include #include +#include #include class QKeyEvent; @@ -47,8 +48,6 @@ class OCCViewer_ClippingDlg; class OCCViewer_ViewWindow; class OCCViewer_ViewPort3d; -class AIS_ListOfInteractive; - class QtxAction; diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.cxx b/src/OCCViewer/OCCViewer_ViewPort3d.cxx index b0ba526d4..814b97a97 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.cxx +++ b/src/OCCViewer/OCCViewer_ViewPort3d.cxx @@ -39,8 +39,9 @@ #include #include -#include -#include +#if OCC_VERSION_MAJOR < 7 + #include +#endif #if OCC_VERSION_LARGE > 0x06070100 #include @@ -595,9 +596,14 @@ void OCCViewer_ViewPort3d::paintEvent( QPaintEvent* e ) #if QT_VERSION < QT_VERSION_CHECK(5, 0, 0) QApplication::syncX(); #endif - QRect rc = e->rect(); - if ( !myPaintersRedrawing ) + if ( !myPaintersRedrawing ) { +#if OCC_VERSION_MAJOR < 7 + QRect rc = e->rect(); activeView()->Redraw( rc.x(), rc.y(), rc.width(), rc.height() ); +#else + activeView()->Redraw(); +#endif + } } OCCViewer_ViewPort::paintEvent( e ); myBusy = false; diff --git a/src/OCCViewer/OCCViewer_ViewPort3d.h b/src/OCCViewer/OCCViewer_ViewPort3d.h index b05bd3a4a..e122cebab 100755 --- a/src/OCCViewer/OCCViewer_ViewPort3d.h +++ b/src/OCCViewer/OCCViewer_ViewPort3d.h @@ -29,13 +29,12 @@ #include "Qtx.h" #include +#include class QColor; class QString; class QRect; -class Handle(V3d_Viewer); - #ifdef WIN32 #pragma warning ( disable:4251 ) #endif diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index d86822086..704fe6971 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -86,8 +86,10 @@ #include #endif +#if OCC_VERSION_MAJOR < 7 + #include +#endif -#include #include #include @@ -2273,7 +2275,11 @@ bool OCCViewer_ViewWindow::dumpViewToFormat( const QImage& img, if ( format != "PS" && format != "EPS") res = myViewPort->getView()->Dump( fileName.toStdString().c_str() ); +#if OCC_VERSION_MAJOR < 7 Handle(Visual3d_View) a3dView = myViewPort->getView()->View(); +#else + Handle(Graphic3d_CView) a3dView = myViewPort->getView()->View(); +#endif if (format == "PS") res = a3dView->Export(strdup(qPrintable(fileName)), Graphic3d_EF_PostScript); diff --git a/src/Prs/CMakeLists.txt b/src/Prs/CMakeLists.txt index dc09889e8..d1b3572ae 100755 --- a/src/Prs/CMakeLists.txt +++ b/src/Prs/CMakeLists.txt @@ -17,6 +17,16 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # +# additional include directories +INCLUDE_DIRECTORIES( + ${CAS_INCLUDE_DIRS} +) + +# libraries to link to +SET(_link_LIBRARIES ${CAS_KERNEL}) + ADD_LIBRARY(SalomePrs SALOME_Prs.cxx) +TARGET_LINK_LIBRARIES(SalomePrs ${_link_LIBRARIES}) + INSTALL(TARGETS SalomePrs EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS}) INSTALL(FILES SALOME_Prs.h DESTINATION ${SALOME_INSTALL_HEADERS}) diff --git a/src/Prs/SALOME_Prs.h b/src/Prs/SALOME_Prs.h index dc4d9be4b..f7f5e330f 100755 --- a/src/Prs/SALOME_Prs.h +++ b/src/Prs/SALOME_Prs.h @@ -33,13 +33,19 @@ #define PRS_EXPORT #endif +#include +#include + +#include + class SALOME_View; class SALOME_Displayer; class SALOME_ListIO; -class Handle_SALOME_InteractiveObject; - -#include -#include +#if OCC_VERSION_MAJOR >= 7 + class SALOME_InteractiveObject; +#else + class Handle_SALOME_InteractiveObject; +#endif /*! \class SALOME_Prs @@ -303,7 +309,7 @@ public: // New methods (asv) //! \retval Return false. - virtual bool isVisible( const Handle_SALOME_InteractiveObject& ){ return false; } + virtual bool isVisible( const Handle(SALOME_InteractiveObject)& ){ return false; } virtual void Repaint() {} //!< Null body here. virtual void GetVisible( SALOME_ListIO& theList ) {} }; diff --git a/src/QDS/QDS.cxx b/src/QDS/QDS.cxx index a26671907..98e664de1 100644 --- a/src/QDS/QDS.cxx +++ b/src/QDS/QDS.cxx @@ -29,9 +29,6 @@ #include #include -#include -#include - QList QDS::_datumList; /*! diff --git a/src/QDS/QDS.h b/src/QDS/QDS.h index 3b47bf8f9..a1a241407 100644 --- a/src/QDS/QDS.h +++ b/src/QDS/QDS.h @@ -41,11 +41,11 @@ #include #include -#include +#include +#include class QDS_Datum; -class Handle(TCollection_HAsciiString); -class Handle(TCollection_HExtendedString); + class QDS_EXPORT QDS { diff --git a/src/SOCC/SOCC_Prs.h b/src/SOCC/SOCC_Prs.h index 2ed3aff2a..7f4b791fb 100644 --- a/src/SOCC/SOCC_Prs.h +++ b/src/SOCC/SOCC_Prs.h @@ -33,7 +33,7 @@ #include -class Handle(AIS_InteractiveObject); +class AIS_InteractiveObject; class SOCC_EXPORT SOCC_Prs : public SALOME_OCCPrs { diff --git a/src/SOCC/SOCC_ViewModel.cxx b/src/SOCC/SOCC_ViewModel.cxx index 14be3e518..03825c7a4 100755 --- a/src/SOCC/SOCC_ViewModel.cxx +++ b/src/SOCC/SOCC_ViewModel.cxx @@ -25,8 +25,6 @@ #include "SOCC_Prs.h" #include "SOCC_ViewWindow.h" -#include "OCCViewer_Trihedron.h" - #include "SUIT_Session.h" #include "SUIT_ResourceMgr.h" //#include "SUIT_Application.h" @@ -40,7 +38,6 @@ //#include CORBA_CLIENT_HEADER(SALOMEDS) #include -#include #include #include @@ -491,8 +488,7 @@ void SOCC_Viewer::EraseAll( SALOME_Displayer* d, const bool forced ) ic->DisplayedObjects( aList ); AIS_ListIteratorOfListOfInteractive anIter( aList ); for ( ; anIter.More(); anIter.Next() ) { - if ( (isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron )) || - anIter.Value()->DynamicType() == STANDARD_TYPE( OCCViewer_Trihedron )) + if ( (isTrihedronDisplayed && anIter.Value()->DynamicType() == STANDARD_TYPE( AIS_Trihedron ) ) ) continue; // erase an object diff --git a/src/SOCC/SOCC_ViewModel.h b/src/SOCC/SOCC_ViewModel.h index c4feb972c..df7661592 100755 --- a/src/SOCC/SOCC_ViewModel.h +++ b/src/SOCC/SOCC_ViewModel.h @@ -32,7 +32,7 @@ #include "OCCViewer_ViewModel.h" class SALOME_ListIO; -class Handle(SALOME_InteractiveObject); +class SALOME_InteractiveObject; class SOCC_EXPORT SOCC_Viewer: public OCCViewer_Viewer, public SALOME_View { diff --git a/src/SVTK/SALOME_Actor.h b/src/SVTK/SALOME_Actor.h index 4ed2e5a92..d09a8e848 100644 --- a/src/SVTK/SALOME_Actor.h +++ b/src/SVTK/SALOME_Actor.h @@ -31,7 +31,7 @@ #include "SVTK_Selector.h" #include "SVTK.h" -class Handle(SALOME_InteractiveObject); +class SALOME_InteractiveObject; // undefining min and max because CASCADE's defines them and // it clashes with std::min(), std::max() diff --git a/src/SVTK/SVTK_Selector.h b/src/SVTK/SVTK_Selector.h index e197895cb..c5c9831a5 100644 --- a/src/SVTK/SVTK_Selector.h +++ b/src/SVTK/SVTK_Selector.h @@ -31,18 +31,18 @@ #include "SVTK_Selection.h" #include "SALOME_ListIO.hxx" +#include + #include #include #include -class Handle(VTKViewer_Filter); - +class SALOME_InteractiveObject; class SALOME_Actor; class SVTK_SelectionEvent; class vtkActorCollection; class vtkRenderer; -class Handle(SALOME_InteractiveObject); //! Define an abstract interface for selection in SVTK package /*! diff --git a/src/SalomeApp/SalomeApp_ListView.h b/src/SalomeApp/SalomeApp_ListView.h index 9b046a26b..f55cef0cf 100644 --- a/src/SalomeApp/SalomeApp_ListView.h +++ b/src/SalomeApp/SalomeApp_ListView.h @@ -36,10 +36,10 @@ #include #include -class QToolButton; +#include +#include -class TColStd_ListOfInteger; -class TColStd_ListOfReal; +class QToolButton; // enumeration for ListView updating mode enum UpdateType { diff --git a/src/VTKViewer/VTKViewer_Filter.cxx b/src/VTKViewer/VTKViewer_Filter.cxx index 39ca0c5ca..7aa8e69a9 100755 --- a/src/VTKViewer/VTKViewer_Filter.cxx +++ b/src/VTKViewer/VTKViewer_Filter.cxx @@ -26,8 +26,7 @@ #include "VTKViewer_Filter.h" -IMPLEMENT_STANDARD_HANDLE(VTKViewer_Filter, MMgt_TShared) -IMPLEMENT_STANDARD_RTTIEXT(VTKViewer_Filter, MMgt_TShared) +OCCT_IMPLEMENT_STANDARD_RTTIEXT(VTKViewer_Filter, MMgt_TShared) /*! * \class VTKViewer_Filter diff --git a/src/VTKViewer/VTKViewer_Filter.h b/src/VTKViewer/VTKViewer_Filter.h index 8c6f1925f..1ccb8ed14 100755 --- a/src/VTKViewer/VTKViewer_Filter.h +++ b/src/VTKViewer/VTKViewer_Filter.h @@ -33,6 +33,8 @@ #include #include +#include + class VTKViewer_Actor; DEFINE_STANDARD_HANDLE(VTKViewer_Filter, MMgt_TShared); @@ -61,7 +63,7 @@ protected: VTKViewer_Actor* myActor; public: - DEFINE_STANDARD_RTTI(VTKViewer_Filter) + OCCT_DEFINE_STANDARD_RTTIEXT(VTKViewer_Filter,MMgt_TShared) }; #endif diff --git a/src/ViewerData/CMakeLists.txt b/src/ViewerData/CMakeLists.txt index 981e25a54..8e2128531 100644 --- a/src/ViewerData/CMakeLists.txt +++ b/src/ViewerData/CMakeLists.txt @@ -28,7 +28,7 @@ INCLUDE_DIRECTORIES( ADD_DEFINITIONS(${CAS_DEFINITIONS}) # libraries to link to -SET(_link_LIBRARIES ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_TKV3d}) +SET(_link_LIBRARIES ${CAS_LDPATH} ${CAS_KERNEL} ${CAS_VIEWER}) # --- headers --- diff --git a/src/ViewerData/ViewerData_AISShape.cxx b/src/ViewerData/ViewerData_AISShape.cxx index 89ee780f2..0e1b3f9f4 100644 --- a/src/ViewerData/ViewerData_AISShape.cxx +++ b/src/ViewerData/ViewerData_AISShape.cxx @@ -23,11 +23,9 @@ #include "ViewerData_AISShape.hxx" #ifdef USE_TEXTURED_SHAPE -IMPLEMENT_STANDARD_HANDLE (ViewerData_AISShape, AIS_TexturedShape) -IMPLEMENT_STANDARD_RTTIEXT(ViewerData_AISShape, AIS_TexturedShape) + OCCT_IMPLEMENT_STANDARD_RTTIEXT(ViewerData_AISShape, AIS_TexturedShape) #else -IMPLEMENT_STANDARD_HANDLE (ViewerData_AISShape, AIS_Shape) -IMPLEMENT_STANDARD_RTTIEXT(ViewerData_AISShape, AIS_Shape) + OCCT_IMPLEMENT_STANDARD_RTTIEXT(ViewerData_AISShape, AIS_Shape) #endif /*! diff --git a/src/ViewerData/ViewerData_AISShape.hxx b/src/ViewerData/ViewerData_AISShape.hxx index 8ea403b59..bdb8246f4 100644 --- a/src/ViewerData/ViewerData_AISShape.hxx +++ b/src/ViewerData/ViewerData_AISShape.hxx @@ -35,6 +35,8 @@ #include #include +#include + class ViewerData_AISShape #ifdef USE_TEXTURED_SHAPE : public AIS_TexturedShape @@ -62,13 +64,18 @@ protected: bool myIsClippable; public: - DEFINE_STANDARD_RTTI(ViewerData_AISShape) + +#ifdef USE_TEXTURED_SHAPE + OCCT_DEFINE_STANDARD_RTTIEXT(ViewerData_AISShape,AIS_TexturedShape) +#else + OCCT_DEFINE_STANDARD_RTTIEXT(ViewerData_AISShape,AIS_Shape) +#endif }; #ifdef USE_TEXTURED_SHAPE -DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_TexturedShape) + DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_TexturedShape) #else -DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_Shape) + DEFINE_STANDARD_HANDLE(ViewerData_AISShape, AIS_Shape) #endif #endif // _ViewerData_AISShape_HeaderFile