]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
pour tests Telemac
authorpascale.noyret <pascale.noyret@edf.fr>
Thu, 12 Apr 2018 15:47:47 +0000 (17:47 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Thu, 12 Apr 2018 15:47:47 +0000 (17:47 +0200)
InterfaceQT4/editorSsIhm.py
InterfaceQT4/viewManagerSsIhm.py

index bcda1c0c93153e257b1053b71e8b4e232df0ab90..aa2da8e20c1e6fc7d4ab317d5c6b2babd6e39c7b 100755 (executable)
@@ -519,16 +519,17 @@ class JDCEditorSsIhm :
     #-----------------------------------------------------------------#
         if fileName != None :
            self.fichier = fileName
-           return self.saveFileLeger()
+           return self.saveFileLeger(fileName)
         return self.saveFileLeger()
 
     #-----------------------------------------------------------------#
-    def saveFileLeger(self, fichier, formatLigne="beautifie"):
+    def saveFileComplet(self, fichier = None, formatLigne="beautifie"):
     #-----------------------------------------------------------------#
         fn = fichier
         self.generator=generator.plugins[self.format]()
-        if hasattr(self.generator, "writeLeger"):
-            self.generator.writeLeger(fichier,self.jdc,config=self.appliEficas.maConfiguration,appli=self.appliEficas)
+        print (self.generator)
+        if hasattr(self.generator, "writeComplet"):
+            self.generator.writeComplet(fichier,self.jdc,config=self.appliEficas.maConfiguration,appli=self.appliEficas)
 
 
 # ---------------------------------------------
@@ -580,7 +581,7 @@ class JDCEditorSsIhm :
         if not (self.writeFile(fichier,formatLigne=formatLigne)): return (0, None)
         self.fichierOut = fichier
 
-        if self.jdc.isvalid() != 0 and hasattr(self.generator, "writeDefault"):
+        if self.jdc.isValid() != 0 and hasattr(self.generator, "writeDefault"):
             self.generator.writeDefault(fichier)
         elif self.code=="TELEMAC" and hasattr(self.generator, "writeDefault"):
             self.generator.writeDefault(fichier)
index c0d856d11f8fa099683203a11b478163cfcb59a9..a588c7923b61b074f9b825ca038340a8589f5f29 100644 (file)
@@ -67,6 +67,14 @@ class JdcSsIhmHandler(object):
 #  -------------------------
        return self.viewManagerSsIhm.isJdcValid(self)
 
+   def fileSaveAs(self,fileName):
+#  -------------------------
+       return self.viewManagerSsIhm.fileSaveAs(self,fileName)
+
+   def fileLegerSaveAs(self,fileName):
+#  -----------------------------------
+       return self.viewManagerSsIhm.fileLegerSaveAs(self,fileName)
+
 
 
 #--------------------------------
@@ -202,6 +210,23 @@ class MyViewManagerSsIhm(object):
         return self.dictEditors[handler].jdc.isValid()
 
 
+#  ---------------------------------------------
+   def fileSaveAs(self,handler,fileName):
+#  ---------------------------------------------
+        print (handler)
+        if not (handler in self.dictEditors) :
+           print ('editor non trouve')
+           return
+        return self.dictEditors[handler].saveFile(fileName)
+
+#  ---------------------------------------------
+   def fileLegerSaveAs(self, handler,fileName):
+#  ---------------------------------------------
+#        print (handler)
+        if not (handler in self.dictEditors) :
+           print ('editor non trouve')
+           return
+        self.dictEditors[handler].saveFileLegerAs(fileName)
 
 
 #   def handleClose(self,doitSauverRecent = 1,texte=tr('&Quitter')):