Salome HOME
Push double click
[modules/smesh.git] / src / Tools / YamsPlug / monViewText.py
index 19dcd3ea238fbdb6a2a10c09b7a4a27648261313..a613f5d6b893708d76e3dc7cff40155ed988c898 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: iso-8859-1 -*-
-# Copyright (C) 2007-201  EDF R&D
+# Copyright (C) 2007-2013  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
@@ -17,6 +17,7 @@
 #
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
+
 # Modules Python
 import string,types,os
 import traceback
@@ -36,6 +37,7 @@ class MonViewText(Ui_ViewExe,QDialog):
     """
     def __init__(self,parent,txt):
         QDialog.__init__(self,parent)
+        self.pere=parent
         self.setupUi(self)
         self.resize( QSize(600,600).expandedTo(self.minimumSizeHint()) )
         self.connect( self.PB_Ok,SIGNAL("clicked()"), self, SLOT("close()") )
@@ -45,6 +47,7 @@ class MonViewText(Ui_ViewExe,QDialog):
 
         self.connect(self.monExe, SIGNAL("readyReadStandardOutput()"), self.readFromStdOut )
         self.connect(self.monExe, SIGNAL("readyReadStandardError()"), self.readFromStdErr )
+        self.connect(self.monExe, SIGNAL("finished(int  )"), self.exeFinished )
       
         # Je n arrive pas a utiliser le setEnvironment du QProcess
         # fonctionne hors Salome mais pas dans Salome ???
@@ -61,6 +64,8 @@ class MonViewText(Ui_ViewExe,QDialog):
         self.monExe.closeWriteChannel()
         self.show()
 
+    def exeFinished(self):
+        self.pere.enregistreResultat()
         
     def saveFile(self):
         #recuperation du nom du fichier