From: pascale.noyret Date: Fri, 22 Jan 2016 10:29:51 +0000 (+0100) Subject: remplacement bete de PyQt4 par PyQt5 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7170cefe01ff8c3c217feae9c4d064b514970cfd;p=tools%2Feficas.git remplacement bete de PyQt4 par PyQt5 --- diff --git a/Extensions/i18n.py b/Extensions/i18n.py index 98b5db69..cd83b60a 100644 --- a/Extensions/i18n.py +++ b/Extensions/i18n.py @@ -20,7 +20,7 @@ This package provides Qt-based string internationalization functionality for the ``Eficas`` application of EDF. It is usable from both Qt and non-Qt environments. -``PyQt4`` is currently supported. +``PyQt5`` is currently supported. """ from translation import tr, tr_qt diff --git a/Extensions/localisation.py b/Extensions/localisation.py index f9d0e6d4..7cace8d8 100644 --- a/Extensions/localisation.py +++ b/Extensions/localisation.py @@ -18,10 +18,10 @@ Creates and loads two ``QTranslator`` objects, one for pure Qt, one for Eficas, and installs them to a ``QApplication``. -``PyQt4`` is currently supported. +``PyQt5`` is currently supported. """ -from PyQt4.QtCore import QTranslator +from PyQt5.QtCore import QTranslator qt_translator = QTranslator() eficas_translator = QTranslator() @@ -40,9 +40,9 @@ def localise(application, locale=None ): If no locale is specified by the user, the system locale is used instead, for both Qt base and Eficas translators. """ - from PyQt4.QtCore import QLibraryInfo - from PyQt4.QtCore import QLocale - from PyQt4.QtGui import QApplication + from PyQt5.QtCore import QLibraryInfo + from PyQt5.QtCore import QLocale + from PyQt5.QtGui import QApplication sys_locale = QLocale.system().name() if locale is None: diff --git a/Extensions/translation.py b/Extensions/translation.py index 26189371..6a337a63 100644 --- a/Extensions/translation.py +++ b/Extensions/translation.py @@ -20,7 +20,7 @@ mechanism, in the ``Eficas`` application of EDF. Handles unformatted and formatted strings, according to all formatting schemes: via dictionaries, tuples, or atoms. -``PyQt4`` is currently supported. +``PyQt5`` is currently supported. """ from Extensions.eficas_exception import EficasException def _reformat_qstring_from_tuple(qstring, params): @@ -31,7 +31,7 @@ def _reformat_qstring_from_tuple(qstring, params): Returns a formatted QString from an unformatted QString and a tuple specifying the parameters of the QString. """ - from PyQt4.QtCore import QRegExp, QString + from PyQt5.QtCore import QRegExp, QString reg = QRegExp("\%\.[1-9]{1,2}f") for p, j in zip(params, range(len(params))): try: @@ -71,7 +71,7 @@ def _reformat_qstring_from_dict(qstring, params): Returns a formatted QString from an unformatted QString and a dictionary specifying the parameters of the QString. """ - from PyQt4.QtCore import QRegExp, QString + from PyQt5.QtCore import QRegExp, QString for p, j in zip(params, range(len(params))): p_reg = QRegExp("\%\("+ p + "\)\.[1-9]{1,2}f") p_index = p_reg.indexIn(qstring) @@ -108,7 +108,7 @@ def _reformat_qstring_from_atom(qstring, params): and an integer or a float specifying the parameter of the QString. """ - from PyQt4.QtCore import QRegExp, QString + from PyQt5.QtCore import QRegExp, QString reg = QRegExp("\%\.[1-9]{1,2}f") if qstring.count("%") == 0: qstring.append("%1") @@ -205,7 +205,7 @@ def tr(string, *args): string or Unicode object with formatting specifications, and, optionally, an iterable or an int or float. Lets Python do the string formatting.""" - from PyQt4.QtGui import QApplication + from PyQt5.QtGui import QApplication string = _preprocess_atom(string) if len(args) == 0: r = unicode(QApplication.translate("@default", string)) @@ -252,11 +252,11 @@ def tr_qt(string, *args): Returns a formatted string from an unformatted Unicode string with formatting specifications, and, optionally, an iterable or an int or float. - Lets PyQt4 do the string formatting. To this end, + Lets PyQt5 do the string formatting. To this end, a conversion from Python to Qt string formatting syntax is performed.""" string = _preprocess_atom(string) - from PyQt4.QtGui import QApplication + from PyQt5.QtGui import QApplication if len(args) == 0: r = QApplication.translate("@default", string) elif len(args) == 1: diff --git a/InterfaceQT4/browser.py b/InterfaceQT4/browser.py index bc9516bd..b19e977b 100644 --- a/InterfaceQT4/browser.py +++ b/InterfaceQT4/browser.py @@ -22,9 +22,9 @@ import string,re import types,sys,os import traceback import typeNode -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr class JDCTree( QTreeWidget ): @@ -505,9 +505,6 @@ class JDCNode(QTreeWidgetItem): if __name__=='__main__': - from PyQt4 import * - from PyQt4.QtGui import * - from PyQt4.QtCore import * # sys.path[:0]=['..','../Aster','../Aster/Cata' ] diff --git a/InterfaceQT4/compobloc.py b/InterfaceQT4/compobloc.py index f7bdd3a9..df877be2 100644 --- a/InterfaceQT4/compobloc.py +++ b/InterfaceQT4/compobloc.py @@ -18,8 +18,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4 import * -from PyQt4.QtGui import * +from PyQt5 import * +from PyQt5.QtGui import * from Editeur import Objecttreeitem import compofact diff --git a/InterfaceQT4/compocomm.py b/InterfaceQT4/compocomm.py index f86c5696..5fdaebe7 100644 --- a/InterfaceQT4/compocomm.py +++ b/InterfaceQT4/compocomm.py @@ -18,8 +18,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * import string from Editeur import Objecttreeitem diff --git a/InterfaceQT4/compofact.py b/InterfaceQT4/compofact.py index fe6a54d8..08926659 100644 --- a/InterfaceQT4/compofact.py +++ b/InterfaceQT4/compofact.py @@ -18,9 +18,9 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * import browser import typeNode from Extensions.i18n import tr diff --git a/InterfaceQT4/compomacro.py b/InterfaceQT4/compomacro.py index c5c282e2..ce95f960 100644 --- a/InterfaceQT4/compomacro.py +++ b/InterfaceQT4/compomacro.py @@ -29,8 +29,8 @@ from Extensions.i18n import tr import compooper import browser import typeNode -from PyQt4.QtGui import QAction -from PyQt4.QtCore import Qt, SIGNAL, QVariant +from PyQt5.QtGui import QAction +from PyQt5.QtCore import Qt, SIGNAL, QVariant class MACRONode(browser.JDCNode,typeNode.PopUpMenuNode): diff --git a/InterfaceQT4/compooper.py b/InterfaceQT4/compooper.py index 0d967120..6330390d 100644 --- a/InterfaceQT4/compooper.py +++ b/InterfaceQT4/compooper.py @@ -19,9 +19,9 @@ # import os import tempfile -from PyQt4.QtGui import QMessageBox, QAction, QApplication, QCursor -from PyQt4.QtGui import * -from PyQt4.QtCore import Qt, SIGNAL, QVariant +from PyQt5.QtGui import QMessageBox, QAction, QApplication, QCursor +from PyQt5.QtGui import * +from PyQt5.QtCore import Qt, SIGNAL, QVariant from Extensions.i18n import tr from Extensions.eficas_exception import EficasException diff --git a/InterfaceQT4/configuration.py b/InterfaceQT4/configuration.py index a76c7601..22ae4b95 100644 --- a/InterfaceQT4/configuration.py +++ b/InterfaceQT4/configuration.py @@ -23,7 +23,7 @@ # Modules Python import os, sys, string, types, re import traceback -from PyQt4.QtGui import QMessageBox +from PyQt5.QtGui import QMessageBox from Editeur.utils import read_file from Extensions.i18n import tr diff --git a/InterfaceQT4/editor.py b/InterfaceQT4/editor.py index ddd8784f..abfd9d26 100644 --- a/InterfaceQT4/editor.py +++ b/InterfaceQT4/editor.py @@ -20,9 +20,9 @@ import types,sys,os, re import subprocess import traceback -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * import time from datetime import date from Extensions.i18n import tr @@ -405,7 +405,7 @@ class JDCEditor(QSplitter): #----------------------------------------------# if self.sb: mapalette=self.sb.palette() - from PyQt4.QtGui import QPalette + from PyQt5.QtGui import QPalette mapalette.setColor( QPalette.WindowText, couleur ) self.sb.setPalette( mapalette ); self.sb.showMessage(QString.fromUtf8(message))#,2000) diff --git a/InterfaceQT4/eficas_go.py b/InterfaceQT4/eficas_go.py index 2f7609f0..7cc32e4d 100644 --- a/InterfaceQT4/eficas_go.py +++ b/InterfaceQT4/eficas_go.py @@ -29,7 +29,7 @@ if ihmDir not in sys.path : sys.path.append(ihmDir) if ihmQTDir not in sys.path : sys.path.append(ihmQTDir) if editeurDir not in sys.path :sys.path.append(editeurDir) -from PyQt4.QtGui import * +from PyQt5.QtGui import * def lance_eficas(code=None,fichier=None,ssCode=None,multi=False,langue='en'): """ diff --git a/InterfaceQT4/gereTraduction.py b/InterfaceQT4/gereTraduction.py index fce86785..785eb22f 100644 --- a/InterfaceQT4/gereTraduction.py +++ b/InterfaceQT4/gereTraduction.py @@ -16,9 +16,9 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * import os from Extensions.i18n import tr diff --git a/InterfaceQT4/monBoutonSalome.py b/InterfaceQT4/monBoutonSalome.py index 97c202f6..a66f73c4 100644 --- a/InterfaceQT4/monBoutonSalome.py +++ b/InterfaceQT4/monBoutonSalome.py @@ -21,10 +21,10 @@ # Modules Eficas from desBoutonSalome import Ui_desBoutonSalome -from PyQt4 import * -from PyQt4.QtCore import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr # Import des panels diff --git a/InterfaceQT4/monChoixCata.py b/InterfaceQT4/monChoixCata.py index 442d01d1..3e2f54d9 100644 --- a/InterfaceQT4/monChoixCata.py +++ b/InterfaceQT4/monChoixCata.py @@ -21,10 +21,10 @@ # Modules Eficas from desChoixCata import Ui_DChoixCata -from PyQt4 import * -from PyQt4.QtCore import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr # Import des panels diff --git a/InterfaceQT4/monChoixCode.py b/InterfaceQT4/monChoixCode.py index c2c0a435..176509af 100644 --- a/InterfaceQT4/monChoixCode.py +++ b/InterfaceQT4/monChoixCode.py @@ -22,8 +22,8 @@ import os,sys,re from desChoixCode import Ui_ChoixCode -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * # Import des panels diff --git a/InterfaceQT4/monChoixMap.py b/InterfaceQT4/monChoixMap.py index afcee4fd..58246324 100644 --- a/InterfaceQT4/monChoixMap.py +++ b/InterfaceQT4/monChoixMap.py @@ -20,10 +20,10 @@ # Modules Eficas from desChoixMap import Ui_ChoixMap -from PyQt4 import * -from PyQt4.QtCore import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * # Import des panels diff --git a/InterfaceQT4/monCommandePanel.py b/InterfaceQT4/monCommandePanel.py index 38687af5..2a0c3ce9 100644 --- a/InterfaceQT4/monCommandePanel.py +++ b/InterfaceQT4/monCommandePanel.py @@ -25,9 +25,9 @@ from qtCommun import QTPanel from qtCommun import QTPanelTBW1 from qtCommun import QTPanelTBW2 from qtCommun import QTPanelTBW3 -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class DComm(Ui_DComm,QDialog): def __init__(self,parent ,modal ) : diff --git a/InterfaceQT4/monCommentairePanel.py b/InterfaceQT4/monCommentairePanel.py index 5adfe832..36e888c5 100644 --- a/InterfaceQT4/monCommentairePanel.py +++ b/InterfaceQT4/monCommentairePanel.py @@ -22,9 +22,9 @@ import string,types,os # Modules Eficas -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from desCommentaire import Ui_DComment from qtCommun import QTPanel diff --git a/InterfaceQT4/monFonctionPanel.py b/InterfaceQT4/monFonctionPanel.py index 599b81db..4439d36f 100644 --- a/InterfaceQT4/monFonctionPanel.py +++ b/InterfaceQT4/monFonctionPanel.py @@ -24,8 +24,8 @@ import string,types,os from qtSaisie import SaisieValeur from monPlusieursBasePanel import MonPlusieursBasePanel -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr # Import des panels diff --git a/InterfaceQT4/monFormulePanel.py b/InterfaceQT4/monFormulePanel.py index 0ea6c216..5c9ec53e 100644 --- a/InterfaceQT4/monFormulePanel.py +++ b/InterfaceQT4/monFormulePanel.py @@ -25,8 +25,8 @@ from qtCommun import QTPanel from qtCommun import QTPanelTBW2 from Extensions.i18n import tr -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class DFormule(Ui_DFormule,QDialog): diff --git a/InterfaceQT4/monInactifPanel.py b/InterfaceQT4/monInactifPanel.py index 6e20b841..88c22daa 100644 --- a/InterfaceQT4/monInactifPanel.py +++ b/InterfaceQT4/monInactifPanel.py @@ -19,8 +19,8 @@ # -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from qtCommun import QTPanel from desInactif import Ui_DInactif diff --git a/InterfaceQT4/monIncludePanel.py b/InterfaceQT4/monIncludePanel.py index e09eb076..21e39c61 100644 --- a/InterfaceQT4/monIncludePanel.py +++ b/InterfaceQT4/monIncludePanel.py @@ -25,8 +25,8 @@ from qtCommun import QTPanel from qtCommun import QTPanelTBW1 from qtCommun import QTPanelTBW2 from qtCommun import QTPanelTBW3 -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr from desInclude import Ui_DInc1 diff --git a/InterfaceQT4/monListeParamPanel.py b/InterfaceQT4/monListeParamPanel.py index 6824bc97..9e8a7790 100644 --- a/InterfaceQT4/monListeParamPanel.py +++ b/InterfaceQT4/monListeParamPanel.py @@ -21,8 +21,8 @@ # Modules Eficas from desListeParam import Ui_DLisParam -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * # Import des panels class DLisParam(Ui_DLisParam,QDialog): diff --git a/InterfaceQT4/monMCFactPanel.py b/InterfaceQT4/monMCFactPanel.py index 45663ce3..a4dc0d2f 100644 --- a/InterfaceQT4/monMCFactPanel.py +++ b/InterfaceQT4/monMCFactPanel.py @@ -23,8 +23,8 @@ from desMCFact import Ui_DMCFact from qtCommun import QTPanel from qtCommun import QTPanelTBW1 -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class DMCFact(Ui_DMCFact,QDialog): def __init__(self,parent ,modal ) : diff --git a/InterfaceQT4/monMCListAjoutPanel.py b/InterfaceQT4/monMCListAjoutPanel.py index 13b3fe49..cc1f1361 100644 --- a/InterfaceQT4/monMCListAjoutPanel.py +++ b/InterfaceQT4/monMCListAjoutPanel.py @@ -21,8 +21,8 @@ # Modules Eficas from desMCListAjout import Ui_DMCListAjout -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from qtCommun import QTPanel diff --git a/InterfaceQT4/monMacroPanel.py b/InterfaceQT4/monMacroPanel.py index 7f62a947..b90ed091 100644 --- a/InterfaceQT4/monMacroPanel.py +++ b/InterfaceQT4/monMacroPanel.py @@ -25,9 +25,9 @@ from qtCommun import QTPanel from qtCommun import QTPanelTBW1 from qtCommun import QTPanelTBW2 from qtCommun import QTPanelTBW3 -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr class DMacro(Ui_DComm,QDialog): diff --git a/InterfaceQT4/monMatricePanel.py b/InterfaceQT4/monMatricePanel.py index d8bca638..f34e3c92 100644 --- a/InterfaceQT4/monMatricePanel.py +++ b/InterfaceQT4/monMatricePanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr from desMatrice import Ui_desMatrice diff --git a/InterfaceQT4/monOptionsPdf.py b/InterfaceQT4/monOptionsPdf.py index 0ebbd486..c52f1f63 100644 --- a/InterfaceQT4/monOptionsPdf.py +++ b/InterfaceQT4/monOptionsPdf.py @@ -18,8 +18,8 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from OptionsPdf import Ui_desPdf diff --git a/InterfaceQT4/monOptions_ASTER.py b/InterfaceQT4/monOptions_ASTER.py index 7e3ef8a1..2ab5ddc7 100644 --- a/InterfaceQT4/monOptions_ASTER.py +++ b/InterfaceQT4/monOptions_ASTER.py @@ -21,8 +21,8 @@ import os, re from Extensions.i18n import tr -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from OptionsEditeur import Ui_desOptions diff --git a/InterfaceQT4/monOptions_CUVE2DG.py b/InterfaceQT4/monOptions_CUVE2DG.py index e4cb4d7a..8a15a653 100644 --- a/InterfaceQT4/monOptions_CUVE2DG.py +++ b/InterfaceQT4/monOptions_CUVE2DG.py @@ -20,8 +20,8 @@ import os, re, sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from OptionsCuve import Ui_desOptions diff --git a/InterfaceQT4/monOptions_MAP.py b/InterfaceQT4/monOptions_MAP.py index 8cb59c99..67f1eba3 100644 --- a/InterfaceQT4/monOptions_MAP.py +++ b/InterfaceQT4/monOptions_MAP.py @@ -20,8 +20,8 @@ import os, re, sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from OptionsMAP import Ui_desOptionsMap diff --git a/InterfaceQT4/monOptions_OPENTURNS_STUDY.py b/InterfaceQT4/monOptions_OPENTURNS_STUDY.py index f255a665..711780c3 100644 --- a/InterfaceQT4/monOptions_OPENTURNS_STUDY.py +++ b/InterfaceQT4/monOptions_OPENTURNS_STUDY.py @@ -20,8 +20,8 @@ import os, re, sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from OptionsOT import Ui_desOptions diff --git a/InterfaceQT4/monOptions_OPENTURNS_WRAPPER.py b/InterfaceQT4/monOptions_OPENTURNS_WRAPPER.py index 30746240..1fe31cd7 100644 --- a/InterfaceQT4/monOptions_OPENTURNS_WRAPPER.py +++ b/InterfaceQT4/monOptions_OPENTURNS_WRAPPER.py @@ -20,8 +20,8 @@ import os, re, sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from OptionsOT import Ui_desOptions diff --git a/InterfaceQT4/monParamPanel.py b/InterfaceQT4/monParamPanel.py index e07bad8b..b906c3bb 100644 --- a/InterfaceQT4/monParamPanel.py +++ b/InterfaceQT4/monParamPanel.py @@ -22,9 +22,9 @@ import string,types,os,re # Modules Eficas -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr from desParam import Ui_DParam diff --git a/InterfaceQT4/monPixmap.py b/InterfaceQT4/monPixmap.py index 7d3ac75d..9b0890fc 100644 --- a/InterfaceQT4/monPixmap.py +++ b/InterfaceQT4/monPixmap.py @@ -21,10 +21,8 @@ # Modules Eficas from desPixmap import Ui_LabelPixmap -from PyQt4 import * -from PyQt4.QtCore import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr diff --git a/InterfaceQT4/monPlusieursASSDPanel.py b/InterfaceQT4/monPlusieursASSDPanel.py index 58174cb5..b2f5783b 100644 --- a/InterfaceQT4/monPlusieursASSDPanel.py +++ b/InterfaceQT4/monPlusieursASSDPanel.py @@ -20,9 +20,9 @@ # Modules Python import string,types,os -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr diff --git a/InterfaceQT4/monPlusieursBasePanel.py b/InterfaceQT4/monPlusieursBasePanel.py index 1a74848c..4ad662c2 100644 --- a/InterfaceQT4/monPlusieursBasePanel.py +++ b/InterfaceQT4/monPlusieursBasePanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from desPlusieursBase import Ui_DPlusBase from qtCommun import QTPanel diff --git a/InterfaceQT4/monPlusieursIntoPanel.py b/InterfaceQT4/monPlusieursIntoPanel.py index defb8040..b03a2d5c 100644 --- a/InterfaceQT4/monPlusieursIntoPanel.py +++ b/InterfaceQT4/monPlusieursIntoPanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr from desPlusieursInto import Ui_DPlusInto diff --git a/InterfaceQT4/monPoursuitePanel.py b/InterfaceQT4/monPoursuitePanel.py index f5e50363..6d69d744 100644 --- a/InterfaceQT4/monPoursuitePanel.py +++ b/InterfaceQT4/monPoursuitePanel.py @@ -21,9 +21,9 @@ # Modules Eficas import os,traceback,sys -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr import convert diff --git a/InterfaceQT4/monRacinePanel.py b/InterfaceQT4/monRacinePanel.py index d615cf58..ae5266b8 100644 --- a/InterfaceQT4/monRacinePanel.py +++ b/InterfaceQT4/monRacinePanel.py @@ -24,9 +24,9 @@ from desRacine import Ui_DRac from qtCommun import QTPanel from qtCommun import QTPanelTBW2 -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class DRac(Ui_DRac,QWidget): def __init__(self,parent ,modal = 0 ) : diff --git a/InterfaceQT4/monRecherche.py b/InterfaceQT4/monRecherche.py index 7511f974..fa76f189 100644 --- a/InterfaceQT4/monRecherche.py +++ b/InterfaceQT4/monRecherche.py @@ -21,9 +21,9 @@ # Modules Eficas from desRecherche import Ui_desRecherche -from PyQt4 import * -from PyQt4.QtCore import * -from PyQt4.QtGui import * +from PyQt5 import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * # Import des panels diff --git a/InterfaceQT4/monSelectImage.py b/InterfaceQT4/monSelectImage.py index 2215c374..74bb22d3 100644 --- a/InterfaceQT4/monSelectImage.py +++ b/InterfaceQT4/monSelectImage.py @@ -21,8 +21,8 @@ # Modules Eficas from desImage import Ui_DSelImage -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class DSelImage(Ui_DSelImage,QDialog): def __init__(self,parent ,modal ) : diff --git a/InterfaceQT4/monSelectVal.py b/InterfaceQT4/monSelectVal.py index 4e7b0b3e..f8c6c30d 100644 --- a/InterfaceQT4/monSelectVal.py +++ b/InterfaceQT4/monSelectVal.py @@ -21,8 +21,8 @@ # Modules Eficas from desSelectVal import Ui_DSelVal -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class DSelVal(Ui_DSelVal,QDialog): def __init__(self,parent ,modal ) : diff --git a/InterfaceQT4/monUniqueASSDPanel.py b/InterfaceQT4/monUniqueASSDPanel.py index fc7235d7..4339d0a5 100644 --- a/InterfaceQT4/monUniqueASSDPanel.py +++ b/InterfaceQT4/monUniqueASSDPanel.py @@ -23,8 +23,8 @@ from Extensions.i18n import tr # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from desUniqueASSD import Ui_DUnASSD from qtCommun import QTPanel diff --git a/InterfaceQT4/monUniqueBasePanel.py b/InterfaceQT4/monUniqueBasePanel.py index 85579f0c..6b5a5211 100644 --- a/InterfaceQT4/monUniqueBasePanel.py +++ b/InterfaceQT4/monUniqueBasePanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr diff --git a/InterfaceQT4/monUniqueBoolPanel.py b/InterfaceQT4/monUniqueBoolPanel.py index 79f07a2a..42c0a0d1 100644 --- a/InterfaceQT4/monUniqueBoolPanel.py +++ b/InterfaceQT4/monUniqueBoolPanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr diff --git a/InterfaceQT4/monUniqueCompPanel.py b/InterfaceQT4/monUniqueCompPanel.py index 9fb55e41..f981a1d3 100644 --- a/InterfaceQT4/monUniqueCompPanel.py +++ b/InterfaceQT4/monUniqueCompPanel.py @@ -21,8 +21,8 @@ import string,types,os,re # Modules Eficas -from PyQt4.QtCore import * -from PyQt4.QtGui import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * from Extensions.i18n import tr diff --git a/InterfaceQT4/monUniqueIntoPanel.py b/InterfaceQT4/monUniqueIntoPanel.py index be39f130..4a580ca7 100644 --- a/InterfaceQT4/monUniqueIntoPanel.py +++ b/InterfaceQT4/monUniqueIntoPanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr diff --git a/InterfaceQT4/monUniqueSDCOIntoPanel.py b/InterfaceQT4/monUniqueSDCOIntoPanel.py index d260f2bb..51ef8356 100644 --- a/InterfaceQT4/monUniqueSDCOIntoPanel.py +++ b/InterfaceQT4/monUniqueSDCOIntoPanel.py @@ -21,9 +21,9 @@ import string,types,os # Modules Eficas -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr from desUniqueSDCOInto import Ui_DUnSDCOInto diff --git a/InterfaceQT4/monUniqueSDCOPanel.py b/InterfaceQT4/monUniqueSDCOPanel.py index e088a3d5..9d5fd61d 100644 --- a/InterfaceQT4/monUniqueSDCOPanel.py +++ b/InterfaceQT4/monUniqueSDCOPanel.py @@ -21,8 +21,8 @@ import string,types,os # Modules Eficas -from PyQt4.QtCore import * -from PyQt4.QtGui import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * from Extensions.i18n import tr from desUniqueSDCO import Ui_DUnSDCO diff --git a/InterfaceQT4/monVisu.py b/InterfaceQT4/monVisu.py index 79cb99f1..7fc05737 100644 --- a/InterfaceQT4/monVisu.py +++ b/InterfaceQT4/monVisu.py @@ -21,9 +21,9 @@ # Modules Eficas from desVisu import Ui_DVisu -from PyQt4 import * -from PyQt4.QtCore import * -from PyQt4.QtGui import * +from PyQt5 import * +from PyQt5.QtCore import * +from PyQt5.QtGui import * # Import des panels diff --git a/InterfaceQT4/qtCommun.py b/InterfaceQT4/qtCommun.py index 70e23e0c..74147263 100644 --- a/InterfaceQT4/qtCommun.py +++ b/InterfaceQT4/qtCommun.py @@ -21,9 +21,9 @@ import string,types,os import traceback -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr # Import des panels diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index 9d3f89e2..7212f5de 100644 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -20,8 +20,8 @@ import os, sys -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from myMain import Ui_Eficas from viewManager import MyTabview from getVersion import getEficasVersion diff --git a/InterfaceQT4/qtSaisie.py b/InterfaceQT4/qtSaisie.py index 0d0a57c7..2c494a3a 100644 --- a/InterfaceQT4/qtSaisie.py +++ b/InterfaceQT4/qtSaisie.py @@ -19,9 +19,9 @@ # # Modules Python import string,types,os -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr diff --git a/InterfaceQT4/readercata.py b/InterfaceQT4/readercata.py index 48ac7885..75548707 100644 --- a/InterfaceQT4/readercata.py +++ b/InterfaceQT4/readercata.py @@ -42,9 +42,9 @@ from monChoixCata import MonChoixCata from Extensions.i18n import tr from Extensions.eficas_exception import EficasException -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * class READERCATA: diff --git a/InterfaceQT4/typeNode.py b/InterfaceQT4/typeNode.py index 86bf664c..f6fe15c6 100644 --- a/InterfaceQT4/typeNode.py +++ b/InterfaceQT4/typeNode.py @@ -17,9 +17,9 @@ # # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4 import * -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5 import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr import types diff --git a/InterfaceQT4/utilIcons.py b/InterfaceQT4/utilIcons.py index be2cc866..0afb4c67 100644 --- a/InterfaceQT4/utilIcons.py +++ b/InterfaceQT4/utilIcons.py @@ -18,7 +18,7 @@ # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com # -from PyQt4.QtGui import QPixmap, QIcon +from PyQt5.QtGui import QPixmap, QIcon import os class PixmapCache: @@ -65,7 +65,7 @@ def getIcon(key): return QIcon(key) -#from PyQt4.Qt3Support import Q3MimeSourceFactory +#from PyQt5.Qt3Support import Q3MimeSourceFactory #def initializeMimeSourceFactory(): """ diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 344cc330..290720f8 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -19,8 +19,8 @@ # import os, string -from PyQt4.QtGui import * -from PyQt4.QtCore import * +from PyQt5.QtGui import * +from PyQt5.QtCore import * from Extensions.i18n import tr DictExtensions= {"MAP" : ".map .input"} diff --git a/Noyau/N_ENTITE.py b/Noyau/N_ENTITE.py index e74d4ddf..1937b546 100644 --- a/Noyau/N_ENTITE.py +++ b/Noyau/N_ENTITE.py @@ -33,7 +33,7 @@ import N_VALIDATOR from strfunc import ufmt try: - from PyQt4 import QtCore + from PyQt5 import QtCore stringTypes = (str, unicode, QtCore.QString) except ImportError: stringTypes = (str, unicode) diff --git a/UiQT4/makefile b/UiQT4/makefile index 5c36754b..d16f37d4 100644 --- a/UiQT4/makefile +++ b/UiQT4/makefile @@ -1,5 +1,5 @@ -PYUIC = pyuic4 -QTRELEASE = lrelease-qt4 +PYUIC = pyuic5 +QTRELEASE = lrelease .PHONY : all .SUFFIXES : .ui .py .ts .qm diff --git a/ZCracks/mesScripts.py b/ZCracks/mesScripts.py index 9756cd67..b526fa5f 100644 --- a/ZCracks/mesScripts.py +++ b/ZCracks/mesScripts.py @@ -4,12 +4,12 @@ def view_med(params,appli) : fileName=mcSimp.valeur import os if not os.path.isfile(fileName) : - from PyQt4.QtGui import QMessageBox + from PyQt5.QtGui import QMessageBox QMessageBox.warning( None, "Erreur","Le fichier n'existe pas") return result,message=appli.importMedFile(fileName) if result==1 : return - from PyQt4.QtGui import QMessageBox + from PyQt5.QtGui import QMessageBox QMessageBox.warning( None, "Erreur a l import",message) return diff --git a/ZCracks/qtEficas_ZCracks.py b/ZCracks/qtEficas_ZCracks.py index b1254f2c..c0a13df8 100755 --- a/ZCracks/qtEficas_ZCracks.py +++ b/ZCracks/qtEficas_ZCracks.py @@ -27,7 +27,7 @@ import sys,os sys.path.append(os.path.join(os.path.abspath(os.path.dirname(__file__)),'..')) -from PyQt4.QtCore import * +from PyQt5.QtCore import * import prefs from InterfaceQT4 import eficas_go eficas_go.lance_eficas(code=prefs.code)