From: Pascale Noyret Date: Tue, 9 Nov 2010 15:26:48 +0000 (+0000) Subject: *** empty log message *** X-Git-Tag: LOGILAB~396 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd28bc17257ced2b55293b1bf7e1cabc906d8cf6;p=tools%2Feficas.git *** empty log message *** --- diff --git a/InterfaceQT4/qtCommun.py b/InterfaceQT4/qtCommun.py index a3264b16..6f03ed97 100644 --- a/InterfaceQT4/qtCommun.py +++ b/InterfaceQT4/qtCommun.py @@ -42,7 +42,16 @@ class QTPanel: def __init__(self,node, parent = None): self.editor = parent self.node = node - + if hasattr(self,'TWChoix'): + self.connect(self.TWChoix, SIGNAL("currentChanged(QWidget *)"), self.GestionBALpha) + + def GestionBALpha(self,fenetre): + if self.TWChoix.currentIndex()!=0: + self.BAlpha.hide() + else : + self.BAlpha.setVisible(True) + self.BuildLBMCPermis() + def BOkPressed(self): """ Impossible d utiliser les vrais labels avec designer ?? """ label=self.TWChoix.tabText(self.TWChoix.currentIndex()) @@ -112,10 +121,10 @@ class QTPanelTBW1(QTPanel): def BAlphaPressed (self): if self.alpha == 0 : self.alpha=1 - self.BAlpha.setText("Catalogue") + self.BAlpha.setText("Tri Cata") else : self.alpha=0 - self.BAlpha.setText("Alphabetique") + self.BAlpha.setText("Tri Alpha") self.BuildLBMCPermis() @@ -125,6 +134,8 @@ class QTPanelTBW1(QTPanel): jdc = self.node.item.get_jdc() genea =self.node.item.get_genealogie() liste_mc=self.node.item.get_liste_mc_ordonnee(genea,jdc.cata_ordonne_dico) + if ((len(liste_mc) < 10) and (hasattr(self,'BAlpha'))): + self.BAlpha.hide() if self.alpha == 1 : liste_mc.sort() for aMc in liste_mc: diff --git a/InterfaceQT4/qtEficas.py b/InterfaceQT4/qtEficas.py index e25b0626..3f135c32 100644 --- a/InterfaceQT4/qtEficas.py +++ b/InterfaceQT4/qtEficas.py @@ -342,10 +342,10 @@ class Appli(Ui_Eficas,QMainWindow): self.viewmanager.saveAsCurrentEditor() def fileClose(self): - self.viewmanager.handleClose() + self.viewmanager.handleClose(texte='&Fermer') def fileCloseAll(self): - self.viewmanager.handleCloseAll() + self.viewmanager.handleCloseAll(texte='&Fermer') def fileExit(self): # On peut sortir sur Abort diff --git a/InterfaceQT4/viewManager.py b/InterfaceQT4/viewManager.py index 4ab1b299..76ac82d9 100644 --- a/InterfaceQT4/viewManager.py +++ b/InterfaceQT4/viewManager.py @@ -53,11 +53,11 @@ class MyTabview: self.appliEficas.addToRecentList(fichier) maPage=self.getEditor( fichier,units=units) - def handleClose(self,doitSauverRecent = 1): + def handleClose(self,doitSauverRecent = 1,texte='&Quitter'): if doitSauverRecent : self.appliEficas.sauveRecents() index=self.myQtab.currentIndex() if index < 0 : return - res=self.checkDirty(self.dict_editors[index]) + res=self.checkDirty(self.dict_editors[index],texte) if res == 2 : return 2 # l utilisateur a annule index=self.myQtab.currentIndex() idx=index @@ -97,12 +97,12 @@ class MyTabview: editor=self.dict_editors[index] editor.saveYACS() - def handleCloseAll(self): + def handleCloseAll(self,texte='Quitter'): res=0 self.appliEficas.sauveRecents() while len(self.dict_editors) > 0 : self.myQtab.setCurrentIndex(0) - res=self.handleClose(0) + res=self.handleClose(0,texte) if res==2 : return res # l utilsateur a annule return res @@ -259,7 +259,7 @@ class MyTabview: return 0 - def checkDirty(self, editor): + def checkDirty(self, editor,texte): """ Private method to check dirty status and open a message window. @@ -272,7 +272,7 @@ class MyTabview: None, self.appliEficas.trUtf8("Fichier Duplique"), self.appliEficas.trUtf8("Le fichier ne sera pas sauvegarde."), - self.appliEficas.trUtf8("&Quitter"), + Eficas.trUtf8(texte), self.appliEficas.trUtf8("&Annuler")) if res == 0 : return 1 return 0 @@ -284,7 +284,7 @@ class MyTabview: self.appliEficas.trUtf8("Fichier Modifie"), self.appliEficas.trUtf8("Le fichier %1 n a pas ete sauvegarde.") .arg(fn), self.appliEficas.trUtf8("&Sauvegarder"), - self.appliEficas.trUtf8("&Quitter "), + self.appliEficas.trUtf8(texte), self.appliEficas.trUtf8("&Annuler") ) if res == 0: (ok, newName) = editor.saveFile()