X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FTools%2Fpadder%2Fspadderpy%2Fgui%2Fplugindialog.py;h=bc5baa52b2f98edd8ed61c86cc3492511d1c36e0;hb=499f29d24922cec66e41b41a0039a954993bc6df;hp=fff90b9fb9c986539c1785b6668c57090591188c;hpb=264eeb2edd6977ccf2d2bd88cbb210353f63f7c9;p=modules%2Fsmesh.git diff --git a/src/Tools/padder/spadderpy/gui/plugindialog.py b/src/Tools/padder/spadderpy/gui/plugindialog.py index fff90b9fb..bc5baa52b 100644 --- a/src/Tools/padder/spadderpy/gui/plugindialog.py +++ b/src/Tools/padder/spadderpy/gui/plugindialog.py @@ -1,5 +1,5 @@ # -*- coding: iso-8859-1 -*- -# Copyright (C) 2011-2016 EDF R&D +# Copyright (C) 2011-2022 EDF R&D # # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public @@ -22,10 +22,10 @@ from qtsalome import QDialog, QIcon, Qt -from plugindialog_ui import Ui_PluginDialog -from inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM -from inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMAXRMIN -from inputdata import InputData +from salome.smesh.spadder.gui.plugindialog_ui import Ui_PluginDialog +from salome.smesh.spadder.gui.inputdialog import InputDialog, INPUTDATA_KEY_FILES, INPUTDATA_KEY_PARAM +from salome.smesh.spadder.gui.inputdialog import PARAM_KEY_NBITER, PARAM_KEY_RMAXRMIN +from salome.smesh.spadder.gui.inputdata import InputData # __GBO__: uncomment this line and comment the previous one to use the # demo input dialog instead of the real one. #from demoinputdialog import InputDialog @@ -87,7 +87,7 @@ class PluginDialog(QDialog): self.__ui.btnClear.setIcon(icon) # Then, we can connect the slot to there associated button event - self.__ui.btnInput.clicked.connect( self.onInput ) + 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 ) @@ -100,10 +100,10 @@ class PluginDialog(QDialog): def setupJobManager(self): ''' - This function configures the jobmanager by transmiting the + This function configures the jobmanager by transmitting the parameters required for a local execution and a remote execution. The choice between "local" and "remote" is done at - the initialize step, by specifing the name of the resource to + the initialize step, by specifying the name of the resource to be used. ''' # We first @@ -140,7 +140,7 @@ class PluginDialog(QDialog): self.__inputDialog.windowFlags() | Qt.WindowStaysOnTopHint) # The signal inputValidated emitted from inputDialog is # connected to the slot function onProcessInput: - self.__inputDialog.inputValidated.connect( self.onProcessInput ) + self.__inputDialog.inputValidated.connect( self.onProcessInput ) else: self.__ui.frameInput.setVisible(True) @@ -179,7 +179,7 @@ class PluginDialog(QDialog): servant. Note that the component is loaded on first demand, and then the reference is recycled. """ - if self.__dict__.has_key("__jobManager") and self.__jobManager is not None: + if "__jobManager" in self.__dict__ and self.__jobManager is not None: return self.__jobManager # WARN: we first have to update the SALOME components catalog @@ -211,7 +211,7 @@ class PluginDialog(QDialog): name. This returns the filename. ''' filename=str("/tmp/padder_inputfile_"+meshName+".med") - meshObject.ExportToMEDX( filename, 0, SMESH.MED_V2_2, 1, 1 ) + meshObject.ExportMED(filename, False, True, True) return filename def clear(self): @@ -294,7 +294,7 @@ class PluginDialog(QDialog): # And to create a list of the additional parameters. # WARN: the CORBA interface requires string values. meshJobParameterList=[] - for inputParameterKey in self.__dictInputParameters.keys(): + for inputParameterKey in self.__dictInputParameters: value = self.__dictInputParameters[inputParameterKey] parameter = MESHJOB.MeshJobParameter(name=inputParameterKey,value=str(value)) meshJobParameterList.append(parameter) @@ -417,6 +417,3 @@ def TEST_PluginDialog(): if __name__ == "__main__": TEST_PluginDialog() - - -