mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 02:10:35 +05:00
Qt5 migration
This commit is contained in:
parent
766145cb04
commit
0bd9fcdbe7
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>959</width>
|
||||
<width>974</width>
|
||||
<height>618</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>663</width>
|
||||
<width>664</width>
|
||||
<height>624</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -35,20 +35,20 @@ def fissureGeneraleDlg(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 PyQt4.QtCore import QString
|
||||
from PyQt5 import QtCore
|
||||
from PyQt5 import QtWidgets
|
||||
from PyQt5 import QtGui
|
||||
from PyQt5.QtWidgets import QFileDialog
|
||||
from PyQt5.QtWidgets import QMessageBox
|
||||
from PyQt5.QtGui import QPalette
|
||||
from PyQt5.QtGui import QColor
|
||||
from fissureGenerale_ui import Ui_Dialog
|
||||
|
||||
class fissureGeneraleDialog(QtGui.QDialog):
|
||||
class fissureGeneraleDialog(QtWidgets.QDialog):
|
||||
|
||||
def __init__(self):
|
||||
print "__init__"
|
||||
QtGui.QDialog.__init__(self)
|
||||
QtWidgets.QDialog.__init__(self)
|
||||
# Set up the user interface from Designer.
|
||||
self.ui = Ui_Dialog()
|
||||
self.ui.setupUi(self)
|
||||
@ -63,27 +63,17 @@ def fissureGeneraleDlg(context):
|
||||
self.ui.lb_calcul.hide()
|
||||
|
||||
# Connect up the buttons.
|
||||
self.connect(self.ui.pb_exemple, QtCore.SIGNAL("clicked()"),
|
||||
self.genereExemples)
|
||||
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.connect(self.ui.pb_maillage, QtCore.SIGNAL("clicked()"),
|
||||
self.selectMaillage)
|
||||
self.connect(self.ui.pb_facefiss, QtCore.SIGNAL("clicked()"),
|
||||
self.selectFacefiss)
|
||||
self.connect(self.ui.pb_reptrav, QtCore.SIGNAL("clicked()"),
|
||||
self.selectReptrav)
|
||||
self.connect(self.ui.pb_nomres, QtCore.SIGNAL("clicked()"),
|
||||
self.selectNomres)
|
||||
self.disconnect(self.ui.bb_OkCancel, QtCore.SIGNAL("accepted()"), self.accept)
|
||||
self.connect(self.ui.bb_OkCancel, QtCore.SIGNAL("accepted()"),
|
||||
self.execute)
|
||||
|
||||
self.ui.pb_exemple.clicked.connect(self.genereExemples)
|
||||
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.pb_maillage.clicked.connect(self.selectMaillage)
|
||||
self.ui.pb_facefiss.clicked.connect(self.selectFacefiss)
|
||||
self.ui.pb_reptrav.clicked.connect(self.selectReptrav)
|
||||
self.ui.bb_OkCancel.accepted.disconnect(self.accept)
|
||||
self.ui.bb_OkCancel.accepted.connect(self.execute)
|
||||
|
||||
def initDefaut(self):
|
||||
self.defaut = dict(
|
||||
@ -241,6 +231,7 @@ def fissureGeneraleDlg(context):
|
||||
fileDiag.setViewMode(QFileDialog.List)
|
||||
if fileDiag.exec_() :
|
||||
fileNames = fileDiag.selectedFiles()
|
||||
print fileNames
|
||||
filedef = fileNames[0]
|
||||
if filedef[-4:] not in ['.dic']:
|
||||
filedef += '.dic'
|
||||
@ -370,7 +361,7 @@ def fissureGeneraleDlg(context):
|
||||
# texte += repr(ligne) +"<br>"
|
||||
mbox = QMessageBox(self)
|
||||
mbox.setWindowTitle("erreur blocFissure")
|
||||
mbox.setText(QString.fromUtf8(texte))
|
||||
mbox.setText(str(texte))
|
||||
mbox.exec_()
|
||||
# except Exception as erreur:
|
||||
# print "exception non répertoriée"
|
||||
|
Loading…
Reference in New Issue
Block a user