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
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()
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:
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):
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:
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)
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")
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))
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:
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 ):
if __name__=='__main__':
- from PyQt4 import *
- from PyQt4.QtGui import *
- from PyQt4.QtCore import *
# sys.path[:0]=['..','../Aster','../Aster/Cata' ]
# 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
# 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
# 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
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):
#
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
# Modules Python\r
import os, sys, string, types, re\r
import traceback\r
-from PyQt4.QtGui import QMessageBox\r
+from PyQt5.QtGui import QMessageBox\r
from Editeur.utils import read_file\r
from Extensions.i18n import tr\r
\r
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
#----------------------------------------------#
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)
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'):
"""
#
# 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
# 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
# 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
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
# 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
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 ) :
# 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
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
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):
#
-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
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
# 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):
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 ) :
# 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
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):
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
# 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
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
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
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
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
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
# 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
# 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
# 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
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
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
# 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
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 ) :
# 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
# 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 ) :
# 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 ) :
# 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
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
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
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
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
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
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
# 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
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
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
#
# 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
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:
#
# 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
# 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:
return QIcon(key)
-#from PyQt4.Qt3Support import Q3MimeSourceFactory
+#from PyQt5.Qt3Support import Q3MimeSourceFactory
#def initializeMimeSourceFactory():
"""
#
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"}
from strfunc import ufmt
try:
- from PyQt4 import QtCore
+ from PyQt5 import QtCore
stringTypes = (str, unicode, QtCore.QString)
except ImportError:
stringTypes = (str, unicode)
-PYUIC = pyuic4
-QTRELEASE = lrelease-qt4
+PYUIC = pyuic5
+QTRELEASE = lrelease
.PHONY : all
.SUFFIXES : .ui .py .ts .qm
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
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)