X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=InterfaceQT4%2FviewManager.py;h=c393cf34cb49e420699003c37ddaf377500b6c97;hb=68af27699b3d841d7d3b21223cbf4e27e4ddd45c;hp=7edd5b1c33889326ad1e2e28766c264fa9b78945;hpb=16d5922e798b1254eb558678612711d72ed38b32;p=tools%2Feficas.git diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 7edd5b1c..c393cf34 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -37,6 +37,7 @@ class MyTabview: self.doubles = {} self.myQtab = self.appliEficas.myQtab + self.myQtab.connect(self.myQtab, SIGNAL('tabCloseRequested(int)'), self.closeTab) if self.appliEficas.multi== True: self.myQtab.connect(self.myQtab,SIGNAL("currentChanged(int)"),self.indexChanged) @@ -77,6 +78,9 @@ class MyTabview: if maPage : self.myQtab.setTabText(self.myQtab.indexOf(maPage),os.path.basename(fichier)) return result + def closeTab(self): + self.handleClose() + def handleClose(self,doitSauverRecent = 1,texte=tr('&Quitter')): if doitSauverRecent : self.appliEficas.sauveRecents() index=self.myQtab.currentIndex() @@ -172,6 +176,13 @@ class MyTabview: if index < 0 : return self.dict_editors[index].viewJdcSource() + def handlegestionParam(self): + index=self.myQtab.currentIndex() + if index < 0 : + QMessageBox.warning( self.appliEficas,tr(u"Creation Parametre indisponible"),tr(u"les parametres sont lies a un jeu de donnees")) + return + self.dict_editors[index].gestionParam() + def handleViewJdcRapport(self): index=self.myQtab.currentIndex() if index < 0 : return @@ -199,6 +210,24 @@ class MyTabview: self.myQtab.setTabText(index,fileName) return ok + def sauveLigneCurrentEditor(self): + index=self.myQtab.currentIndex() + if index < 0 : return + editor=self.dict_editors[index] + if editor in self.doubles.keys() : + QMessageBox.warning( + None, + tr("Fichier Duplique"), + tr("Le fichier ne sera pas sauvegarde."), + tr("&Annuler")) + return + ok, newName = editor.sauveLigneFile() + if ok : + fileName=os.path.basename(unicode(newName)) + self.myQtab.setTabText(index,fileName) + return ok + + def saveAsCurrentEditor(self): index=self.myQtab.currentIndex() editor=self.dict_editors[index] @@ -262,7 +291,7 @@ class MyTabview: #PNPNPNPN --> a affiner if fichier is None: self.untitledCount += 1 - self.myQtab.addTab(win, tr("Fichier non encore nommé ", self.untitledCount)) + self.myQtab.addTab(win, tr("Fichier non encore nomme ", self.untitledCount)) #self.myQtab.addTab(win, str(self.appliEficas.code)) else: liste=fichier.split('/')