- def getCurrentFileName(self):
- index = self.viewmanager.myQtab.currentIndex()
- print index
- rtn = ""
- if index > 0 :
- rtn = self.viewmanager.myQtab.tabText(index)
- return rtn
+ def getCaseName(self):
+ if self.__close_editor is None:
+ index = self.viewmanager.myQtab.currentIndex()
+ CaseName = self.viewmanager.myQtab.tabText(index)
+ return CaseName
+ else:
+ CaseName = self.__close_editor.fichier.split('/')[-1]
+ return CaseName
+
+ def fileOpen(self):
+ """
+ @overload
+ """
+ QtGui.QMessageBox.warning( self, "Alerte", "You cannot Open a Case into Eficas window when you are using Datassim SALOME module")
+
+ def fileClose(self):
+ """
+ @overload
+ """
+ index = self.viewmanager.myQtab.currentIndex()
+ self.__close_editor = self.viewmanager.dict_editors[index]
+ res = self.viewmanager.handleClose(self)
+ if res != 2: # l utilsateur a annule
+ if self.__close_editor.fichier is None:
+ # We have to destroy the case
+ self.notifyObserver(EficasEvent.EVENT_TYPES.DESTROY)
+ self.__myCallbackId.pop(self.__close_editor)
+ else:
+ # Il faudrait en faire plus -> Voir Edit dans SALOME !
+ self.notifyObserver(EficasEvent.EVENT_TYPES.SAVE)
+ self.__myCallbackId.pop(self.__close_editor)
+ self.__close_editor = None
+ return res
+
+ def fileCloseAll(self):
+ """
+ @overload
+ """
+ while len(self.viewmanager.dict_editors) > 0:
+ self.viewmanager.myQtab.setCurrentIndex(0)
+ res = self.fileClose()
+ if res==2 : return res # l utilsateur a annule