def __init__(self,node, parent = None):
self.editor = parent
self.node = node
- self.alpha = 0
+ if not(hasattr(self.node,'alpha')): self.node.alpha = 0
self.BuildLBMCPermis()
self.AppelleBuildLBRegles()
if hasattr(self,'BAlpha'):
self.connect(self.BAlpha,SIGNAL("clicked()"),self.BAlphaPressed)
def BAlphaPressed (self):
- if self.alpha == 0 :
- self.alpha=1
+ if self.node.alpha == 0 :
+ self.node.alpha=1
self.BAlpha.setText("Tri Cata")
else :
- self.alpha=0
+ self.node.alpha=0
self.BAlpha.setText("Tri Alpha")
self.BuildLBMCPermis()
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:
- self.LBMCPermis.addItem( aMc)
- if len(liste_mc) !=0:
- self.LBMCPermis.setCurrentItem(self.LBMCPermis.item(0))
+ if self.node.alpha == 1 : liste_mc.sort()
+ for aMc in liste_mc: self.LBMCPermis.addItem( aMc)
+ if len(liste_mc) !=0: self.LBMCPermis.setCurrentItem(self.LBMCPermis.item(0))
def DefMC(self,item):
self.LBNouvCommande.clear()
jdc=self.node.item.object.get_jdc_root()
+
+ listeGroupes,dictGroupes=jdc.get_groups()
+ if "CACHE" in dictGroupes.keys():
+ aExclure=dictGroupes["CACHE"]
+ else:
+ aExclure=()
if self.editor.mode_nouv_commande == "alpha":
self.RBalpha.setChecked(True)
self.RBGroupe.setChecked(False)
listeCmd = jdc.get_liste_cmd()
for aCmd in listeCmd:
- self.LBNouvCommande.addItem( aCmd )
+ if aCmd not in aExclure :
+ self.LBNouvCommande.addItem( aCmd )
elif self.editor.mode_nouv_commande== "groupe" :
self.RBGroupe.setChecked(True)
self.RBalpha.setChecked(False)
self.LBNouvCommande.addItem( texte )
self.LBNouvCommande.addItem( " " )
for aCmd in listeCmd:
+ if aCmd not in aExclure :
self.LBNouvCommande.addItem( aCmd)
self.LBNouvCommande.addItem( " " )
elif self.editor.mode_nouv_commande== "initial" :
def saveFile(self):
#recuperation du nom du fichier
+ if self.editor != None :
+ dir=elf.editor.appliEficas.CONFIGURATION.savedir
+ else:
+ dir='/tmp'
fn = QFileDialog.getSaveFileName(None,
self.trUtf8("Save File"),
- self.editor.appliEficas.CONFIGURATION.savedir)
+ dir)
if fn.isNull() : return
ulfile = os.path.abspath(unicode(fn))
self.editor.appliEficas.CONFIGURATION.savedir=os.path.split(ulfile)[0]