Salome HOME
Merge remote branch 'origin/V7_dev'
authorvsr <vsr@opencascade.com>
Mon, 6 Jun 2016 08:36:06 +0000 (11:36 +0300)
committervsr <vsr@opencascade.com>
Mon, 6 Jun 2016 08:36:06 +0000 (11:36 +0300)
69 files changed:
CMakeLists.txt
src/SMESH/SMESH_Mesh.hxx
src/SMESHGUI/CMakeLists.txt
src/SMESHGUI/SMESHGUI_ComputeDlg.cxx
src/SMESHGUI/SMESHGUI_Filter.cxx
src/SMESHGUI/SMESHGUI_Filter.h
src/SMESHGUI/SMESHGUI_GEOMGenUtils.h
src/SMESHGUI/SMESHGUI_IdPreview.cxx
src/SMESHGUI/SMESHGUI_IdPreview.h
src/SMESHGUI/SMESHGUI_MergeDlg.cxx
src/SMESHGUI/SMESHGUI_MergeDlg.h
src/SMESHGUI/SMESHGUI_MeshInfo.cxx
src/SMESHGUI/SMESHGUI_SelectionOp.h
src/SMESHGUI/SMESHGUI_VTKUtils.cxx
src/SMESHGUI/SMESHGUI_VTKUtils.h
src/SMESHUtils/SMESH_MeshAlgos.cxx
src/SMESH_I/SMESH_2smeshpy.cxx
src/SMESH_I/SMESH_2smeshpy.hxx
src/SMESH_I/SMESH_Filter_i.cxx
src/SMESH_I/SMESH_PythonDump.hxx
src/StdMeshers/StdMeshers_Cartesian_3D.cxx
src/StdMeshers/StdMeshers_Distribution.cxx
src/StdMeshers/StdMeshers_ProjectionUtils.hxx
src/StdMeshers/StdMeshers_QuadToTriaAdaptor.hxx
src/StdMeshersGUI/CMakeLists.txt
src/Tools/MGCleanerPlug/CMakeLists.txt
src/Tools/MGCleanerPlug/MGCleanerMonPlugDialog.py
src/Tools/MGCleanerPlug/MGCleanerMonViewText.py
src/Tools/MGCleanerPlug/MGCleanerplug_plugin.py
src/Tools/MeshCut/CMakeLists.txt
src/Tools/MeshCut/meshcut_plugin.py
src/Tools/Verima/Base/dataBase.py
src/Tools/Verima/Base/exportToCSV.py
src/Tools/Verima/Base/tableDeBase.py
src/Tools/Verima/Base/tableGroupeRatios.py
src/Tools/Verima/Base/tableGroupeTailles.py
src/Tools/Verima/Base/tableGroupes.py
src/Tools/Verima/Base/tableGroupesRef.py
src/Tools/Verima/Base/tableMachines.py
src/Tools/Verima/Base/tableMaillages.py
src/Tools/Verima/Base/tableMailles.py
src/Tools/Verima/Base/tableMailleurs.py
src/Tools/Verima/Base/tablePerfs.py
src/Tools/Verima/Base/tableRatios.py
src/Tools/Verima/Base/tableTailles.py
src/Tools/Verima/Base/tableVersions.py
src/Tools/Verima/Gui/CMakeLists.txt
src/Tools/Verima/Gui/maFenetreChoix.py
src/Tools/Verima/Gui/monEditor.py
src/Tools/Verima/Gui/monNomBase.py
src/Tools/Verima/Gui/visualiseDatabase.py
src/Tools/Verima/Stats/job.py
src/Tools/Verima/Stats/ref.py
src/Tools/Verima/ajoutEnreg.py
src/Tools/Verima/compareVersions.py
src/Tools/Verima/createDatabase.py
src/Tools/Verima/lance.py
src/Tools/Verima/passeJobs.py
src/Tools/YamsPlug/CMakeLists.txt
src/Tools/YamsPlug/monViewText.py
src/Tools/YamsPlug/monYamsPlugDialog.py
src/Tools/YamsPlug/yamsplug_plugin.py
src/Tools/blocFissure/ihm/CMakeLists.txt
src/Tools/blocFissure/ihm/fissureCoude.ui
src/Tools/blocFissure/ihm/fissureCoude_plugin.py
src/Tools/padder/spadderpy/gui/CMakeLists.txt
src/Tools/padder/spadderpy/gui/inputdialog.py
src/Tools/padder/spadderpy/gui/plugindialog.py
src/Tools/padder/spadderpy/plugin/spadderPlugin.py

index dbcd419fe2062e9f539d56c7df25559217a2b053..d5381f6a1a62a2d168cf13f8b2d03d398423e24f 100755 (executable)
@@ -27,12 +27,12 @@ CMAKE_POLICY(SET CMP0003 NEW)
 # Project name, upper case
 STRING(TOUPPER ${PROJECT_NAME} PROJECT_NAME_UC)
 
-SET(${PROJECT_NAME_UC}_MAJOR_VERSION 7)
-SET(${PROJECT_NAME_UC}_MINOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MAJOR_VERSION 8)
+SET(${PROJECT_NAME_UC}_MINOR_VERSION 0)
 SET(${PROJECT_NAME_UC}_PATCH_VERSION 0)
 SET(${PROJECT_NAME_UC}_VERSION
   ${${PROJECT_NAME_UC}_MAJOR_VERSION}.${${PROJECT_NAME_UC}_MINOR_VERSION}.${${PROJECT_NAME_UC}_PATCH_VERSION})
-SET(${PROJECT_NAME_UC}_VERSION_DEV 0)
+SET(${PROJECT_NAME_UC}_VERSION_DEV 1)
 
 # Find KERNEL
 # ===========
@@ -128,12 +128,20 @@ IF(SALOME_BUILD_GUI)
     ##
     ## Prerequisites From GUI:
     ##
-    # Qt4
-    FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
+    # Qt
+    IF(NOT SALOME_GUI_BUILD_WITH_QT5)
+      FIND_PACKAGE(SalomeQt4 REQUIRED COMPONENTS QtCore QtGui QtXml)
+    ELSE()
+      FIND_PACKAGE(SalomeQt5 REQUIRED)
+    ENDIF()
     # SIP
-    FIND_PACKAGE(SalomeSIP REQUIRED)  # should come after Python and before PyQt4
-    # PyQt4
-    FIND_PACKAGE(SalomePyQt4 REQUIRED)
+    FIND_PACKAGE(SalomeSIP REQUIRED)  # should come after Python and before PyQt5
+    # PyQt
+    IF (NOT SALOME_GUI_BUILD_WITH_QT5)
+      FIND_PACKAGE(SalomePyQt4 REQUIRED)
+    ELSE()
+      FIND_PACKAGE(SalomePyQt5 REQUIRED)
+    ENDIF()
     # Qwt
     FIND_PACKAGE(SalomeQwt REQUIRED)
   ELSE(EXISTS ${GUI_ROOT_DIR})
index c6e521fa147f1b266c6eacc34c3bb929149f8a26..918e28fb5081cf8d5c5b479a654c22be8d8f6b9c 100644 (file)
@@ -40,6 +40,7 @@
 
 #include <TopoDS_Shape.hxx>
 #include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
+#include <TopTools_ListOfShape.hxx>
 
 #include <map>
 #include <list>
@@ -53,7 +54,6 @@
 class SMESH_Gen;
 class SMESHDS_Document;
 class SMESH_Group;
-class TopTools_ListOfShape;
 class SMESH_subMesh;
 class SMESH_HypoFilter;
 class TopoDS_Solid;
index 023ddaa9239bbca18f9b8f77adf0c8e81ee822df..b3acd18ac98e08c4d317cf1d817b222180475513 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 # --- options ---
 # additional include directories
@@ -173,7 +173,7 @@ SET(SMESH_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
@@ -278,4 +278,4 @@ INSTALL(TARGETS SMESH EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INS
 
 INSTALL(FILES ${SMESH_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
 
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
index ad4453c1c749f7a27038896e64e2792daad9714f..c4de8a50729fdcbd0ab88554291c59dfe01e08fc 100644 (file)
@@ -575,7 +575,11 @@ QFrame* SMESHGUI_ComputeDlg::createMainFrame (QWidget* theParent, bool ForEval)
   myTable->hideColumn( COL_PUBLISHED );
   myTable->hideColumn( COL_SHAPEID );
   myTable->hideColumn( COL_BAD_MESH );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myTable->horizontalHeader()->setResizeMode( COL_ERROR, QHeaderView::Interactive );
+#else
+  myTable->horizontalHeader()->setSectionResizeMode( COL_ERROR, QHeaderView::Interactive );
+#endif
   myTable->setWordWrap( true );
   myTable->horizontalHeader()->setStretchLastSection( true );
   myTable->setMinimumWidth( 500 );
index c346e836e9ef2bc4e62003e6c834d8b6964f03a1..05d00338731ce65d25add9145c7a92325d96dd34 100755 (executable)
 #include <SMDS_Mesh.hxx>
 #include <SMDSAbs_ElementType.hxx>
 
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_Filter, VTKViewer_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter)
-
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
-
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
-
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
-
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_FacesFilter, SMESHGUI_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter)
-
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
-
-IMPLEMENT_STANDARD_HANDLE(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter)
-IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_Filter, VTKViewer_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter, SMESHGUI_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter, SMESHGUI_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter, SMESHGUI_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_FacesFilter, SMESHGUI_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter, SMESHGUI_Filter)
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter, SMESHGUI_Filter)
 
 /*
   Class       : SMESHGUI_PredicateFilter
index 235a0ef7633872918ffd776688e82d681e28dacf..ec36f46d6e76900d8eb64f3ccbe901e8eccdc21d 100755 (executable)
@@ -70,7 +70,7 @@ public:
   Standard_EXPORT virtual bool IsObjValid( const int ) const = 0;
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_Filter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_Filter,VTKViewer_Filter)
 };
 
 /*
@@ -99,7 +99,7 @@ private:
   SMESH::Predicate_var        myPred;
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_PredicateFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_PredicateFilter,SMESHGUI_Filter)
 };
 
 /*
@@ -121,7 +121,7 @@ public:
   Standard_EXPORT virtual bool IsNodeFilter() const;
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_QuadrangleFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_QuadrangleFilter,SMESHGUI_Filter)
 };
 
 /*
@@ -143,7 +143,7 @@ public:
   Standard_EXPORT virtual bool IsNodeFilter() const;  
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_TriangleFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_TriangleFilter,SMESHGUI_Filter)
 };
 
 /*
@@ -165,7 +165,7 @@ public:
   Standard_EXPORT virtual bool IsNodeFilter() const;  
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_FacesFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_FacesFilter,SMESHGUI_Filter)
 };
 
 /*
@@ -187,7 +187,7 @@ public:
   Standard_EXPORT virtual bool IsNodeFilter() const;
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_VolumesFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumesFilter,SMESHGUI_Filter)
 };
 
 /*
@@ -211,7 +211,7 @@ public:
   Standard_EXPORT static int GetId( SMDSAbs_GeometryType geom );
 
 public:
-  DEFINE_STANDARD_RTTI(SMESHGUI_VolumeShapeFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(SMESHGUI_VolumeShapeFilter,SMESHGUI_Filter)
 };
 
 #endif // SMESHGUI_FILTER_H
index 2f6c4e46256616f94fdb663af1c926f73c3302e8..f59609e07e126c88378898c065853758701f3ab7 100644 (file)
 // SALOME KERNEL includes
 #include <SALOMEDSClient_definitions.hxx>
 
+// GUI includes
+#include <SALOME_InteractiveObject.hxx>
+
 // IDL includes
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(GEOM_Gen)
 
 class SALOMEDSClient_SObject;
-class Handle_SALOME_InteractiveObject;
 class QString;
 
 namespace SMESH
@@ -53,7 +55,7 @@ namespace SMESH
 
   SMESHGUI_EXPORT GEOM::GEOM_Object_ptr GetSubShape( GEOM::GEOM_Object_ptr, long );
 
-  SMESHGUI_EXPORT bool GetGeomEntries( Handle_SALOME_InteractiveObject& hypIO,
+  SMESHGUI_EXPORT bool GetGeomEntries( Handle(SALOME_InteractiveObject)& hypIO,
                                        QString& subGeom, QString& meshGeom);
 }
 
index f3871d1733729484d047bc8851ab0d1969a15f6e..fae189aaa1bdc12365db80b69372e3e3f6de7832 100644 (file)
@@ -26,7 +26,6 @@
 #include <SMDS_Mesh.hxx>
 #include <SVTK_ViewWindow.h>
 
-#include <TColStd_MapOfInteger.hxx>
 #include <TColStd_MapIteratorOfMapOfInteger.hxx>
 
 #include <vtkActor2D.h>
index ff7e7db21edd9c39d505d0bc067b3e965105f733..6c72b1fd545d92d56d1f6b837e863842ef31c14a 100644 (file)
 #include <list>
 #include <vector>
 
+#include <TColStd_MapOfInteger.hxx>
+
 #include <gp_XYZ.hxx>
 
 class SALOME_Actor;
 class SMDS_Mesh;
 class SVTK_ViewWindow;
-class TColStd_MapOfInteger;
 class vtkActor2D;
 class vtkLabeledDataMapper;
 class vtkMaskPoints;
index 675aba3fff93a5f2640a49c22dd03780afdf0127..e5dcf5d12652d2c30cedecc2a71f252ebe94d4f5 100644 (file)
@@ -54,7 +54,6 @@
 #include <SALOME_ListIO.hxx>
 
 // OCCT includes
-#include <TColStd_MapOfInteger.hxx>
 #include <TColStd_MapIteratorOfMapOfInteger.hxx>
 
 // IDL includes
index b18e1b38bc692caf989926bd78e8088aba8aa3ef..5e827abc84198e250aca314d5d6614c615cdc3ef 100644 (file)
@@ -35,6 +35,7 @@
 
 // OCCT includes
 #include <gp_XYZ.hxx>
+#include <TColStd_MapOfInteger.hxx>
 
 // STL includes
 #include <list>
@@ -59,7 +60,6 @@ class SMESHGUI_SpinBox;
 class SMESH_Actor;
 class SUIT_SelectionFilter;
 class SVTK_Selector;
-class TColStd_MapOfInteger;
 
 namespace SMESH
 {
index 27b0c85d1e5870f6daadd9341515a6da59043e99..b0b1a6ed772207ba78b156d1b00dfe5e80f94260 100644 (file)
@@ -1650,7 +1650,11 @@ SMESHGUI_TreeElemInfo::SMESHGUI_TreeElemInfo( QWidget* parent )
   myInfo->setColumnCount( 2 );
   myInfo->setHeaderLabels( QStringList() << tr( "PROPERTY" ) << tr( "VALUE" ) );
   myInfo->header()->setStretchLastSection( true );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   myInfo->header()->setResizeMode( 0, QHeaderView::ResizeToContents );
+#else
+  myInfo->header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+#endif
   myInfo->setItemDelegate( new ItemDelegate( myInfo ) );
   QVBoxLayout* l = new QVBoxLayout( frame() );
   l->setMargin( 0 );
@@ -2343,7 +2347,11 @@ SMESHGUI_AddInfo::SMESHGUI_AddInfo( QWidget* parent )
 {
   setColumnCount( 2 );
   header()->setStretchLastSection( true );
+#if QT_VERSION < QT_VERSION_CHECK(5, 0, 0)
   header()->setResizeMode( 0, QHeaderView::ResizeToContents );
+#else
+  header()->setSectionResizeMode( 0, QHeaderView::ResizeToContents );
+#endif
   header()->hide();
 }
 
index 3ad9764e8caa81ec80125c0e69188322055fa61f..b60a88c07502dfec364f311296777b307cbe0ff0 100644 (file)
 #include <SALOMEconfig.h>
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 
+// OCCT includes
+#include <TColStd_MapOfInteger.hxx>
+
 class SUIT_SelectionFilter;
-class TColStd_MapOfInteger;
 class SVTK_ViewWindow;
 class SVTK_Selector;
 class SMESH_Actor;
index 323c9c154e40869b1e41447bac63a9ee652b5815..b79e6955efc810b1e126e41ef76868eb4a446261 100644 (file)
@@ -72,7 +72,6 @@
 #include <vtkUnstructuredGrid.h>
 
 // OCCT includes
-#include <TColStd_IndexedMapOfInteger.hxx>
 #include <Standard_ErrorHandler.hxx>
 
 namespace SMESH
index ffce8af75fb18fc868ada9a99b466e8aed76e865..b1159bd139ede160bfcaf7dff4b1451f8a89603b 100644 (file)
@@ -40,7 +40,8 @@
 #include <SALOME_InteractiveObject.hxx>
 #include <VTKViewer_Filter.h>
 
-class TColStd_IndexedMapOfInteger;
+// OCCT includes
+#include <TColStd_IndexedMapOfInteger.hxx>
 
 class SALOMEDSClient_Study;
 
index a9ad04af523c96f0c8f9f26c5025c397276fb4af..1776f3dd4f4227e4e7658b819572f742819ab786 100644 (file)
@@ -584,7 +584,7 @@ bool SMESH_ElementSearcherImpl::getIntersParamOnLine(const gp_Lin&           lin
   {
     GC_MakeSegment edge( SMESH_TNodeXYZ( face->GetNode( i )),
                          SMESH_TNodeXYZ( face->GetNode( (i+1)%nbNodes) ));
-    anExtCC.Init( lineCurve, edge);
+    anExtCC.Init( lineCurve, edge.Value() );
     if ( anExtCC.NbExtrema() > 0 && anExtCC.LowerDistance() <= tol)
     {
       Quantity_Parameter pl, pe;
index 0344eb9049270b464dce48af92059b5db9557105..e6a75758389dc35bd44de7de90fc6a5c63fa449c 100644 (file)
 #include <unistd.h>
 #endif
 
-
-IMPLEMENT_STANDARD_HANDLE (_pyObject          ,Standard_Transient);
-IMPLEMENT_STANDARD_HANDLE (_pyCommand         ,Standard_Transient);
-IMPLEMENT_STANDARD_HANDLE (_pyHypothesisReader,Standard_Transient);
-IMPLEMENT_STANDARD_HANDLE (_pyGen             ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pyMesh            ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pySubMesh         ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pyMeshEditor      ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pyHypothesis      ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pySelfEraser      ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pyGroup           ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pyFilter          ,_pyObject);
-IMPLEMENT_STANDARD_HANDLE (_pyAlgorithm       ,_pyHypothesis);
-IMPLEMENT_STANDARD_HANDLE (_pyComplexParamHypo,_pyHypothesis);
-IMPLEMENT_STANDARD_HANDLE (_pyNumberOfSegmentsHyp,_pyHypothesis);
-
-IMPLEMENT_STANDARD_RTTIEXT(_pyObject          ,Standard_Transient);
-IMPLEMENT_STANDARD_RTTIEXT(_pyCommand         ,Standard_Transient);
-IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient);
-IMPLEMENT_STANDARD_RTTIEXT(_pyGen             ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pyMesh            ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pySubMesh         ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pyMeshEditor      ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesis      ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pySelfEraser      ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pyGroup           ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pyFilter          ,_pyObject);
-IMPLEMENT_STANDARD_RTTIEXT(_pyAlgorithm       ,_pyHypothesis);
-IMPLEMENT_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis);
-IMPLEMENT_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis);
-IMPLEMENT_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis);
-IMPLEMENT_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyObject          ,Standard_Transient);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyCommand         ,Standard_Transient);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyGen             ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyMesh            ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySubMesh         ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyMeshEditor      ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyHypothesis      ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySelfEraser      ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyGroup           ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyFilter          ,_pyObject);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyAlgorithm       ,_pyHypothesis);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis);
+OCCT_IMPLEMENT_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis);
 
 using namespace std;
 using SMESH::TPythonDump;
@@ -1529,9 +1513,10 @@ _pyID _pyGen::GenerateNewID( const _pyID& theID )
   }
   while ( myObjectNames.IsBound( aNewID ) );
 
-  myObjectNames.Bind( aNewID, myObjectNames.IsBound( theID )
-                      ? (myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 ))
-                      : _pyID( "A" ) + aNewID );
+  if ( myObjectNames.IsBound( theID ) )
+    myObjectNames.Bind( aNewID, ( myObjectNames.Find( theID ) + _pyID( "_" ) + _pyID( index-1 ) ) );
+  else
+    myObjectNames.Bind( aNewID, ( _pyID( "A" ) + aNewID ) );
   return aNewID;
 }
 
@@ -1577,8 +1562,11 @@ void _pyGen::CheckObjectIsReCreated( Handle(_pyObject)& theObj )
     return;
 
   const bool isHyp = theObj->IsKind( STANDARD_TYPE( _pyHypothesis ));
-  Handle(_pyObject) existing =
-    isHyp ? FindHyp( theObj->GetID() ) : FindObject( theObj->GetID() );
+  Handle(_pyObject) existing;
+  if( isHyp )
+    existing = Handle(_pyObject)::DownCast( FindHyp( theObj->GetID() ) );
+  else
+    existing = FindObject( theObj->GetID() );
   if ( !existing.IsNull() && existing != theObj )
   {
     existing->SetRemovedFromStudy( true );
@@ -1636,7 +1624,7 @@ Handle(_pyObject) _pyGen::FindObject( const _pyID& theObjID )  const
   {
     map< _pyID, Handle(_pyMesh) >::const_iterator id_obj = myMeshes.find( theObjID );
     if ( id_obj != myMeshes.end() )
-      return id_obj->second;
+      return Handle(_pyObject)::DownCast( id_obj->second );
   }
   // {
   //   map< _pyID, Handle(_pyMeshEditor) >::const_iterator id_obj = myMeshEditors.find( theObjID );
index b9c6dfc2273fc7eedafc63f72c501e62b6f5ebad..a24b40d7a592568bebc72b486d2b326652f82e96 100644 (file)
 #include <TCollection_AsciiString.hxx>
 #include <TColStd_SequenceOfAsciiString.hxx>
 #include <TColStd_SequenceOfInteger.hxx>
+#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
 
 #include <list>
 #include <map>
 #include <vector>
 #include <set>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <SALOMEconfig.h>
 #include CORBA_CLIENT_HEADER(SALOMEDS)
 
@@ -58,8 +61,6 @@
  */
 // ===========================================================================================
 
-class Resource_DataMapOfAsciiStringAsciiString;
-
 // ===========================================================================================
 // =====================
 //    INTERNAL STUFF
@@ -159,7 +160,7 @@ public:
 
   bool AddAccessorMethod( _pyID theObjectID, const char* theAcsMethod );
 
-  DEFINE_STANDARD_RTTI (_pyCommand)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyCommand,Standard_Transient)
 };
 
 // -------------------------------------------------------------------------------------
@@ -199,7 +200,7 @@ public:
   virtual void ClearCommands();
   virtual void Free() {}
 
-  DEFINE_STANDARD_RTTI (_pyObject)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyObject,Standard_Transient)
 };
 
 // -------------------------------------------------------------------------------------
@@ -330,7 +331,7 @@ private:
   std::map< _AString, ExportedMeshData >    myFile2ExportedMesh;
   Handle( _pyHypothesisReader )             myHypReader;
 
-  DEFINE_STANDARD_RTTI (_pyGen)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyGen,_pyObject)
 };
 
 // -------------------------------------------------------------------------------------
@@ -371,7 +372,7 @@ private:
   static void AddMeshAccess( const Handle(_pyCommand)& theCommand )
   { theCommand->SetObject( theCommand->GetObject() + "." _pyMesh_ACCESS_METHOD ); }
 
-  DEFINE_STANDARD_RTTI (_pyMesh)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject)
 };
 #undef _pyMesh_ACCESS_METHOD 
 
@@ -391,7 +392,7 @@ public:
   virtual void Flush() {}
   virtual bool CanClear();
 
-  DEFINE_STANDARD_RTTI (_pyMesh)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyMesh,_pyObject)
 };
 
 // -------------------------------------------------------------------------------------
@@ -475,7 +476,7 @@ public:
   //void ComputeSaved    ( const Handle(_pyCommand)& theComputeCommand );
 
 
-  DEFINE_STANDARD_RTTI (_pyHypothesis)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyHypothesis,_pyObject)
 };
 
 // -------------------------------------------------------------------------------------
@@ -492,7 +493,7 @@ public:
   virtual const char* AccessorMethod() const { return "GetAlgorithm()"; }
   virtual bool IsWrappable(const _pyID& theMesh) { return !myIsWrapped; }
 
-  DEFINE_STANDARD_RTTI (_pyAlgorithm)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyAlgorithm,_pyHypothesis)
 };
 
 // -------------------------------------------------------------------------------------
@@ -507,7 +508,7 @@ public:
   virtual void Process( const Handle(_pyCommand)& theCommand);
   virtual void Flush();
 
-  DEFINE_STANDARD_RTTI (_pyComplexParamHypo)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyComplexParamHypo,_pyHypothesis)
 };
 DEFINE_STANDARD_HANDLE (_pyComplexParamHypo, _pyHypothesis);
 
@@ -529,7 +530,7 @@ public:
                                   const _pyID&              theMesh);
   virtual void Free() { my1dHyp.Nullify(); }
 
-  DEFINE_STANDARD_RTTI (_pyLayerDistributionHypo)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyLayerDistributionHypo,_pyHypothesis)
 };
 DEFINE_STANDARD_HANDLE (_pyLayerDistributionHypo, _pyHypothesis);
 
@@ -546,7 +547,7 @@ public:
                                   const _pyID&              theMesh);
   void Flush();
 
-  DEFINE_STANDARD_RTTI (_pyNumberOfSegmentsHyp)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyNumberOfSegmentsHyp,_pyHypothesis)
 };
 DEFINE_STANDARD_HANDLE (_pyNumberOfSegmentsHyp, _pyHypothesis);
 
@@ -561,7 +562,7 @@ public:
   _pySegmentLengthAroundVertexHyp(const Handle(_pyCommand)& theCrCmd): _pyHypothesis(theCrCmd) {}
   virtual bool Addition2Creation( const Handle(_pyCommand)& theAdditionCmd,
                                   const _pyID&              theMesh);
-  DEFINE_STANDARD_RTTI (_pySegmentLengthAroundVertexHyp)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pySegmentLengthAroundVertexHyp,_pyHypothesis)
 };
 DEFINE_STANDARD_HANDLE (_pySegmentLengthAroundVertexHyp, _pyHypothesis);
 
@@ -580,7 +581,7 @@ public:
   virtual bool CanClear();
   static bool IsAliveCmd( const Handle(_pyCommand)& theCmd );
 
-  DEFINE_STANDARD_RTTI (_pySelfEraser)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pySelfEraser,_pyObject)
 };
 DEFINE_STANDARD_HANDLE (_pySelfEraser, _pyObject);
 
@@ -602,7 +603,7 @@ public:
   void SetCreator( const Handle(_pyObject)& theCreator ) { myCreator = theCreator; }
   static bool CanBeArgOfMethod(const _AString& theMethodName);
 
-  DEFINE_STANDARD_RTTI (_pySubMesh)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pySubMesh,_pyObject)
 };
 // -------------------------------------------------------------------------------------
 /*!
@@ -622,7 +623,7 @@ public:
   //virtual void Free() { myUsers.clear(); }
   const _pyID& GetNewID() const { return myNewID; }
 
-  DEFINE_STANDARD_RTTI (_pyFilter)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyFilter,_pyObject)
 };
 DEFINE_STANDARD_HANDLE (_pyFilter, _pyObject);
 
@@ -643,7 +644,7 @@ public:
   virtual bool CanClear();
   void RemovedWithContents();
 
-  DEFINE_STANDARD_RTTI (_pyGroup)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyGroup,_pySubMesh)
 };
 
 // -------------------------------------------------------------------------------------
@@ -658,7 +659,7 @@ public:
   _pyHypothesisReader();
   Handle(_pyHypothesis) GetHypothesis(const _AString&           hypType,
                                       const Handle(_pyCommand)& creationCmd) const;
-  DEFINE_STANDARD_RTTI (_pyHypothesisReader)
+  OCCT_DEFINE_STANDARD_RTTIEXT(_pyHypothesisReader,Standard_Transient)
 };
 
 #endif
index 016a2f84bb934df9cd6458cf58a74a55ea232c68..d26f37dd7de962d44fe298b6af5b64b25f3c8ac8 100644 (file)
@@ -40,6 +40,8 @@
 #include <SALOMEDS_wrap.hxx>
 #include <GEOM_wrap.hxx>
 
+#include <Basics_OCCTVersion.hxx>
+
 #include <BRep_Tool.hxx>
 #include <Geom_CylindricalSurface.hxx>
 #include <Geom_Plane.hxx>
@@ -3913,6 +3915,7 @@ CORBA::Boolean FilterLibrary_i::Save()
   if ( myFileName == 0 || strlen( myFileName ) == 0 )
     return false;
 
+#if OCC_VERSION_MAJOR < 7
   FILE* aOutFile = fopen( myFileName, "wt" );
   if ( !aOutFile )
     return false;
@@ -3921,6 +3924,17 @@ CORBA::Boolean FilterLibrary_i::Save()
   aWriter.SetIndentation( 2 );
   aWriter << myDoc;
   fclose( aOutFile );
+#else
+  std::filebuf fb;
+  fb.open( myFileName, std::ios::out );
+
+  Standard_OStream os( &fb );
+
+  LDOM_XmlWriter aWriter;
+  aWriter.SetIndentation( 2 );
+  aWriter.Write( os, myDoc );
+  fb.close();
+#endif
 
   TPythonDump()<<this<<".Save()";
   return true;
index 65f832e8bc926a64d880d02119529b6d1a51e51a..725ea1c49493ba4c45651064841ffa8aa626a681 100644 (file)
@@ -32,6 +32,7 @@
 #include CORBA_SERVER_HEADER(SALOMEDS)
 
 #include <TCollection_AsciiString.hxx>
+#include <Resource_DataMapOfAsciiStringAsciiString.hxx>
 
 #include <sstream>
 #include <vector>
@@ -40,7 +41,6 @@
 
 class SMESH_Gen_i;
 class SMESH_MeshEditor_i;
-class Resource_DataMapOfAsciiStringAsciiString;
 
 // ===========================================================================================
 /*!
index adbeb5021b88d5a77407593c25436a747905f983..ccd11a0eca135bed908bdb0808639d617927fb52 100644 (file)
@@ -1369,7 +1369,11 @@ namespace
     }
     if ( surf->IsKind( STANDARD_TYPE(Geom_BSplineSurface )) ||
          surf->IsKind( STANDARD_TYPE(Geom_BezierSurface )))
+#if OCC_VERSION_MAJOR < 7
       if ( !noSafeTShapes.insert((const Standard_Transient*) _face.TShape() ).second )
+#else
+      if ( !noSafeTShapes.insert( _face.TShape().get() ).second )
+#endif
         isSafe = false;
 
     double f, l;
@@ -1409,7 +1413,11 @@ namespace
             edgeIsSafe = false;
         }
       }
+#if OCC_VERSION_MAJOR < 7
       if ( !edgeIsSafe && !noSafeTShapes.insert((const Standard_Transient*) e.TShape() ).second )
+#else
+      if ( !edgeIsSafe && !noSafeTShapes.insert( _face.TShape().get() ).second )
+#endif
         isSafe = false;
     }
     return isSafe;
index edc45176aa8ee8f1bf094798d1d4efe22c6357a7..f1f26aebf554d577f7bf27457f24cef0c0bb8e98 100644 (file)
@@ -36,6 +36,7 @@
 #endif
 
 #include <Standard_Failure.hxx>
+#include <Expr_NamedUnknown.hxx>
 
 #ifdef NO_CAS_CATCH
 #include <Standard_ErrorHandler.hxx>
index 95ccf7869c81a024ebada3fbe6f5e2901070cd9a..dc42ed22f24068e44835f8308ece6c271cdba7e6 100644 (file)
@@ -33,6 +33,8 @@
 #include "SMDS_MeshElement.hxx"
 
 #include <TopTools_DataMapOfShapeShape.hxx>
+#include <TopTools_IndexedMapOfShape.hxx>
+#include <TopTools_IndexedDataMapOfShapeListOfShape.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Face.hxx>
 #include <TopoDS_Vertex.hxx>
@@ -47,8 +49,6 @@ class SMESH_Algo;
 class SMESH_Hypothesis;
 class SMESH_Mesh;
 class SMESH_subMesh;
-class TopTools_IndexedDataMapOfShapeListOfShape;
-class TopTools_IndexedMapOfShape;
 class TopoDS_Shape;
 
 /*!
index b6435755bfcafc07ede23f7b8f65ea3235746479..3f7f273c1d2291c44be43dca8767480efd42836c 100644 (file)
 
 #include "SMESH_ProxyMesh.hxx"
 
+#include <TColgp_Array1OfPnt.hxx>
+#include <TColgp_Array1OfVec.hxx>
+
 class SMESH_Mesh;
 class SMESH_ElementSearcher;
 class SMDS_MeshElement;
 class SMDS_MeshNode;
 class SMDS_MeshFace;
-class TColgp_Array1OfPnt;
-class TColgp_Array1OfVec;
 class gp_Pnt;
 class gp_Vec;
 
index f4beaf1aff652705606d7b77d3732123597152e2..1b390d361f1d5083aaa92e7b755d231b327f5e5b 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UseQt4Ext)
+INCLUDE(UseQtExt)
 
 # --- options ---
 # additional include directories
@@ -101,7 +101,7 @@ SET(StdMeshersGUI_HEADERS ${_moc_HEADERS} ${_other_HEADERS})
 # --- sources ---
 
 # sources / moc wrappings
-QT4_WRAP_CPP(_moc_SOURCES ${_moc_HEADERS})
+QT_WRAP_MOC(_moc_SOURCES ${_moc_HEADERS})
 
 # sources / static
 SET(_other_SOURCES
@@ -145,4 +145,4 @@ TARGET_LINK_LIBRARIES(StdMeshersGUI ${_link_LIBRARIES} )
 INSTALL(TARGETS StdMeshersGUI EXPORT ${PROJECT_NAME}TargetGroup DESTINATION ${SALOME_INSTALL_LIBS})
 
 INSTALL(FILES ${StdMeshersGUI_HEADERS} DESTINATION ${SALOME_INSTALL_HEADERS})
-QT4_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
+QT_INSTALL_TS_RESOURCES("${_ts_RESOURCES}" "${SALOME_SMESH_INSTALL_RES_DATA}")
index 0750bc3f2554220084174991a2716dd987b65f01..50a2d05c94f9c374e55212421bfd2265eacfa91e 100644 (file)
@@ -20,7 +20,7 @@ IF(SALOME_BUILD_DOC)
   ADD_SUBDIRECTORY(doc)
 ENDIF(SALOME_BUILD_DOC)
 
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
 
 # --- scripts ---
 
@@ -40,7 +40,7 @@ SET(_pyuic_files
 )
 
 # scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 # --- rules ---
 
index b51f9ebc64394eb74578b7da7c8237590f2b7d83..d96c8b1a48ba96dc5f586d4dc49c740ba7f410d4 100644 (file)
@@ -25,8 +25,7 @@ import os, subprocess
 import tempfile
 from MGCleanerPlugDialog_ui import Ui_MGCleanerPlugDialog
 from MGCleanerMonViewText import MGCleanerMonViewText
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
+from qtsalome import *
 
 
 class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
@@ -106,28 +105,28 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     self.clean()
 
   def connecterSignaux(self) :
-    self.connect(self.PB_Cancel,SIGNAL("clicked()"),self.PBCancelPressed)
-    self.connect(self.PB_Default,SIGNAL("clicked()"),self.clean)
-    self.connect(self.PB_Help,SIGNAL("clicked()"),self.PBHelpPressed)
-    self.connect(self.PB_OK,SIGNAL("clicked()"),self.PBOKPressed)
+    self.PB_Cancel.clicked.connect(self.PBCancelPressed)
+    self.PB_Default.clicked.connect(self.clean)
+    self.PB_Help.clicked.connect(self.PBHelpPressed)
+    self.PB_OK.clicked.connect(self.PBOKPressed)
     
-    self.connect(self.PB_Load,SIGNAL("clicked()"),self.PBLoadPressed)
-    self.connect(self.PB_Save,SIGNAL("clicked()"),self.PBSavePressed)
-    self.connect(self.PB_LoadHyp,SIGNAL("clicked()"),self.PBLoadHypPressed)
-    self.connect(self.PB_SaveHyp,SIGNAL("clicked()"),self.PBSaveHypPressed)
+    self.PB_Load.clicked.connect(self.PBLoadPressed)
+    self.PB_Save.clicked.connect(self.PBSavePressed)
+    self.PB_LoadHyp.clicked.connect(self.PBLoadHypPressed)
+    self.PB_SaveHyp.clicked.connect(self.PBSaveHypPressed)
     
-    self.connect(self.PB_MeshFile,SIGNAL("clicked()"),self.PBMeshFilePressed)
-    self.connect(self.PB_MeshSmesh,SIGNAL("clicked()"),self.PBMeshSmeshPressed)
-    self.connect(self.LE_MeshSmesh,SIGNAL("returnPressed()"),self.meshSmeshNameChanged)
-    self.connect(self.PB_ParamsFileExplorer,SIGNAL("clicked()"),self.setParamsFileName)
-    self.connect(self.LE_MeshFile,SIGNAL("returnPressed()"),self.meshFileNameChanged)
-    self.connect(self.LE_ParamsFile,SIGNAL("returnPressed()"),self.paramsFileNameChanged)
+    self.PB_MeshFile.clicked.connect(self.PBMeshFilePressed)
+    self.PB_MeshSmesh.clicked.connect(self.PBMeshSmeshPressed)
+    self.LE_MeshSmesh.returnPressed.connect(self.meshSmeshNameChanged)
+    self.PB_ParamsFileExplorer.clicked.connect(self.setParamsFileName)
+    self.LE_MeshFile.returnPressed.connect(self.meshFileNameChanged)
+    self.LE_ParamsFile.returnPressed.connect(self.paramsFileNameChanged)
 
     #QtCore.QObject.connect(self.checkBox, QtCore.SIGNAL("stateChanged(int)"), self.change) 
-    self.connect(self.CB_FillHoles,SIGNAL("stateChanged(int)"),self.SP_MinHoleSize.setEnabled)
-    self.connect(self.CB_ComputedToleranceDisplacement,SIGNAL("stateChanged(int)"),self.SP_ToleranceDisplacement.setDisabled)
-    self.connect(self.CB_ComputedResolutionLength,SIGNAL("stateChanged(int)"),self.SP_ResolutionLength.setDisabled)
-    self.connect(self.CB_ComputedOverlapDistance,SIGNAL("stateChanged(int)"),self.SP_OverlapDistance.setDisabled)
+    self.CB_FillHoles.stateChanged[int].connect(self.SP_MinHoleSize.setEnabled)
+    self.CB_ComputedToleranceDisplacement.stateChanged[int].connect(self.SP_ToleranceDisplacement.setDisabled)
+    self.CB_ComputedResolutionLength.stateChanged[int].connect(self.SP_ResolutionLength.setDisabled)
+    self.CB_ComputedOverlapDistance.stateChanged[int].connect(self.SP_OverlapDistance.setDisabled)
 
   def PBHelpPressed(self):
     import SalomePyQt
@@ -407,7 +406,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     if fd.exec_():
       infile = fd.selectedFiles()[0]
       self.LE_MeshFile.setText(infile)
-      self.fichierIn=infile.toLatin1()
+      self.fichierIn=unicode(infile).encode("latin-1")
       self.MeshIn=""
       self.LE_MeshSmesh.setText("")
 
@@ -416,7 +415,7 @@ class MGCleanerMonPlugDialog(Ui_MGCleanerPlugDialog,QWidget):
     if fd.exec_():
       infile = fd.selectedFiles()[0]
       self.LE_ParamsFile.setText(infile)
-      self.paramsFile=infile.toLatin1()
+      self.paramsFile=unicode(infile).encode("latin-1")
 
   def meshFileNameChanged(self):
     self.fichierIn=str(self.LE_MeshFile.text())
@@ -598,10 +597,9 @@ def TEST_standalone():
 #
 def TEST_MGCleanerMonPlugDialog():
   import sys
-  from PyQt4.QtGui import QApplication
-  from PyQt4.QtCore import QObject, SIGNAL, SLOT
+  from qtsalome import QApplication
   app = QApplication(sys.argv)
-  QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+  app.lastWindowClosed.connect(app.quit)
 
   dlg=MGCleanerMonPlugDialog()
   dlg.show()
index e4030cc4443127f611517c2ca610582eb373e8f6..a8dafeed46c1e4f8ce3403ba9ccbd6048676bf98 100644 (file)
@@ -23,9 +23,7 @@ import string,types,os,sys
 import tempfile
 import traceback
 
-from PyQt4 import *
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
+from qtsalome import *
 
 # Import des panels
 
@@ -40,14 +38,14 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog):
         self.setupUi(self)
         self.resize( QSize(1000,600).expandedTo(self.minimumSizeHint()) )
         #self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") )
-        self.connect( self.PB_Ok,SIGNAL("clicked()"), self.theClose )
-        self.connect( self.PB_Save,SIGNAL("clicked()"), self.saveFile )
+        self.PB_Ok.clicked.connect( self.theClose )
+        self.PB_Save.clicked.connect( self.saveFile )
         self.PB_Save.setToolTip("Save trace in log file")
         self.PB_Ok.setToolTip("Close view")
         self.monExe=QProcess(self)
 
-        self.connect(self.monExe, SIGNAL("readyReadStandardOutput()"), self.readFromStdOut )
-        self.connect(self.monExe, SIGNAL("readyReadStandardError()"), self.readFromStdErr )
+        self.monExe.readyReadStandardOutput.connect( self.readFromStdOut )
+        self.monExe.readyReadStandardError.connect( self.readFromStdErr )
       
         # Je n arrive pas a utiliser le setEnvironment du QProcess
         # fonctionne hors Salome mais pas dans Salome ???
@@ -107,11 +105,11 @@ class MGCleanerMonViewText(Ui_ViewExe, QDialog):
 
     def readFromStdErr(self):
         a=self.monExe.readAllStandardError()
-        self.TB_Exe.append(QString.fromUtf8(a.data(),len(a)))
+        self.TB_Exe.append(unicode(a.data()))
 
     def readFromStdOut(self) :
         a=self.monExe.readAllStandardOutput()
-        aa=QString.fromUtf8(a.data(),len(a))
+        aa=unicode(a.data())
         self.TB_Exe.append(aa)
         if "END_OF_MGCleaner" in aa:
           self.parent().enregistreResultat()
index 9b356cece2abef1579bc11519c99dc05f4684426..f1132f396de88c97b4860043c76372f138b80dad 100644 (file)
@@ -30,10 +30,7 @@ def MGCleanerLct(context):
   import os
   import subprocess
   import tempfile
-  from PyQt4 import QtCore
-  from PyQt4 import QtGui
-  from PyQt4.QtGui import QFileDialog
-  from PyQt4.QtGui import QMessageBox
+  from qtsalome import QFileDialog, QMessageBox
   
   #prior test to avoid unnecessary user GUI work with ending crash
   try :
index 1744653857192edbba54859751a8bfa65b0c64d2..2125c0be1148379f53dceef605f0ff0e29f558d5 100644 (file)
@@ -18,7 +18,7 @@
 #
 
 IF(SALOME_BUILD_GUI)
-  INCLUDE(UsePyQt4)
+  INCLUDE(UsePyQt)
 ENDIF(SALOME_BUILD_GUI)
 
 # --- options ---
@@ -69,7 +69,7 @@ IF(SALOME_BUILD_GUI)
   )
 
   # scripts / pyuic wrappings
-  PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+  PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 ENDIF(SALOME_BUILD_GUI)
 
index 31793818bb8bc993052ab097a6c921f23eedfb40..c5abe768acb477e58d2a1bd835d11b71f7347623 100644 (file)
@@ -29,26 +29,20 @@ def MeshCut(context):
   import os
   import subprocess
   import tempfile
-  from PyQt4 import QtCore
-  from PyQt4 import QtGui
-  from PyQt4.QtGui import QFileDialog
-  from PyQt4.QtGui import QMessageBox
+  from qtsalome import QFileDialog, QMessageBox, QDialog
   from MeshCutDialog_ui import Ui_Dialog
   
-  class CutDialog(QtGui.QDialog):
+  class CutDialog(QDialog):
     
     def __init__(self):
-      QtGui.QDialog.__init__(self)
+      QDialog.__init__(self)
       # Set up the user interface from Designer.
       self.ui = Ui_Dialog()
       self.ui.setupUi(self)
       # Connect up the buttons.
-      self.connect(self.ui.pb_origMeshFile, QtCore.SIGNAL("clicked()"),
-                   self.setInputFile)
-      self.connect(self.ui.pb_cutMeshFile, QtCore.SIGNAL("clicked()"),
-                   self.setOutputFile)
-      self.connect(self.ui.pb_help, QtCore.SIGNAL("clicked()"),
-                   self.helpMessage)
+      self.ui.pb_origMeshFile.clicked.connect(self.setInputFile)
+      self.ui.pb_cutMeshFile.clicked.connect(self.setOutputFile)
+      self.ui.pb_help.clicked.connect(self.helpMessage)
       pass
     
     def setInputFile(self):
@@ -56,7 +50,7 @@ def MeshCut(context):
       if fd.exec_():
         infile = fd.selectedFiles()[0]
         self.ui.le_origMeshFile.setText(infile)
-        insplit = os.path.splitext(infile.toLocal8Bit().data())
+        insplit = os.path.splitext(unicode(infile).encode())
         outfile = insplit[0] + '_cut' + insplit[1]
         self.ui.le_cutMeshFile.setText(outfile)
       pass
@@ -103,11 +97,11 @@ and T the tolerance.
     if result:
       # dialog accepted
       args = ['MeshCut']
-      args += [window.ui.le_origMeshFile.text().toLocal8Bit().data()]
-      args += [window.ui.le_cutMeshFile.text().toLocal8Bit().data()]
-      args += [window.ui.le_outMeshName.text().toLocal8Bit().data()]
-      args += [window.ui.le_groupAbove.text().toLocal8Bit().data()]
-      args += [window.ui.le_groupBelow.text().toLocal8Bit().data()]
+      args += [unicode(window.ui.le_origMeshFile.text()).encode()]
+      args += [unicode(window.ui.le_cutMeshFile.text()).encode()]
+      args += [unicode(window.ui.le_outMeshName.text()).encode()]
+      args += [unicode(window.ui.le_groupAbove.text()).encode()]
+      args += [unicode(window.ui.le_groupBelow.text()).encode()]
       args += [str(window.ui.dsb_normX.value())]
       args += [str(window.ui.dsb_normY.value())]
       args += [str(window.ui.dsb_normZ.value())]
index a0e43fd238ceb8cb5caed451ad607033c803671e..8940e06f14131ff5479d3760d3402e59188c3a5d 100644 (file)
@@ -4,7 +4,7 @@ import os
 import datetime
 import sys
 
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableMaillages  import TableMaillages
 from tableMailleurs  import TableMailleurs
 from tableMachines   import TableMachines
@@ -23,7 +23,7 @@ from CreeDocuments.jobHtml       import Document
 
 class Base:
   def __init__(self,file):    
-       self.db  = QtSql.QSqlDatabase.addDatabase("QSQLITE")
+       self.db  = QSqlDatabase.addDatabase("QSQLITE")
        self.db.setDatabaseName(file)
        self.db.setHostName("localhost");
        self.db.setUserName("");
index 4560a2a6fa62ef15645f0ece82ec4e5481eafcf9..783e7ac7481c2ce301bac63870577df18aa78957 100755 (executable)
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
 
 import sys,os
-from PyQt4 import QtGui,QtCore
 
 pathRacine=os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)),'..'))
 if os.path.dirname(pathRacine) not in sys.path :
index 9c2370b44795d8abb282bba1c9c8e1cba594205f..9b4b1b7e2ab2862d9f3dc8ae90add4ea21b90864 100644 (file)
@@ -1,5 +1,4 @@
-from PyQt4 import QtSql, QtCore
-from PyQt4.QtSql import *
+from qtsalome import QSqlQuery
 import datetime
 
 class TableDeBase :
index b74d83b7de16f2fa88a7ca752bb9703b13c19531..707fff8ae439be54749e95ead7b2dce82b19adb0 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableGroupeRatios (TableDeBase):
@@ -8,7 +8,7 @@ class TableGroupeRatios (TableDeBase):
           self.setTypeField(('int','int','str','float','float','float','float','float','float'),('idMaillage','idVersion','Groupe'))
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
 
           texteQuery ="create table GroupesRatios(idMaillage int, idVersion int,  Groupe varchar(40),"
           texteQuery+="RatioMax float, RatioMin float, "
@@ -23,7 +23,7 @@ class TableGroupeRatios (TableDeBase):
           print "Creation de TableGroupeRatios : " , query.exec_(texteQuery)
 
       def getVal(self,idMaillage, idVersion, Groupe, Entite):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ='select '+ str(Entite) + ' from GroupesRatios where idMaillage='+str(idMaillage)
           texteQuery+=' and  idVersion='+str(idVersion)
           texteQuery+=" and Groupe='" + str(Groupe) +"';"
index 6c2763c2a813dab4c374eb04af9a027e2b4677fc..6f37bd70d51475081b8836f9dac75a080979e50a 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableGroupeTailles (TableDeBase):
@@ -8,7 +8,7 @@ class TableGroupeTailles (TableDeBase):
           self.setTypeField(('int','int','str','float','float','float','float','float','float'),('idMaillage','idVersion'))
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
 
           texteQuery ="create table GroupeTailles(idMaillage int, idVersion int, "
           texteQuery+="Groupe varchar(40),TailleMax float, TailleMin float, "
@@ -24,7 +24,7 @@ class TableGroupeTailles (TableDeBase):
           print "Creation de TableGroupeTailles : " , query.exec_(texteQuery)
 
       def getVal(self,idMaillage, idVersion, Groupe,  Entite):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ='select '+ str(Entite) + ' from GroupeTailles where idMaillage='+str(idMaillage)
           texteQuery+=' and  idVersion='+str(idVersion)
           texteQuery+=" and Groupe='" + str(Groupe) +"';"
index 9f0cca91860e2ca8d6a4d3557146a2f5558a72d0..a217909a944d33ad1fac8e8a9d0df2bdd63a6a27 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableGroupes (TableDeBase):
@@ -9,7 +9,7 @@ class TableGroupes (TableDeBase):
 
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
 
 
           texteQuery ="create table Groupes( nomGroupe varchar(40),idMaillage int, idVersion int,"
@@ -23,7 +23,7 @@ class TableGroupes (TableDeBase):
 
       def getVal(self,nomGroupe,idMaillage,idVersion,typeMaille):
           val=0                          # Valeur si l enregistrement n existe pas
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ='select NbEntite from Groupes  where nomGroupe ="' + nomGroupe +'"'
           texteQuery +=' and idMaillage=' + str(idMaillage)
           texteQuery +=' and idVersion = ' + str(idVersion)
@@ -37,7 +37,7 @@ class TableGroupes (TableDeBase):
 
 
       def getAllEntity(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ="select distinct Entite from Groupes;"
             query.exec_(texteQuery)
             maListe=[]
index 7155db6debf22f651ed97c2841f34ad53d021c63..3a0bfedfffd9e74d87e416a7ec2f8202dce708ff 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableGroupesRef (TableDeBase):
@@ -8,14 +8,14 @@ class TableGroupesRef (TableDeBase):
             self.setTypeField(('str','int'),('nomGroupe'))
 
         def createSqlTable(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ="create table GroupesRef(nomGroupe varchar(40), idMaillage int,"
             texteQuery+="foreign key (idMaillage) references Maillages(idMaillage),"
             texteQuery+="primary key (nomGroupe,idMaillage));"
             print "Creation de TableGroupesRef : " , query.exec_(texteQuery)
 
         def getVals(self,idMaillage):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ='select NomGroupe from GroupesRef where idMaillage='+str(idMaillage) +";"
             listeGroupes=[]
             query.exec_(texteQuery)
index 677d512c223ba1f212a2600ea37e3b68a95a6a85..f68927eac77bea157ee71e39c765bdc20d830e8e 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 import os
 
@@ -9,7 +9,7 @@ class TableMachines (TableDeBase):
             self.setTypeField(('str','str'),('nomMachine'))
 
         def createSqlTable(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             print "creation de TableMachine : ", query.exec_("create table Machines(  nomMachine varchar(10) primary key, os varchar(10));")
 
         def creeMachine(self):
@@ -18,7 +18,7 @@ class TableMachines (TableDeBase):
             self.insereLigne((nomMachine,nomOs))
 
         def chercheMachine(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             machine=os.uname()[1]
             texteQuery ="select nomMachine from Machines where nomMachine ='" + machine +"' ;"
             query.exec_(texteQuery)
index 6581dc025e16063eb03cdd031924ddd26d92fdf6..8dd5d8705073280e9bff2d541f6a89e0fd0e79d6 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableMaillages (TableDeBase):
@@ -9,7 +9,7 @@ class TableMaillages (TableDeBase):
             self.setTypeField(('int','str','str','str','int','int','int','int','int','int','str'),('id'))
 
         def createSqlTable(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ="create table Maillages(id integer primary key autoincrement, nomMaillage varchar(10), "
             texteQuery+="nomScript varchar(40), medResultat varchar(15), idMailleur int, dimension int,"
             texteQuery+="seuilCPU int, seuilRatio int, seuilTaille int, seuilNbMaille int, commentaire varchar(60), "
@@ -17,7 +17,7 @@ class TableMaillages (TableDeBase):
             print "creation de TableMaillages : " , query.exec_(texteQuery)
 
         def getVal(self,idMaillage, nomChamp):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             valeur=None
             texteQuery ='select '+ nomChamp + ' from Maillages  where id=' + str(idMaillage) + ";"
             query.exec_(texteQuery)
@@ -30,7 +30,7 @@ class TableMaillages (TableDeBase):
 
         def dejaRemplie(self):
             texteQuery="select * from  Maillages where medResultat='/tmp/tetra.med';"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             maQuery.exec_(texteQuery)
             nb=0
             while(maQuery.next()): nb=nb+1
@@ -44,7 +44,7 @@ class TableMaillages (TableDeBase):
 #            self.insereLigneAutoId(('Fiche_7957_AILETTE', '/home/H77945/CAS_TEST/MAILLEUR/FICHE_7957_AILETTE/Fiche_7957_AILETTE.py', '/tmp/Fiche_7957_AILETTE.med', 1,2,10,10,10,10, 'Maillage d une attache d aillette'))
         
         def construitListeMaillages(self):
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             texteQuery="select id, nomScript,medResultat from Maillages;"
             maQuery.exec_(texteQuery)
             listeMaillages=[]
@@ -54,7 +54,7 @@ class TableMaillages (TableDeBase):
            
         def verifieListeMaillages(self,listeMaillage):
             newListeMaillages=[]
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             for idM in listeMaillage:
                 texteQuery="select id, nomScript,medResultat from Maillages where id = " + str(idM) +';'
                 maQuery.exec_(texteQuery)
@@ -68,7 +68,7 @@ class TableMaillages (TableDeBase):
 
         def getSeuilsPourMaillage(self,idMaillage):
             texteQuery="select id,nomMaillage,seuilCPU,seuilRatio,seuilTaille,seuilNbMaille from  Maillages where id = "+ str(idMaillage) +"  ;"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             maQuery.exec_(texteQuery)
             while(maQuery.next()): 
                  l1 = maQuery.value(0).toInt()[0]
@@ -82,7 +82,7 @@ class TableMaillages (TableDeBase):
         def getTous(self):
             maillagesIdListe=[]; maillagesNomListe=[]
             texteQuery="select id,nomMaillage from  Maillages order by id;"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             maQuery.exec_(texteQuery)
             while(maQuery.next()):
                  maillagesIdListe.append( maQuery.value(0).toInt()[0])
@@ -91,7 +91,7 @@ class TableMaillages (TableDeBase):
 
         def getMailleurId(self,idMaillage):
             texteQuery="select idMailleur from  Maillages where id = "+ str(idMaillage) +"  ;"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             print texteQuery
             print maQuery.exec_(texteQuery)
             maQuery.exec_(texteQuery)
index 90ae30de42b651bd90e7d0aaaa1809f595a91307..caf72e128b4a75ec410ca3515b513d7e8ac3ae9c 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableMailles (TableDeBase):
@@ -9,7 +9,7 @@ class TableMailles (TableDeBase):
 
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
 
 
           texteQuery ="create table Mailles(idMaillage int, idVersion int,  Entite var(40), NbEntite int, "
@@ -21,7 +21,7 @@ class TableMailles (TableDeBase):
 
  
       def getVal(self,idMaillage, idVersion,  Entite):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ='select NbEntite from Mailles where idMaillage='+str(idMaillage) 
             texteQuery+=' and  idVersion='+str(idVersion) 
             texteQuery+=" and Entite='" + str(Entite)  +"';"
@@ -36,7 +36,7 @@ class TableMailles (TableDeBase):
 
 
       def getAllEntity(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ="select distinct Entite from Mailles;"
             query.exec_(texteQuery)
             maListe=[]
index d13d0332598b94d9b4231f143728a49c2f04b1b3..b301a245af0d266079ede20e4fc27951c3b4e93f 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableMailleurs (TableDeBase):
@@ -9,12 +9,12 @@ class TableMailleurs (TableDeBase):
             self.setTypeField(("int","str"),('id'))
 
         def createSqlTable(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             print "Creation de TableMailleurs", query.exec_("create table Mailleurs(id integer primary key autoincrement, nomMailleur varchar(40));")
 
         def dejaRemplie(self):
             texteQuery="select * from  Mailleurs where nomMailleur='Blsurf+Ghs3D';"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             maQuery.exec_(texteQuery)
             nb=0
             while(maQuery.next()): nb=nb+1
@@ -33,7 +33,7 @@ class TableMailleurs (TableDeBase):
         def insereLigneAutoId(self,valeurs,debug=False):
           # difficulte a construire le texte avec une seule valeur
           texteQuery='insert into  Mailleurs (nomMailleur) values ("'+ str(valeurs[0])+ '");'
-          maQuery=QtSql.QSqlQuery()
+          maQuery=QSqlQuery()
           if debug  : print texteQuery, " " , maQuery.exec_(texteQuery)
           else : maQuery.exec_(texteQuery) 
 
@@ -41,7 +41,7 @@ class TableMailleurs (TableDeBase):
             l1=[]
             l2=[]
             texteQuery="select * from  Mailleurs;"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             maQuery.exec_(texteQuery)
             while(maQuery.next()): 
                  l1.append( maQuery.value(0).toInt()[0])
@@ -50,7 +50,7 @@ class TableMailleurs (TableDeBase):
 
         def getName(self,mailleurId):
             texteQuery="select  nomMailleur from  Mailleurs where id = " + str(mailleurId) + " ;"
-            maQuery=QtSql.QSqlQuery()
+            maQuery=QSqlQuery()
             maQuery.exec_(texteQuery)
             while(maQuery.next()): 
                  mailleurName=maQuery.value(0).toString()
index 8707711d63b1f3ddbd514c499edf05f7947747ed..4955817eb888b29ba23949016cc648b210794931 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TablePerfs (TableDeBase):
@@ -8,7 +8,7 @@ class TablePerfs (TableDeBase):
           self.setTypeField(('int','int','str','int','int'),('idMaillage','idVersion','Machine'))
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ="create table Perfs(idMaillage int, idVersion int, Machine varchar(10),  NbCpu int, Mem int, "
           texteQuery+="foreign key (idMaillage) references Maillages(id)," 
           texteQuery+="foreign key (idVersion) references Versions(id)," 
@@ -18,7 +18,7 @@ class TablePerfs (TableDeBase):
           print "Creation de TablePerfs : " , query.exec_(texteQuery)
 
       def getVal(self,idMaillage,idVersion,Machine):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ='select NbCpu from Perfs  where idMaillage=' + str(idMaillage)
           texteQuery +=' and idVersion = ' + str(idVersion)
           texteQuery +=" and Machine ='"  + Machine + "';" 
index 843975a7e13fe48c8df3750c656bd1b09ab627da..85397abde3ecb28e04526233baf86e9b1536de87 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableRatios (TableDeBase):
@@ -8,7 +8,7 @@ class TableRatios (TableDeBase):
           self.setTypeField(('int','int','float','float','float','float','float','float'),('idMaillage','idVersion','Machine'))
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
 
           texteQuery ="create table Ratios(idMaillage int, idVersion int, "
           texteQuery+="RatioMax float, RatioMin float, "
@@ -23,7 +23,7 @@ class TableRatios (TableDeBase):
           print "Creation de TableRatios : " , query.exec_(texteQuery)
 
       def getVal(self,idMaillage, idVersion,  Entite):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ='select '+ str(Entite) + ' from Ratios where idMaillage='+str(idMaillage)
           texteQuery+=' and  idVersion='+str(idVersion)
           query.exec_(texteQuery)
index 559c5f23248e3bec58f2e5a9426302c6423c271b..6e9637f160aaab916a22c76d21daab42f6054d82 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableTailles (TableDeBase):
@@ -8,7 +8,7 @@ class TableTailles (TableDeBase):
           self.setTypeField(('int','int','str','float','float','float','float','float','float'),('idMaillage','idVersion'))
 
       def createSqlTable(self):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
 
           texteQuery ="create table Tailles(idMaillage int, idVersion int, "
           texteQuery+="TailleMax float, TailleMin float, "
@@ -23,7 +23,7 @@ class TableTailles (TableDeBase):
           print "Creation de TableTailles : " , query.exec_(texteQuery)
 
       def getVal(self,idMaillage, idVersion, Entite):
-          query=QtSql.QSqlQuery()
+          query=QSqlQuery()
           texteQuery ='select '+ str(Entite) + ' from Tailles where idMaillage='+str(idMaillage)
           texteQuery+=' and  idVersion='+str(idVersion)
           query.exec_(texteQuery)
index 01efb0b469c300556556b62dbfb2c7e666406ea6..0a2fbb85c059d935ea49cd62e4b044faf4b7df65 100644 (file)
@@ -1,4 +1,4 @@
-from PyQt4 import QtSql, QtCore
+from qtsalome import QSqlQuery
 from tableDeBase import TableDeBase
 
 class TableVersions (TableDeBase):
@@ -9,7 +9,7 @@ class TableVersions (TableDeBase):
             self.cols=" (nomVersion, commentaire) "
 
         def createSqlTable(self):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             texteQuery ="create table Versions(id integer primary key autoincrement, nomVersion varchar(10),"
             texteQuery+="commentaire varchar(30));"
             print "Creation de TableVersions : " , query.exec_(texteQuery)
@@ -25,9 +25,9 @@ class TableVersions (TableDeBase):
 
         
         def chercheVersion(self,version):
-            query=QtSql.QSqlQuery()
+            query=QSqlQuery()
             version=str(version)
-            if QtCore.QString(version).toInt()[1]==True :
+            if bool(version) == True :
                texteQuery ="select id, nomVersion from Versions where id = " + str(version) +";"
             else:
                texteQuery ="select id, nomVersion from Versions where nomVersion ='" + version +"' ;"
index 5f5d9ab4fc293b4fc1fc2ccc46f6f6e0df5dee0e..07c0275a1dedd07d5b0518c9b03f107e2527874c 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
 
 # --- scripts ---
 
@@ -44,7 +44,7 @@ SET(_pyuic_files
 )
 
 # scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 # --- rules ---
 
index 7ddf3fbc2c57c623362a2698a7627c0323dd8f7f..bc9e73e0232d86bfd41fffe667cdc5442556f8f4 100644 (file)
@@ -1,34 +1,32 @@
 from desFenetreChoix_ui import Ui_Choix
-from PyQt4  import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from qtsalome import *
 from monEditor import TableEditor
 
 # Import des panels
 
-class MaFenetreChoix(Ui_Choix ,QtGui.QDialog):
+class MaFenetreChoix(Ui_Choix ,QDialog):
   """
   """
   def __init__(self,db):
-      QtGui.QDialog.__init__(self)
+      QDialog.__init__(self)
       self.setModal(True)
       self.setupUi(self)
       self.db=db
       self.connecterSignaux()
 
   def connecterSignaux(self):
-      self.connect(self.PBMailleur,SIGNAL("clicked()"),self.MailleurPush)
-      self.connect(self.PBMaillage,SIGNAL("clicked()"),self.MaillagePush)
-      self.connect(self.PBVersion,SIGNAL("clicked()"),self.VersionPush)
-      self.connect(self.PBMachine,SIGNAL("clicked()"),self.MachinePush)
-      self.connect(self.PBGroupe,SIGNAL("clicked()"),self.GroupePush)
-      self.connect(self.PBRatio,SIGNAL("clicked()"),self.RatioPush)
-      self.connect(self.PBGroupeRatio,SIGNAL("clicked()"),self.GroupeRatioPush)
-      self.connect(self.PBGroupeTaille,SIGNAL("clicked()"),self.GroupeTaillePush)
-      self.connect(self.PBPerf,SIGNAL("clicked()"),self.PerfPush)
-      self.connect(self.PBMaille,SIGNAL("clicked()"),self.MaillePush)
-      self.connect(self.PBTaille,SIGNAL("clicked()"),self.TaillePush)
-      self.connect(self.PBGroupesRef,SIGNAL("clicked()"),self.GroupesRefPush)
+      self.PBMailleur.clicked.connect(self.MailleurPush)
+      self.PBMaillage.clicked.connect(self.MaillagePush)
+      self.PBVersion.clicked.connect(self.VersionPush)
+      self.PBMachine.clicked.connect(self.MachinePush)
+      self.PBGroupe.clicked.connect(self.GroupePush)
+      self.PBRatio.clicked.connect(self.RatioPush)
+      self.PBGroupeRatio.clicked.connect(self.GroupeRatioPush)
+      self.PBGroupeTaille.clicked.connect(self.GroupeTaillePush)
+      self.PBPerf.clicked.connect(self.PerfPush)
+      self.PBMaille.clicked.connect(self.MaillePush)
+      self.PBTaille.clicked.connect(self.TaillePush)
+      self.PBGroupesRef.clicked.connect(self.GroupesRefPush)
 
   def MailleurPush(self):
       editor=TableEditor(self.db.maTableMailleurs,self)
index 127ad7777de462739948ba582d37b4985e776fdb..ecfd4fe4449d8cf2fbc27cdce08c5acdf77cfb12 100644 (file)
@@ -1,7 +1,4 @@
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-from PyQt4.QtSql import *
-
+from qtsalome import *
 
 class TableEditor(QDialog):
 
@@ -20,7 +17,7 @@ class TableEditor(QDialog):
          quitButton=QPushButton("Quit")
          buttonBox=QDialogButtonBox(Qt.Vertical)
          buttonBox.addButton(quitButton, QDialogButtonBox.RejectRole);
-         self.connect(quitButton, SIGNAL("clicked()"), self, SLOT("close()"))
+         quitButton.clicked.connect(self.close())
 
          mainLayout = QHBoxLayout(self)
          mainLayout.addWidget(self.view)
@@ -33,11 +30,11 @@ class TableEditor(QDialog):
          self.view.resizeColumnsToContents()
          self.view.adjustSize()
          self.adjustSize()
-         self.connect(self.view,SIGNAL("pressed(QModelIndex*)"),self.donneLigne)
-         self.connect(self.view,SIGNAL("itemPressed(QTableWidgetItem*)"),self.donneLigne)
-         self.connect(self.view,SIGNAL("clicked(QModelIndex*)"),self.donneLigne)
-         self.connect(self.view,SIGNAL("clicked()"),self.donneLigne)
-         self.connect(self.view,SIGNAL("pressed()"),self.donneLigne)
+         self.view.pressed[QModelIndex].connect(self.donneLigne)
+         self.view.itemPressed[QTableWidgetItem].conect(self.donneLigne)
+         self.view.clicked[QModelIndex].connect(self.donneLigne)
+         self.view.clicked.connect(self.donneLigne)
+         self.view.pressed.connect(self.donneLigne)
 
      def donneLigne(self):
          print "jjjjjjjjjjjjjjjj"
index 9426d929b4cb4dfe998f8db1e20c4e4005d358a8..7d64de2715fb6a46928654e765baae5e1d774053 100644 (file)
@@ -1,6 +1,4 @@
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
-from PyQt4.QtSql import *
+from qtsalome import *
 from nomBase_ui import Ui_LEDataBaseName
 
 
@@ -11,7 +9,7 @@ class DataBaseName(Ui_LEDataBaseName,QDialog):
          self.setupUi(self)
          self.setModal(True)
          self.parent=parent
-         self.connect(self.LEBaseName, SIGNAL("returnPressed()"), self.LEDBreturnPressed)
+         self.LEBaseName.returnPressed.connect(self.LEDBreturnPressed)
 
 
      def LEDBreturnPressed(self):
index c4b83b377a6f6f3e46ce8690908225851ed5534f..1e952520c68d54ad728142cbf9b8ee23853862c0 100755 (executable)
@@ -5,7 +5,7 @@ rep=os.path.dirname(os.path.abspath(__file__))
 installDir=os.path.join(rep,'..')
 sys.path.insert(0,installDir)
 
-from PyQt4 import QtGui,QtCore
+from qtsalome import QApplication
 from Gui.maFenetreChoix_ui import MaFenetreChoix
 from Base.dataBase import Base
 
@@ -17,7 +17,7 @@ if __name__ == "__main__":
       p.add_option('-d',dest='database',default="myMesh.db",help='nom de la database')
       options, args = p.parse_args()
 
-      app = QtGui.QApplication(sys.argv)
+      app = QApplication(sys.argv)
       maBase=Base(options.database)
       maBase.initialise()
       window = MaFenetreChoix(maBase)
index 633de8dbf91a77f816b6ed6622371bddfbf68159..23e646c594e6ccc667fe50525730571cae24db46 100644 (file)
@@ -1,9 +1,6 @@
 import os
 import subprocess
 import time
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
-
 
 class Job:
   def __init__(self,listeParamMaillage,salomePath,versionId,mesGroupesRef):    
index e9dd296c71f5bf56a0d2ffc0e8201d568dc39dd8..fc3a3e2cda4ffce5fb134c815b5ec3a688622045 100644 (file)
@@ -1,10 +1,6 @@
 import os
 import subprocess
 import time
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
-from PyQt4.QtSql import *
-
 
 class Ref:
   def __init__(self,maBase,idMaillage,idVersion,machine):    
index c1dc4bc34b466843a5b00cbcbf4335ce030521ca..5f227debf30506358083198bb998d3914a859dbe 100755 (executable)
@@ -5,7 +5,7 @@ rep=os.path.dirname(os.path.abspath(__file__))
 installDir=os.path.join(rep,'..')
 sys.path.insert(0,installDir)
 
-from PyQt4 import QtGui,QtCore,QtSql
+from qtsalome import *
 from Base.dataBase import Base
 
 def completeDatabase(fichier,table,enregistrement):
@@ -13,7 +13,7 @@ def completeDatabase(fichier,table,enregistrement):
       maBase.initialise()
       nomTable="ma"+str(table)
       matable=getattr(maBase,nomTable)
-      model= QtSql.QSqlTableModel()
+      model= QSqlTableModel()
       model.setTable(matable.nom)
       nbCols=model.columnCount() -1
       if table == "TableGroupesRef" : nbCols==nbCols+1
index 6bbc2d429eb7a8a30aace4c50ffc88c8aaf258ad..64738b3d2f7dca4a39396ac679f2a63fe0b0c6be 100755 (executable)
@@ -3,7 +3,6 @@
 
 import sys
 import os
-from PyQt4 import QtGui,QtCore
 from Base.dataBase import Base
 from Base.versions import  Chercheversion
 
index 7a0d5ba5331f66d602bc58e2ce1ccefd973057ea..ad375ed5728bb303d074b9a9d75b4920595c0845 100755 (executable)
@@ -1,7 +1,6 @@
 #!/usr/bin/env python
 
 import sys
-from PyQt4 import QtGui,QtCore
 from Base.dataBase import Base
 
 def creeDatabase(fichier):
index 8f22c58579aaf4ff9946f3d09d8eb7760b480040..aadb04dfec5b442462057e33f6bf5506f30fad01 100755 (executable)
@@ -1,8 +1,6 @@
 #!/usr/bin/env python
 
-from PyQt4  import *
-from PyQt4.QtCore import *
-from PyQt4.QtGui import *
+from qtsalome import *
 from Gui.myMain_ui import Ui_Gestion
 import sys
 
@@ -18,11 +16,11 @@ class MonAppli(Ui_Gestion,QWidget):
          self.version=""
 
      def connectSignaux(self) :
-         self.connect(self.BExp,SIGNAL("clicked()"),self.BExpPressed)
-         self.connect(self.BImp,SIGNAL("clicked()"),self.BImpPressed)
-         self.connect(self.BCree,SIGNAL("clicked()"),self.BCreePressed)
-         self.connect(self.BVue,SIGNAL("clicked()"),self.BVuePressed)
-         self.connect(self.BStat,SIGNAL("clicked()"),self.BStatPressed)
+         self.BExp.clicked.connect(self.BExpPressed)
+         self.BImp.clicked.connect(self.BImpPressed)
+         self.BCree.clicked.connect(self.BCreePressed)
+         self.BVue.clicked.connect(BVuePressed)
+         self.BStat.clicked.connect(BStatPressed)
 
 
      def BExpPressed(self):
index accfef7201dd03bc4342354d244b8b0d21eb7e3f..4c19ab467d1bdf3421170bb16e2e3ae8e3104fa7 100755 (executable)
@@ -3,7 +3,6 @@
 
 import sys
 import os
-from PyQt4 import QtGui,QtCore
 from Base.dataBase import Base
 from Base.versions import Chercheversion
 
index 0a09c679a612e50bc9928dd8e799ffe26ce9ef2b..29e6fc99fa22a46d41adc98466990fe8a0e2b108 100644 (file)
@@ -21,7 +21,7 @@ IF(SALOME_BUILD_DOC)
   ADD_SUBDIRECTORY(doc)
 ENDIF(SALOME_BUILD_DOC)
 
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
 
 # --- scripts ---
 
@@ -41,7 +41,7 @@ SET(_pyuic_files
 )
 
 # scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 # --- rules ---
 
index 7d02228e4334a8942ce0421099e2d840105830ef..38aeed49bbd1e1e52d3bce8e27191a3d6b41b402 100644 (file)
@@ -23,9 +23,7 @@ import string,types,os, sys
 import traceback
 import tempfile
 
-from PyQt4 import *
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
+from qtsalome import *
 
 # Import des panels
 
@@ -39,13 +37,13 @@ class MonViewText(Ui_ViewExe, QDialog):
         QDialog.__init__(self,parent)
         self.setupUi(self)
         self.resize( QSize(1000,600).expandedTo(self.minimumSizeHint()) )
-        #self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") )
-        self.connect( self.PB_Ok,SIGNAL("clicked()"), self.theClose )
-        self.connect( self.PB_Save,SIGNAL("clicked()"), self.saveFile )
+        # self.PB_Ok.clicked.connect(self.close)
+        self.PB_Ok.clicked.connect( self.theClose )
+        self.PB_Save.clicked.connect( self.saveFile )
         self.monExe=QProcess(self)
 
-        self.connect(self.monExe, SIGNAL("readyReadStandardOutput()"), self.readFromStdOut )
-        self.connect(self.monExe, SIGNAL("readyReadStandardError()"), self.readFromStdErr )
+        self.monExe.readyReadStandardOutput.connect( self.readFromStdOut )
+        self.monExe.readyReadStandardError.connect( self.readFromStdErr )
       
         # Je n arrive pas a utiliser le setEnvironment du QProcess
         # fonctionne hors Salome mais pas dans Salome ???
@@ -77,7 +75,7 @@ class MonViewText(Ui_ViewExe, QDialog):
     def saveFile(self):
         #recuperation du nom du fichier
         savedir=os.environ['HOME']
-        fn = QFileDialog.getSaveFileName(None, self.trUtf8("Save File"),savedir)
+        fn = QFileDialog.getSaveFileName(None,"Save File",savedir)
         if fn.isNull() : return
         ulfile = os.path.abspath(unicode(fn))
         try:
@@ -85,17 +83,16 @@ class MonViewText(Ui_ViewExe, QDialog):
            f.write(str(self.TB_Exe.toPlainText()))
            f.close()
         except IOError, why:
-           QMessageBox.critical(self, self.trUtf8('Save File'),
-                self.trUtf8('The file <b>%1</b> could not be saved.<br>Reason: %2')
-                    .arg(unicode(fn)).arg(str(why)))
+           QMessageBox.critical(self, 'Save File',
+               'The file <b>%1</b> could not be saved.<br>Reason: %2'%(unicode(fn), str(why)))
 
     def readFromStdErr(self):
         a=self.monExe.readAllStandardError()
-        self.TB_Exe.append(QString.fromUtf8(a.data(),len(a)))
+        self.TB_Exe.append(unicode(a.data().encode()))
 
     def readFromStdOut(self) :
         a=self.monExe.readAllStandardOutput()
-        aa=QString.fromUtf8(a.data(),len(a))
+        aa=unicode(a.data(),len(a))
         self.TB_Exe.append(aa)
         if "END_OF_Yams" in aa:
           self.parent().enregistreResultat()
index 37a15f6cc591b6ded93d34d83430cbd8253c8c4c..17f2dd640bdc390aaaea6f8fca2f4deaf71f46dd 100644 (file)
@@ -25,9 +25,7 @@ import os, subprocess
 import tempfile
 from YamsPlugDialog_ui import Ui_YamsPlugDialog
 from monViewText import MonViewText
-from PyQt4.QtGui import *
-from PyQt4.QtCore import *
-
+from qtsalome import *
 
 class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
   """
@@ -85,22 +83,22 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     self.clean()
 
   def connecterSignaux(self) :
-    self.connect(self.PB_Cancel,SIGNAL("clicked()"),self.PBCancelPressed)
-    self.connect(self.PB_Default,SIGNAL("clicked()"),self.clean)
-    self.connect(self.PB_Help,SIGNAL("clicked()"),self.PBHelpPressed)
-    self.connect(self.PB_OK,SIGNAL("clicked()"),self.PBOKPressed)
+    self.PB_Cancel.clicked.connect(self.PBCancelPressed)
+    self.PB_Default.clicked.connect(self.clean)
+    self.PB_Help.clicked.connect(self.PBHelpPressed)
+    self.PB_OK.clicked.connect(self.PBOKPressed)
     
-    self.connect(self.PB_Load,SIGNAL("clicked()"),self.PBLoadPressed)
-    self.connect(self.PB_Save,SIGNAL("clicked()"),self.PBSavePressed)
-    self.connect(self.PB_LoadHyp,SIGNAL("clicked()"),self.PBLoadHypPressed)
-    self.connect(self.PB_SaveHyp,SIGNAL("clicked()"),self.PBSaveHypPressed)
+    self.PB_Load.clicked.connect(self.PBLoadPressed)
+    self.PB_Save.clicked.connect(self.PBSavePressed)
+    self.PB_LoadHyp.clicked.connect(self.PBLoadHypPressed)
+    self.PB_SaveHyp.clicked.connect(self.PBSaveHypPressed)
     
-    self.connect(self.PB_MeshFile,SIGNAL("clicked()"),self.PBMeshFilePressed)
-    self.connect(self.PB_MeshSmesh,SIGNAL("clicked()"),self.PBMeshSmeshPressed)
-    self.connect(self.LE_MeshSmesh,SIGNAL("returnPressed()"),self.meshSmeshNameChanged)
-    self.connect(self.PB_ParamsFileExplorer,SIGNAL("clicked()"),self.setParamsFileName)
-    self.connect(self.LE_MeshFile,SIGNAL("returnPressed()"),self.meshFileNameChanged)
-    self.connect(self.LE_ParamsFile,SIGNAL("returnPressed()"),self.paramsFileNameChanged)
+    self.PB_MeshFile.clicked.connect(self.PBMeshFilePressed)
+    self.PB_MeshSmesh.clicked.connect(self.PBMeshSmeshPressed)
+    self.LE_MeshSmesh.returnPressed.connect(self.meshSmeshNameChanged)
+    self.PB_ParamsFileExplorer.clicked.connect(self.setParamsFileName)
+    self.LE_MeshFile.returnPressed.connect(self.meshFileNameChanged)
+    self.LE_ParamsFile.returnPressed.connect(self.paramsFileNameChanged)
 
   def PBHelpPressed(self):
     import SalomePyQt
@@ -365,7 +363,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     if fd.exec_():
       infile = fd.selectedFiles()[0]
       self.LE_MeshFile.setText(infile)
-      self.fichierIn=infile.toLatin1()
+      self.fichierIn=unicode(infile).encode("latin-1")
       self.MeshIn=""
       self.LE_MeshSmesh.setText("")
 
@@ -374,7 +372,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     if fd.exec_():
       infile = fd.selectedFiles()[0]
       self.LE_ParamsFile.setText(infile)
-      self.paramsFile=infile.toLatin1()
+      self.paramsFile=unicode(infile).encode("latin-1")
 
   def meshFileNameChanged(self):
     self.fichierIn=str(self.LE_MeshFile.text())
@@ -456,7 +454,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
       except:
         pass
       
-    style = self.style.toLatin1()
+    style = unicode(self.style).encode("latin-1")
     # Translation of old Yams options to new MG-SurfOpt options
     if   style == "0" :
       self.commande+= " --optimisation only"
@@ -543,10 +541,9 @@ def getDialog():
 #
 def TEST_MonYamsPlugDialog():
   import sys
-  from PyQt4.QtGui import QApplication
-  from PyQt4.QtCore import QObject, SIGNAL, SLOT
+  from qtsalome import QApplication
   app = QApplication(sys.argv)
-  QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+  app.lastWindowClosed.connect(app.quit)
 
   dlg=MonYamsPlugDialog()
   dlg.show()
index eacfb695d52aad650dfd22259b57da1bff7c3c8d..4a7259ad8f2eef2dc85ebe1cd034dae342153f27 100644 (file)
@@ -30,10 +30,7 @@ def YamsLct(context):
   import os
   import subprocess
   import tempfile
-  from PyQt4 import QtCore
-  from PyQt4 import QtGui
-  from PyQt4.QtGui import QFileDialog
-  from PyQt4.QtGui import QMessageBox
+  from qtsalome import QFileDialog, QMessageBox
   
   #prior test to avoid unnecessary user GUI work with ending crash
   try :
index cc3a73979a99f67d91b980d0fd72dc4cf1c6147e..5ba2e6075ca790cd28984c20ab01e4f419cbf039 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
 
 # --- scripts ---
 
@@ -39,10 +39,10 @@ SET(_pyuic_files
 )
 
 # scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 # --- rules ---
 
 SALOME_INSTALL_SCRIPTS("${plugin_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
 
-SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
\ No newline at end of file
+SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/blocFissure/ihm)
index d6ab64019b61adf67c21d6b0cbc126699514cc5e..5687164ed1286a162cd793e48c2622e22e67e4f0 100644 (file)
    <sender>cb_optDiscrSain</sender>
    <signal>clicked(bool)</signal>
    <receiver>gb_discrSain</receiver>
-   <slot>setShown(bool)</slot>
+   <slot>setVisible(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>69</x>
    <sender>cb_optDiscrFiss</sender>
    <signal>clicked(bool)</signal>
    <receiver>gb_discrFacesExternes</receiver>
-   <slot>setShown(bool)</slot>
+   <slot>setVisible(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>1033</x>
    <sender>cb_optDiscrFiss</sender>
    <signal>clicked(bool)</signal>
    <receiver>gb_zoneRemail</receiver>
-   <slot>setShown(bool)</slot>
+   <slot>setVisible(bool)</slot>
    <hints>
     <hint type="sourcelabel">
      <x>1033</x>
index 8b92b65e4be2962cc453d3b1c338cafadff53fac..30936d50cbabb3a66f838cac69da3373cd34aa4f 100644 (file)
@@ -35,18 +35,13 @@ def fissureCoudeDlg(context):
   import os
   #import subprocess
   #import tempfile
-  from PyQt4 import QtCore
-  from PyQt4 import QtGui
-  from PyQt4.QtGui import QFileDialog
-  from PyQt4.QtGui import QMessageBox
-  from PyQt4.QtGui import QPalette
-  from PyQt4.QtGui import QColor
+  from qtsalome import QFileDialog, QMessageBox, QPalette, QColor, QDialog
   from fissureCoude_ui import Ui_Dialog
   
-  class fissureCoudeDialog(QtGui.QDialog):
+  class fissureCoudeDialog(QDialog):
     
     def __init__(self):
-      QtGui.QDialog.__init__(self)
+      QDialog.__init__(self)
       # Set up the user interface from Designer.
       self.ui = Ui_Dialog()
       self.ui.setupUi(self)
@@ -78,17 +73,12 @@ def fissureCoudeDlg(context):
       self.ui.lb_calcul.hide()
       
       # Connect up the buttons.
-      self.connect(self.ui.pb_valPrec, QtCore.SIGNAL("clicked()"),
-                   self.readValPrec)
-      self.connect(self.ui.pb_reset, QtCore.SIGNAL("clicked()"),
-                   self.resetVal)
-      self.connect(self.ui.pb_recharger, QtCore.SIGNAL("clicked()"),
-                   self.recharger)
-      self.connect(self.ui.pb_sauver, QtCore.SIGNAL("clicked()"),
-                   self.sauver)
-      self.disconnect(self.ui.buttonBox, QtCore.SIGNAL("accepted()"), self.accept)
-      self.connect(self.ui.buttonBox, QtCore.SIGNAL("accepted()"),
-                   self.execute)
+      self.ui.pb_valPrec.clicked.connect(self.readValPrec)
+      self.ui.pb_reset.clicked.connect(self.resetVal)
+      self.ui.pb_recharger.clicked.connect(self.recharger)
+      self.ui.pb_sauver.clicked.connect(self.sauver)
+      self.ui.buttonBox.accepted.disconnect(self.accept)
+      self.ui.buttonBox.accepted.connect(self.execute)
     
     def initDefaut(self):
       self.defaut = dict(
index 70f65f0243195d50a0f8f888ad94301f4cb38d99..8bffecdc766415a586c836bca184b524dc36a55a 100644 (file)
@@ -17,7 +17,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 
-INCLUDE(UsePyQt4)
+INCLUDE(UsePyQt)
 
 # --- scripts ---
 
@@ -52,7 +52,7 @@ SET(_pyuic_files
 )
 
 # scripts / pyuic wrappings
-PYQT4_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
+PYQT_WRAP_UIC(_pyuic_SCRIPTS ${_pyuic_files})
 
 # --- rules ---
 SALOME_INSTALL_SCRIPTS("${_pyuic_SCRIPTS}" ${SALOME_INSTALL_PYTHON}/salome/smesh/spadder/gui)
index 355d1233c9c6e291c8f848d6fc3c623f1dce6e20..376a90039291f4cfd258687f099285b9b8a7c4db 100644 (file)
@@ -30,8 +30,7 @@ from salome.smesh.smeshstudytools import SMeshStudyTools
 
 from omniORB import CORBA
 
-from PyQt4.QtCore import QObject, SIGNAL, SLOT
-from PyQt4.QtGui import QIcon, QStandardItemModel, QStandardItem, QMessageBox
+from qtsalome import QIcon, QStandardItemModel, QStandardItem, QMessageBox, pyqtSignal
 
 from inputframe_ui import Ui_InputFrame
 from inputdata import InputData
@@ -42,6 +41,8 @@ GROUPNAME_MAXLENGTH=8
 class InputDialog(GenericDialog):
 
     TBL_HEADER_LABEL=["Input Mesh", "Output group name"]
+    
+    inputValidated = pyqtSignal()
 
     def __init__(self, parent=None, name="InputDialog", modal=0):
         """
@@ -100,9 +101,9 @@ class InputDialog(GenericDialog):
         # The click on btnSmeshObject (signal clicked() emitted by the
         # button btnSmeshObject) is connected to the slot
         # onSelectSmeshObject, etc ...
-        self.connect(self.__ui.btnSmeshObject, SIGNAL('clicked()'), self.onSelectSmeshObject )
-        self.connect(self.__ui.btnAddInput,    SIGNAL('clicked()'), self.onAddInput )
-        self.connect(self.__ui.btnDeleteInput, SIGNAL('clicked()'), self.onDeleteInput )
+        self.__ui.btnSmeshObject.clicked.connect( self.onSelectSmeshObject )
+        self.__ui.btnAddInput.clicked.connect( self.onAddInput )
+        self.__ui.btnDeleteInput.clicked.connect(  self.onDeleteInput )
 
         # Set up the model of the Qt table list
         self.__inputModel = QStandardItemModel(0,2)
@@ -148,7 +149,7 @@ class InputDialog(GenericDialog):
         # been validated so that it can process the event
         GenericDialog.accept(self)
         if self.wasOk():
-            self.emit(SIGNAL('inputValidated()'))
+            self.inputValidated.emit()
 
     def onSelectSmeshObject(self):
         '''
@@ -188,10 +189,10 @@ class InputDialog(GenericDialog):
         creates a new entry in the list of input data, or updates this
         entry if it already exists.
         """
-        meshName   = str(self.__ui.txtSmeshObject.text().trimmed())
+        meshName   = str(self.__ui.txtSmeshObject.text()).strip()
         meshObject = self.__selectedMesh
         meshType   = self.__ui.cmbMeshType.currentIndex()
-        groupName  = str(self.__ui.txtGroupName.text().trimmed())
+        groupName  = str(self.__ui.txtGroupName.text()).strip()
 
         self.__addInputInGui(meshName, meshObject, meshType, groupName)
         self.__addInputInMap(meshName, meshObject, meshType, groupName)
@@ -331,10 +332,9 @@ class InputDialog(GenericDialog):
 #
 def TEST_InputDialog():
     import sys
-    from PyQt4.QtCore import QObject, SIGNAL, SLOT
-    from PyQt4.QtGui import QApplication
+    from qtsalome import QApplication
     app = QApplication(sys.argv)
-    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+    app.lastWindowClosed.connect( app.quit )
 
     dlg=InputDialog()
     dlg.displayAndWait()
@@ -343,10 +343,9 @@ def TEST_InputDialog():
 
 def TEST_InputDialog_setData():
     import sys
-    from PyQt4.QtCore import QObject, SIGNAL, SLOT
-    from PyQt4.QtGui import QApplication
+    from qtsalome import QApplication
     app = QApplication(sys.argv)
-    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+    app.lastWindowClosed.connect( app.quit )
 
     dlg=InputDialog()
 
index 6acec908b49e28fc2bd2fc8916e23cb8d433998e..056c8d871fe42cefd5d21551f074b45f87c017f0 100644 (file)
@@ -20,8 +20,7 @@
 # Author : Guillaume Boulant (EDF)
 #
 
-from PyQt4.QtGui import QDialog, QIcon
-from PyQt4.QtCore import QObject, SIGNAL, SLOT, Qt
+from qtsalome import QDialog, QIcon, Qt
 
 from plugindialog_ui import Ui_PluginDialog
 from inputdialog import InputDialog
@@ -87,11 +86,11 @@ class PluginDialog(QDialog):
         self.__ui.btnClear.setIcon(icon)
 
         # Then, we can connect the slot to there associated button event
-        self.connect(self.__ui.btnInput,       SIGNAL('clicked()'), self.onInput )
-        self.connect(self.__ui.btnCompute,     SIGNAL('clicked()'), self.onCompute )
-        self.connect(self.__ui.btnRefresh,     SIGNAL('clicked()'), self.onRefresh )
-        self.connect(self.__ui.btnPublish,     SIGNAL('clicked()'), self.onPublish )
-        self.connect(self.__ui.btnClear,       SIGNAL('clicked()'), self.onClear )
+       self.__ui.btnInput.clicked.connect( self.onInput )
+        self.__ui.btnCompute.clicked.connect( self.onCompute )
+        self.__ui.btnRefresh.clicked.connect( self.onRefresh )
+        self.__ui.btnPublish.clicked.connect( self.onPublish )
+        self.__ui.btnClear.clicked.connect( self.onClear )
 
         self.clear()
 
@@ -140,7 +139,7 @@ class PluginDialog(QDialog):
                 self.__inputDialog.windowFlags() | Qt.WindowStaysOnTopHint)
             # The signal inputValidated emited from inputDialog is
             # connected to the slot function onProcessInput:
-            self.connect(self.__inputDialog, SIGNAL('inputValidated()'), self.onProcessInput)
+           self.__inputDialog.inputValidated.connect( self.onProcessInput )
             
         else:
             self.__ui.frameInput.setVisible(True)
@@ -393,10 +392,9 @@ def getDialog():
 #
 def TEST_PluginDialog():
     import sys
-    from PyQt4.QtGui import QApplication
-    from PyQt4.QtCore import QObject, SIGNAL, SLOT
+    from qtsalome import QApplication
     app = QApplication(sys.argv)
-    QObject.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
+    app.lastWindowClosed.connect( app.quit )
 
     dlg=PluginDialog()
     dlg.exec_()
index 0c935f86618f5d491fb75999b93b74e5e3776ac8..e9f8fa12e7fc88da76f641f2cca3515b21186974 100644 (file)
@@ -26,7 +26,7 @@ def runSpadderPlugin(context):
     try:
         dialog=plugindialog.getDialog()
     except UiException, err:
-        from PyQt4.QtGui import QMessageBox
+        from qtsalome import QMessageBox
         QMessageBox.critical(None,"An error occurs during PADDER configuration",
                              err.getUIMessage())
         return