# -*- coding: iso-8859-1 -*-
-# Copyright (C) 2011-2015 EDF R&D
+# Copyright (C) 2011-2016 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
# 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
# The SALOME launcher resource is specified by its name as defined in
# the file CatalogResources.xml (see root directory of the
# application). We could have a check box in the dialog to specify
-# wether we want a local execution or a remote one.
+# whether we want a local execution or a remote one.
resource_name = "localhost"
from salome.smesh.spadder.configreader import ConfigReader
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()
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)
name. This returns the filename.
'''
filename=str("/tmp/padder_inputfile_"+meshName+".med")
- meshObject.ExportToMEDX( filename, 0, SMESH.MED_V2_2, 1, 1 )
+ meshObject.ExportToMEDX( filename, 0, 1, 1 )
return filename
def clear(self):
meshname = 'padder_'+str(self.__jobid)
smesh.SetName(outputMesh.GetMesh(), meshname)
if salome.sg.hasDesktop():
- salome.sg.updateObjBrowser(0)
+ salome.sg.updateObjBrowser(False)
self.__ui.lblStatusBar.setText("Publication OK")
self.__setGuiState(["CAN_SELECT"])
#
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_()