1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2007-2013 EDF R&D
4 # This library is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU Lesser General Public
6 # License as published by the Free Software Foundation; either
7 # version 2.1 of the License.
9 # This library is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # Lesser General Public License for more details.
14 # You should have received a copy of the GNU Lesser General Public
15 # License along with this library; if not, write to the Free Software
16 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
26 from PyQt4.QtGui import *
27 from PyQt4.QtCore import *
28 from Extensions.i18n import tr
29 from monChoixCommande import MonChoixCommande
31 class JDCTree( QTreeWidget ):
32 def __init__( self, jdc_item, QWParent):
33 #if hasattr(QWParent,'widgetTree') :
34 self.editor = QWParent
36 if self.editor.widgetTree !=None :
37 QTreeWidget.__init__(self, self.editor.widgetTree )
38 self.editor.verticalLayout_2.addWidget(self)
39 if self.editor.enteteQTree=='complet':
40 self.headerItem().setText(0, "Commande ")
41 self.headerItem().setText(1, "Concept/Valeur")
43 self.headerItem().setText(0, "Commande ")
44 self.setColumnWidth(0,200)
45 self.setExpandsOnDoubleClick(False)
46 self.setSelectionMode(3)
48 QTreeWidget.__init__(self, None )
51 self.appliEficas = self.editor.appliEficas
52 self.childrenComplete=[]
53 self.childrenIssusDesBlocs=[]
54 self.racine=self.item.itemNode(self,self.item)
56 self.itemCourrant=None
58 self.connect(self, SIGNAL("itemClicked ( QTreeWidgetItem * ,int) "), self.handleOnItem)
59 self.connect(self, SIGNAL("itemCollapsed ( QTreeWidgetItem *) "), self.handleCollapsedItem)
60 self.connect(self, SIGNAL("itemExpanded ( QTreeWidgetItem *) "), self.handleExpandedItem)
62 #PNPNPN verifier dans quel cas on se trouve : affiche l arbre ou la commande
63 self.node_selected=self.racine
64 self.inhibeExpand=True
65 self.expandItem(self.racine)
66 self.inhibeExpand=False
67 #print "self.editor.afficheCommandesPliees", self.editor.afficheCommandesPliees
68 if self.racine.children !=[] :
69 if self.editor.afficheCommandesPliees : self.racine.children[0].plieToutEtReaffiche()
70 else : self.racine.children[0].deplieToutEtReaffiche()
71 else : self.racine.affichePanneau()
74 def contextMenuEvent(self,event) :
75 print "contextMenuEvent"
76 coord=event.globalPos()
77 item= self.currentItem()
78 self.handleContextMenu(item,coord)
80 def handleContextMenu(self,item,coord):
82 Private slot to show the context menu of the listview.
84 @param itm the selected listview item (QListWidgetItem)
85 @param coord the position of the mouse pointer (QPoint)
86 Attention : existeMenu permet de savoir si un menu est associe a cet item
88 print "handleContextMenu"
89 if item == None : return
90 if item.existeMenu == 0 : return
92 item.createPopUpMenu()
94 if item.item.get_nom() == "DISTRIBUTION" and item.item.isvalid() :
95 item.Graphe.setEnabled(1)
96 item.menu.exec_(coord)
99 def handleCollapsedItem(self,item):
100 print "dans CollapsedItem", self.inhibeExpand
101 if self.inhibeExpand == True : return
103 #print "item = ", item, item.item.get_nom()
105 #while not (hasattr (itemParent,'getPanel2')) :
106 # print "While itemParent = ", itemParent, itemParent.item.get_nom()
107 # print itemParent.plie
108 # if itemParent.plie==True : itemParent.setPlie()
109 # itemParent=itemParent.treeParent
110 #if self.tree.node_selected != self :
111 # item.setExpanded(False)
113 if item.fenetre != self.editor.fenetreCentraleAffichee :
116 item.plieToutEtReaffiche()
118 def handleExpandedItem(self,item):
119 #print "dans ExpandItem", self.inhibeExpand
120 if self.inhibeExpand == True : return
123 while not (hasattr (itemParent,'getPanel2')) :
124 if itemParent.plie==True : itemParent.setDeplie()
125 itemParent=itemParent.treeParent
127 if self.tree.node_selected != itemParent :
128 item.setExpanded(True)
131 item.deplieToutEtReaffiche()
133 def handleOnItem(self,item,int):
134 #if (len(self.selectedIndexes())!=2): return
135 print "je passe dans handleOnItem"
136 self.inhibeExpand == True
137 self.itemCourrant=item
139 #print self.itemCourrant
140 while not (hasattr (itemParent,'getPanel2')) :
141 if itemParent.plie==True : itemParent.setDeplie()
142 itemParent=itemParent.treeParent
144 #print itemParent.fenetre
145 #print self.editor.afficheCommandesPliees
146 if itemParent.fenetre != self.editor.fenetreCentraleAffichee :
147 #print self.editor.afficheCommandesPliees
148 if self.editor.afficheCommandesPliees : itemParent.plieToutEtReaffiche()
149 else : itemParent.affichePanneau()
150 if itemParent!=item : item.fenetre.rendVisible()
153 fr = item.item.get_fr()
154 if self.editor: self.editor.labelCommentaire.setText(unicode(fr))
158 self.inhibeExpand == False
159 #print "je mets inhibeExpand a false handleOnItem"
162 def choisitPremier(self,name):
163 self.editor.layoutJDCCHOIX.removeWidget(self.racine.fenetre)
164 self.racine.fenetre.close()
165 new_node=self.racine.append_brother(name,'after')
168 COMMENT = "COMMENTAIRE"
169 PARAMETERS = "PARAMETRE"
171 class JDCNode(QTreeWidgetItem):
172 def __init__( self, treeParent, item):
173 #print "creation d'un noeud : ", item, " ",item.nom,"", treeParent, self
176 self.vraiParent = treeParent
177 self.treeParent = treeParent
178 self.tree = self.treeParent.tree
179 self.editor = self.treeParent.editor
180 self.appliEficas = treeParent.appliEficas
181 self.treeParent.childrenIssusDesBlocs=[]
182 self.childrenComplete=[]
184 from InterfaceQT4 import compocomm
185 from InterfaceQT4 import compoparam
186 if (isinstance(self.item,compocomm.COMMTreeItem)) : name=tr("Commentaire")
187 elif (isinstance(self.item,compoparam.PARAMTreeItem)) : name=self.appliEficas.trUtf8(str(item.GetLabelText()[0]))
188 else: name = self.appliEficas.trUtf8(str(tr( item.nom))+" :")
189 value = self.appliEficas.trUtf8(str( item.GetText() ) )
191 mesColonnes=QStringList()
192 if self.editor.enteteQTree=='complet': mesColonnes << name << value
193 else : mesColonnes << name
195 if self.treeParent.plie==True :
197 self.appartientAUnNoeudPlie=True
200 self.appartientAUnNoeudPlie = False
201 #print "self.plie", self.plie
202 #print "self.appartientAUnNoeudPlie", self.appartientAUnNoeudPlie
203 #print self.treeParent
205 ajoutAuParentduNoeud=0
206 from InterfaceQT4 import compobloc
207 while (isinstance(self.treeParent,compobloc.Node)) :
208 self.treeParent=self.treeParent.treeParent
209 ajoutAuParentduNoeud=1
210 if ajoutAuParentduNoeud :
211 treeParent.childrenComplete.append(self)
212 self.treeParent.childrenIssusDesBlocs.append(self)
213 while (isinstance(self.treeParent,compobloc.Node)) : self.treeParent=self.treeParent.treeParent
215 if isinstance(self,compobloc.Node) :
216 QTreeWidgetItem.__init__(self,None,mesColonnes)
218 QTreeWidgetItem.__init__(self,self.treeParent,mesColonnes)
219 self.treeParent.childrenComplete.append(self)
221 self.setToolTip(0,QString(self.item.get_fr()))
222 self.setToolTip(1,QString(self.item.get_fr()))
224 repIcon=QString(self.appliEficas.repIcon)
225 monIcone = QIcon(repIcon+"/" +self.item.GetIconName() + ".png")
226 self.setIcon(0,monIcone)
229 self.build_children()
233 self.item.connect("valid",self.onValid,())
234 self.item.connect("supp" ,self.onSupp,())
235 self.item.connect("add" ,self.onAdd,())
239 if self.item.getObject().isBLOC() : self.setExpanded(True)
244 def build_children(self,posInsertion=10000):
245 """ Construit la liste des enfants de self """
246 """ Se charge de remettre les noeuds Expanded dans le meme etat """
247 #print "*********** build_children ",self.item, self.item.GetLabelText()
250 for item in self.childrenComplete :
252 # print " je detruis ", item.item.GetLabelText() ," parent : ", item.treeParent.item.GetLabelText()
254 # print "mot clef fact"
255 if item.isExpanded():
256 if self.childrenComplete.index(item) < posInsertion :
257 listeExpanded.append(self.childrenComplete.index(item))
259 listeExpanded.append( self.childrenComplete.index(item) +1)
260 self.detruit_les_noeuds_issus_de_blocs(item)
261 parent=item.treeParent
262 parent.removeChild(item)
265 self.childrenComplete = []
266 sublist = self.item._GetSubList()
268 for item in sublist :
269 nouvelItem=item.itemNode(self,item)
270 self.children.append(nouvelItem)
271 #print " J ajoute ", nouvelItem ,nouvelItem.item.GetLabelText(),"dans" ,self.item.GetLabelText()
272 #if ind in listeExpanded : nouvelItem.setExpanded(1)
274 #if ind in listeExpanded : print "plie=0"
275 #else : print "plie=1"
276 #if ind in listeExpanded : nouvelItem.plie=0
277 #else : nouvelItem.plie=1
279 #print "*********** fin build_children ",self.item, self.item.GetLabelText()
281 def chercheNoeudCorrespondant(self,objSimp):
282 sublist = self.item._GetSubList()
283 for node in self.childrenComplete:
284 if node.item.object==objSimp : return node
287 def affichePanneau(self) :
288 print "dans affichePanneau appel getPanel2", self.item.GetLabelText()
289 if self.item.isactif():
291 while not (hasattr (itemParent,'getPanel2')) :
292 itemParent=itemParent.treeParent
293 if itemParent!=self :
294 itemParent.affichePanneau()
296 self.fenetre=self.getPanel2()
298 from monInactifPanel import PanelInactif
299 self.fenetre = PanelInactif(self,self.editor)
301 self.editor.widgetCentraleLayout.addWidget(self.fenetre)
302 print "widgetCentraleLayout = ", self.editor.widgetCentraleLayout
303 print "nouvelle fenetre ", self.fenetre, " associee a ", self
305 self.editor.anciennefenetre=self.editor.fenetreCentraleAffichee
306 #print "ancienne fenetre ", self.editor.anciennefenetre
307 self.editor.fenetreCentraleAffichee=self.fenetre
308 self.tree.node_selected= self
310 if self.editor.anciennefenetre != None :
311 a=self.editor.anciennefenetre.close()
312 #print "je ferme ", self.editor.anciennefenetre
314 if self.editor.widgetTree !=None : index=1
317 if self.editor.first :
318 self.editor.splitter.setSizes((400,1400,400))
319 if not(isinstance(self.fenetre,MonChoixCommande)): self.editor.first=False
320 self.tree.inhibeExpand=True
321 self.tree.expandItem(self)
323 self.tree.inhibeExpand=False
324 #print "fin de affichePanneau"
325 #print "______________________________"
328 def createPopUpMenu(self):
329 #implemente dans les noeuds derives si necessaire
334 Cette methode a pour but de commentariser la commande pointee par self
336 # On traite par une exception le cas ou l'utilisateur final cherche a désactiver
337 # (commentariser) un commentaire.
339 pos=self.treeParent.children.index(self)
340 commande_comment = self.item.get_objet_commentarise()
341 # On signale a l editeur du panel (le JDCDisplay) une modification
342 self.editor.init_modif()
343 self.treeParent.build_children()
344 self.treeParent.children[pos].select()
345 self.treeParent.children[pos].affichePanneau()
347 traceback.print_exc()
348 QMessageBox.critical( self.editor, "TOO BAD",str(e))
350 def unCommentIt(self):
352 Realise la decommentarisation de self
355 pos=self.treeParent.children.index(self)
356 commande,nom = self.item.uncomment()
357 self.editor.init_modif()
358 self.treeParent.build_children()
359 self.treeParent.children[pos].select()
360 self.treeParent.children[pos].affichePanneau()
362 QMessageBox.critical( self.editor, "Erreur !",str(e))
364 def addComment( self, after=True ):
366 Ajoute un commentaire a l'interieur du JDC :
368 self.editor.init_modif()
373 return self.append_brother( COMMENT, pos )
375 def addParameters( self, after=True ):
377 Ajoute un parametre a l'interieur du JDC :
379 self.editor.init_modif()
384 return self.append_brother( PARAMETERS, pos )
389 Rend le noeud courant (self) selectionne et deselectionne
392 for item in self.tree.selectedItems() :
394 self.setSelected( True )
395 #self.setExpanded( True )
396 self.tree.setCurrentItem( self )
397 self.tree.node_selected= self
399 #------------------------------------------------------------------
400 # Methodes de creation et destruction de noeuds
401 # Certaines de ces methodes peuvent etre appelees depuis l'externe
402 #------------------------------------------------------------------
403 def append_brother(self,name,pos='after',plier=False):
405 Permet d'ajouter un objet frere a l'objet associe au noeud self
406 par defaut on l'ajoute immediatement apres
409 self.editor.init_modif()
410 index = self.treeParent.children.index(self)
411 if pos == 'before': index = index
412 elif pos == 'after': index = index +1
414 print unicode(pos), tr(" n'est pas un index valide pour append_brother")
416 return self.treeParent.append_child(name,pos=index,plier=plier)
418 def append_child(self,name,pos=None,plier=False):
420 Methode pour ajouter un objet fils a l'objet associe au noeud self.
421 On peut l'ajouter en debut de liste (pos='first'), en fin (pos='last')
422 ou en position intermediaire.
423 Si pos vaut None, on le place a la position du catalogue.
425 print "************** append_child ",self.item.GetLabelText(), plier
426 self.editor.init_modif()
430 index = len(self.children)
431 elif type(pos) == types.IntType :
434 elif type(pos) == types.InstanceType:
435 # pos est un item. Il faut inserer name apres pos
436 index = self.item.get_index(pos) +1
437 elif type(name) == types.InstanceType:
438 index = self.item.get_index_child(name.nom)
440 index = self.item.get_index_child(name)
441 self.tree.inhibeExpand=True
442 obj=self.item.additem(name,index) #CS_pbruno emet le signal 'add'
446 # old_obj = self.item.object.get_child(name.nom,restreint = 'oui')
448 # if plier : child.plieToutEtReaffiche()
449 # else : child.affichePanneau()
450 # print "dans le 1er Try"
453 # Souci pour gerer les copies des AFFE d'une commande à l autre
455 # child=self.children[index]
456 # if plier == True : child.setPlie()
457 # else : child.setDeplie()
458 # print "dans le 2nd Try"
460 # child=self.children[index]
461 # print "dans le except"
464 child=self.children[index]
465 if plier == True : child.setPlie()
466 else : child.setDeplie()
468 child=self.children[index]
469 print "dans le except"
470 self.tree.inhibeExpand=False
474 self.editor.init_modif()
475 index = self.treeParent.children.index(self) - 1
476 if index < 0 : index =0
477 ret=self.treeParent.item.deplaceEntite(self.item.getObject())
481 Methode externe pour la destruction de l'objet associe au noeud
483 self.editor.init_modif()
484 index = self.vraiParent.children.index(self) - 1
485 if index < 0 : index =0
487 if self.item.nom == "VARIABLE" :
490 ret=self.vraiParent.item.suppitem(self.item)
491 self.treeParent.build_children()
492 if self.treeParent.childrenComplete : toselect=self.treeParent.childrenComplete[index]
493 else: toselect=self.treeParent
494 if recalcule : jdc.recalcule_etat_correlation()
495 from InterfaceQT4 import compojdc
496 # cas ou on detruit dans l arbre sans affichage
497 if isinstance(self.treeParent,compojdc.Node) :
498 toselect.affichePanneau()
500 if self.treeParent.fenetre== None : return
501 print "J appelle reaffiche de browser apres delete"
502 self.treeParent.fenetre.reaffiche(toselect)
504 def deleteMultiple(self,liste=()):
506 Methode externe pour la destruction d une liste de noeud
508 from InterfaceQT4 import compojdc
509 self.editor.init_modif()
514 while not(isinstance(jdc,compojdc.Node)):
517 if not( isinstance(noeud.treeParent, compojdc.Node)): continue
518 if noeud.item.nom == "VARIABLE" : recalcule=1
519 if noeud.treeParent.children.index(noeud) < index : index=noeud.treeParent.children.index(noeud)
520 if index < 0 : index =0
522 # Cas ou on détruit dans une ETape
524 parentPosition=self.treeParent
525 while not(isinstance(parentPosition, compojdc.Node)):
526 index=parentPosition.treeParent.children.index(parentPosition)
527 parentPosition=parentPosition.treeParent
530 noeud.treeParent.item.suppitem(noeud.item)
533 if recalcule : jdc.recalcule_etat_correlation()
534 try : toselect=parentPosition.children[index]
535 except : toselect=jdc
537 toselect.affichePanneau()
539 # #------------------------------------------------------------------
542 #print "onValid pour ", self.item.nom
543 if hasattr(self,'fenetre') and self.fenetre:
544 self.fenetre.setValide()
545 if self.item.nom == "VARIABLE" and self.item.isvalid():
546 self.item.jdc.recalcule_etat_correlation()
547 if hasattr(self.item,'forceRecalcul'):
548 self.forceRecalculChildren(self.item.forceRecalcul)
549 self.editor.init_modif()
551 self.update_node_valid()
552 self.update_node_label()
553 self.update_node_texte()
555 def onAdd(self,object):
556 #print "onAdd pour ", self.item.nom
557 self.editor.init_modif()
559 print "dans onAdd" ,self.item
560 # PN -- non necessaire si item=jdc
561 if hasattr(self.item,'jdc'): self.item.jdc.aReafficher=True
563 def onSupp(self,object):
564 #print "onSupp pour ", self.item.nom
565 self.editor.init_modif()
567 # PN -- non necessaire si item=jdc
568 if hasattr(self.item,'jdc'): self.item.jdc.aReafficher=True
570 def detruit_les_noeuds_issus_de_blocs(self,bloc):
571 from InterfaceQT4 import compobloc
572 if (isinstance(bloc,compobloc.Node)) :
573 for node in bloc.childrenComplete :
574 self.detruit_les_noeuds_issus_de_blocs(node)
575 parent=node.treeParent
576 #print "je detruit " , node.item.GetLabelText()
577 parent.removeChild(node)
579 def update_node_valid(self):
580 """Cette methode remet a jour la validite du noeud (icone)
583 repIcon=QString(self.appliEficas.repIcon)
584 monIcone = QIcon(repIcon+"/" +self.item.GetIconName() + ".png")
585 self.setIcon(0,monIcone)
588 def update_node_label(self):
589 """ Met a jour le label du noeud """
590 #print "NODE update_node_label", self.item.GetLabelText()
591 labeltext,fonte,couleur = self.item.GetLabelText()
593 #self.setText(0, labeltext)
596 def update_node_label_in_blue(self):
597 if hasattr(self.appliEficas,'noeudColore'):
598 self.appliEficas.noeudColore.setTextColor( 0,Qt.black)
599 self.appliEficas.noeudColore.update_node_label()
600 self.setTextColor( 0,Qt.blue )
601 labeltext,fonte,couleur = self.item.GetLabelText()
602 self.setText(0, labeltext)
603 self.appliEficas.noeudColore=self
605 def update_plusieurs_node_label_in_blue(self,liste):
606 if hasattr(self.appliEficas,'listeNoeudsColores'):
607 for noeud in self.appliEficas.listeNoeudsColores:
608 noeud.setTextColor( 0,Qt.black)
609 noeud.update_node_label()
610 self.appliEficas.listeNoeudsColores=[]
612 noeud.setTextColor( 0,Qt.blue )
613 labeltext,fonte,couleur = noeud.item.GetLabelText()
614 noeud.setText(0, labeltext)
615 self.appliEficas.listeNoeudsColores.append(noeud)
617 def update_node_texte_in_black(self):
618 """ Met a jour les noms des SD et valeurs des mots-cles """
619 self.setTextColor( 1,Qt.black )
620 value = self.item.GetText()
621 self.setText(1, value)
623 def update_node_texte(self):
624 """ Met a jour les noms des SD et valeurs des mots-cles """
625 value = self.item.GetText()
626 self.setText(1, value)
628 def update_node_texte_in_blue(self):
629 self.setTextColor( 1,Qt.blue )
630 value = self.item.GetText()
631 self.setText(1, value)
633 def update_nodes(self):
634 #print 'NODE update_nodes', self.item.GetLabelText()
635 self.build_children()
637 def update_valid(self) :
638 """Cette methode a pour but de mettre a jour la validite du noeud
639 et de propager la demande de mise a jour a son parent
641 #print "NODE update_valid", self.item.GetLabelText()
642 self.update_node_valid()
644 self.treeParent.update_valid()
648 def update_texte(self):
649 """ Met a jour les noms des SD et valeurs des mots-cles """
650 #print "NODE update_texte", self.item.GetLabelText()
651 self.update_node_texte()
652 if self.isExpanded() :
653 for child in self.children:
654 if child.isHidden() == false : child.update_texte()
657 def forceRecalculChildren(self,niveau):
658 if self.state=='recalcule' :
661 self.state='recalcule'
662 if hasattr(self.item,'object'):
663 self.item.object.state="modified"
664 for child in self.children:
665 if niveau > 0 : child.forceRecalculChildren(niveau - 1)
669 def doPaste(self,node_selected,pos='after'):
671 Déclenche la copie de l'objet item avec pour cible
672 l'objet passé en argument : node_selected
674 #print 'je passe dans doPaste'
675 objet_a_copier = self.item.get_copie_objet()
676 child=node_selected.doPasteCommande(objet_a_copier,pos)
679 def doPasteCommande(self,objet_a_copier,pos='after'):
681 Réalise la copie de l'objet passé en argument qui est nécessairement
686 child = self.append_brother(objet_a_copier,pos)
691 def doPastePremier(self,objet_a_copier):
693 Réalise la copie de l'objet passé en argument (objet_a_copier)
695 objet = objet_a_copier.item.get_copie_objet()
696 child = self.append_child(objet,pos='first')
700 def plieToutEtReaffiche(self):
701 print "je suis dans plieToutEtReaffiche", self.item.get_nom()
702 self.editor.deplier = False
703 for item in self.children :
705 self.affichePanneau()
707 def deplieToutEtReaffiche(self):
708 self.editor.deplier = True
709 for item in self.children :
711 self.affichePanneau()
714 #print "je mets inhibeExpand a true dans setPlie"
715 print "je suis dans plieTout", self.item.get_nom()
716 self.tree.inhibeExpand=True
717 self.tree.collapseItem(self)
718 self.setPlieChildren()
721 # on ne plie pas au niveau 1
722 #if not(isinstance(self.treeParent,compojdc.Node)) :
726 # for item in self.children :
727 # item.appartientAUnNoeudPlie=False
728 #self.tree.inhibeExpand=False
729 #print "je mets inhibeExpand a false dans setPlie"
731 def setPlieChildren(self):
733 for c in self.children :
735 print "dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.GetLabelText()[0]
736 c.appartientAUnNoeudPlie=True
741 # on affiche un niveau de plus
742 from InterfaceQT4 import compobloc
743 if isinstance(self,compobloc.Node) :
744 niveauPere=self.treeParent
745 while (isinstance(niveauPere,compobloc.Node)):
746 niveauPere=self.niveauPere.treeParent
747 for c in self.children :
748 c.appartientAUnNoeudPlie=niveauPere.appartientAUnNoeudPlie
752 #print "je mets inhibeExpand a true dans setDeplie"
753 self.tree.inhibeExpand=True
755 self.tree.expandItem(self)
756 self.setDeplieChildren()
757 self.tree.inhibeExpand=False
758 print "je mets inhibeExpand a false dans setDePlie"
760 def setDeplieChildren(self):
761 print "dans setDeplieChildren appartientAUnNoeudPlie=False ", self.item.GetLabelText()
762 for c in self.children :
763 c.setDeplieChildren()
764 print "dans setDeplieChildren appartientAUnNoeudPlie=False ", c.item.GetLabelText()
765 c.appartientAUnNoeudPlie=False
769 def selectAvant(self):
770 i=self.item.jdc.etapes.index(self.item.object)
772 cherche=self.item.jdc.etapes[i-1]
774 cherche=self.item.jdc.etapes[-1]
776 for i in self.tree.racine.children :
777 if i.item.object== cherche :
780 if node : node.affichePanneau()
782 def selectApres(self):
783 i=self.item.jdc.etapes.index(self.item.object)
785 cherche=self.item.jdc.etapes[i+1]
787 cherche=self.item.jdc.etapes[0]
789 for i in self.tree.racine.children :
790 if i.item.object== cherche :
793 if node : node.affichePanneau()