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)
115 item.plieToutEtReaffiche()
117 def handleExpandedItem(self,item):
118 #print "dans ExpandItem", self.inhibeExpand
119 if self.inhibeExpand == True : return
122 while not (hasattr (itemParent,'getPanel2')) :
123 if itemParent.plie==True : itemParent.setDeplie()
124 itemParent=itemParent.treeParent
126 if self.tree.node_selected != itemParent :
127 item.setExpanded(True)
130 item.deplieToutEtReaffiche()
132 def handleOnItem(self,item,int):
133 #if (len(self.selectedIndexes())!=2): return
134 print "je passe dans handleOnItem"
135 self.inhibeExpand == True
136 self.itemCourrant=item
138 #print self.itemCourrant
139 while not (hasattr (itemParent,'getPanel2')) :
140 if itemParent.plie==True : itemParent.setDeplie()
141 itemParent=itemParent.treeParent
143 #print itemParent.fenetre
144 #print self.editor.afficheCommandesPliees
145 if itemParent.fenetre != self.editor.fenetreCentraleAffichee :
146 #print self.editor.afficheCommandesPliees
147 if self.editor.afficheCommandesPliees : itemParent.plieToutEtReaffiche()
148 else : itemParent.affichePanneau()
149 if itemParent!=item : item.fenetre.rendVisible()
152 fr = item.item.get_fr()
153 if self.editor: self.editor.labelCommentaire.setText(unicode(fr))
157 self.inhibeExpand == False
158 #print "je mets inhibeExpand a false handleOnItem"
161 def choisitPremier(self,name):
162 self.editor.layoutJDCCHOIX.removeWidget(self.racine.fenetre)
163 self.racine.fenetre.close()
164 new_node=self.racine.append_brother(name,'after')
167 COMMENT = "COMMENTAIRE"
168 PARAMETERS = "PARAMETRE"
170 class JDCNode(QTreeWidgetItem):
171 def __init__( self, treeParent, item):
172 #print "creation d'un noeud : ", item, " ",item.nom,"", treeParent, self
175 self.vraiParent = treeParent
176 self.treeParent = treeParent
177 self.tree = self.treeParent.tree
178 self.editor = self.treeParent.editor
179 self.appliEficas = treeParent.appliEficas
180 self.treeParent.childrenIssusDesBlocs=[]
181 self.childrenComplete=[]
183 from InterfaceQT4 import compocomm
184 from InterfaceQT4 import compoparam
185 if (isinstance(self.item,compocomm.COMMTreeItem)) : name=tr("Commentaire")
186 elif (isinstance(self.item,compoparam.PARAMTreeItem)) : name=self.appliEficas.trUtf8(str(item.GetLabelText()[0]))
187 else: name = self.appliEficas.trUtf8(str(tr( item.nom))+" :")
188 value = self.appliEficas.trUtf8(str( item.GetText() ) )
190 mesColonnes=QStringList()
191 if self.editor.enteteQTree=='complet': mesColonnes << name << value
192 else : mesColonnes << name
194 if self.treeParent.plie==True :
196 self.appartientAUnNoeudPlie=True
199 self.appartientAUnNoeudPlie = False
200 #print "self.plie", self.plie
201 #print "self.appartientAUnNoeudPlie", self.appartientAUnNoeudPlie
202 #print self.treeParent
204 ajoutAuParentduNoeud=0
205 from InterfaceQT4 import compobloc
206 while (isinstance(self.treeParent,compobloc.Node)) :
207 self.treeParent=self.treeParent.treeParent
208 ajoutAuParentduNoeud=1
209 if ajoutAuParentduNoeud :
210 treeParent.childrenComplete.append(self)
211 self.treeParent.childrenIssusDesBlocs.append(self)
212 while (isinstance(self.treeParent,compobloc.Node)) : self.treeParent=self.treeParent.treeParent
214 if isinstance(self,compobloc.Node) :
215 QTreeWidgetItem.__init__(self,None,mesColonnes)
217 QTreeWidgetItem.__init__(self,self.treeParent,mesColonnes)
218 self.treeParent.childrenComplete.append(self)
220 self.setToolTip(0,QString(self.item.get_fr()))
221 self.setToolTip(1,QString(self.item.get_fr()))
223 repIcon=QString(self.appliEficas.repIcon)
224 monIcone = QIcon(repIcon+"/" +self.item.GetIconName() + ".png")
225 self.setIcon(0,monIcone)
228 self.build_children()
232 self.item.connect("valid",self.onValid,())
233 self.item.connect("supp" ,self.onSupp,())
234 self.item.connect("add" ,self.onAdd,())
238 if self.item.getObject().isBLOC() : self.setExpanded(True)
243 def build_children(self,posInsertion=10000):
244 """ Construit la liste des enfants de self """
245 """ Se charge de remettre les noeuds Expanded dans le meme etat """
246 #print "*********** build_children ",self.item, self.item.GetLabelText()
249 for item in self.childrenComplete :
251 # print " je detruis ", item.item.GetLabelText() ," parent : ", item.treeParent.item.GetLabelText()
253 # print "mot clef fact"
254 if item.isExpanded():
255 if self.childrenComplete.index(item) < posInsertion :
256 listeExpanded.append(self.childrenComplete.index(item))
258 listeExpanded.append( self.childrenComplete.index(item) +1)
259 self.detruit_les_noeuds_issus_de_blocs(item)
260 parent=item.treeParent
261 parent.removeChild(item)
264 self.childrenComplete = []
265 sublist = self.item._GetSubList()
267 for item in sublist :
268 nouvelItem=item.itemNode(self,item)
269 self.children.append(nouvelItem)
270 #print " J ajoute ", nouvelItem ,nouvelItem.item.GetLabelText(),"dans" ,self.item.GetLabelText()
271 #if ind in listeExpanded : nouvelItem.setExpanded(1)
273 #if ind in listeExpanded : print "plie=0"
274 #else : print "plie=1"
275 #if ind in listeExpanded : nouvelItem.plie=0
276 #else : nouvelItem.plie=1
278 #print "*********** fin build_children ",self.item, self.item.GetLabelText()
280 def chercheNoeudCorrespondant(self,objSimp):
281 sublist = self.item._GetSubList()
282 for node in self.childrenComplete:
283 if node.item.object==objSimp : return node
286 def affichePanneau(self) :
287 print "dans affichePanneau appel getPanel2", self.item.GetLabelText()
288 if self.item.isactif():
290 while not (hasattr (itemParent,'getPanel2')) :
291 itemParent=itemParent.treeParent
292 if itemParent!=self :
293 itemParent.affichePanneau()
295 self.fenetre=self.getPanel2()
297 from monInactifPanel import PanelInactif
298 self.fenetre = PanelInactif(self,self.editor)
300 self.editor.widgetCentraleLayout.addWidget(self.fenetre)
301 print "widgetCentraleLayout = ", self.editor.widgetCentraleLayout
302 print "nouvelle fenetre ", self.fenetre, " associee a ", self
304 self.editor.anciennefenetre=self.editor.fenetreCentraleAffichee
305 #print "ancienne fenetre ", self.editor.anciennefenetre
306 self.editor.fenetreCentraleAffichee=self.fenetre
307 self.tree.node_selected= self
309 if self.editor.anciennefenetre != None :
310 a=self.editor.anciennefenetre.close()
311 #print "je ferme ", self.editor.anciennefenetre
313 if self.editor.widgetTree !=None : index=1
316 if self.editor.first :
317 self.editor.splitter.setSizes((400,1400,400))
318 if not(isinstance(self.fenetre,MonChoixCommande)): self.editor.first=False
319 self.tree.inhibeExpand=True
320 self.tree.expandItem(self)
322 self.tree.inhibeExpand=False
323 #print "fin de affichePanneau"
324 #print "______________________________"
327 def createPopUpMenu(self):
328 #implemente dans les noeuds derives si necessaire
333 Cette methode a pour but de commentariser la commande pointee par self
335 # On traite par une exception le cas ou l'utilisateur final cherche a désactiver
336 # (commentariser) un commentaire.
338 pos=self.treeParent.children.index(self)
339 commande_comment = self.item.get_objet_commentarise()
340 # On signale a l editeur du panel (le JDCDisplay) une modification
341 self.editor.init_modif()
342 self.treeParent.build_children()
343 self.treeParent.children[pos].select()
344 self.treeParent.children[pos].affichePanneau()
346 traceback.print_exc()
347 QMessageBox.critical( self.editor, "TOO BAD",str(e))
349 def unCommentIt(self):
351 Realise la decommentarisation de self
354 pos=self.treeParent.children.index(self)
355 commande,nom = self.item.uncomment()
356 self.editor.init_modif()
357 self.treeParent.build_children()
358 self.treeParent.children[pos].select()
359 self.treeParent.children[pos].affichePanneau()
361 QMessageBox.critical( self.editor, "Erreur !",str(e))
363 def addComment( self, after=True ):
365 Ajoute un commentaire a l'interieur du JDC :
367 self.editor.init_modif()
372 return self.append_brother( COMMENT, pos )
374 def addParameters( self, after=True ):
376 Ajoute un parametre a l'interieur du JDC :
378 self.editor.init_modif()
383 return self.append_brother( PARAMETERS, pos )
388 Rend le noeud courant (self) selectionne et deselectionne
391 for item in self.tree.selectedItems() :
393 self.setSelected( True )
394 #self.setExpanded( True )
395 self.tree.setCurrentItem( self )
396 self.tree.node_selected= self
398 #------------------------------------------------------------------
399 # Methodes de creation et destruction de noeuds
400 # Certaines de ces methodes peuvent etre appelees depuis l'externe
401 #------------------------------------------------------------------
402 def append_brother(self,name,pos='after',plier=False):
404 Permet d'ajouter un objet frere a l'objet associe au noeud self
405 par defaut on l'ajoute immediatement apres
408 self.editor.init_modif()
409 index = self.treeParent.children.index(self)
410 if pos == 'before': index = index
411 elif pos == 'after': index = index +1
413 print unicode(pos), tr(" n'est pas un index valide pour append_brother")
415 return self.treeParent.append_child(name,pos=index,plier=plier)
417 def append_child(self,name,pos=None,plier=False):
419 Methode pour ajouter un objet fils a l'objet associe au noeud self.
420 On peut l'ajouter en debut de liste (pos='first'), en fin (pos='last')
421 ou en position intermediaire.
422 Si pos vaut None, on le place a la position du catalogue.
424 print "************** append_child ",self.item.GetLabelText(), plier
425 self.editor.init_modif()
429 index = len(self.children)
430 elif type(pos) == types.IntType :
433 elif type(pos) == types.InstanceType:
434 # pos est un item. Il faut inserer name apres pos
435 index = self.item.get_index(pos) +1
436 elif type(name) == types.InstanceType:
437 index = self.item.get_index_child(name.nom)
439 index = self.item.get_index_child(name)
440 self.tree.inhibeExpand=True
441 obj=self.item.additem(name,index) #CS_pbruno emet le signal 'add'
445 # old_obj = self.item.object.get_child(name.nom,restreint = 'oui')
447 # if plier : child.plieToutEtReaffiche()
448 # else : child.affichePanneau()
449 # print "dans le 1er Try"
452 # Souci pour gerer les copies des AFFE d'une commande à l autre
454 # child=self.children[index]
455 # if plier == True : child.setPlie()
456 # else : child.setDeplie()
457 # print "dans le 2nd Try"
459 # child=self.children[index]
460 # print "dans le except"
463 child=self.children[index]
464 if plier == True : child.setPlie()
465 else : child.setDeplie()
467 child=self.children[index]
468 print "dans le except"
469 self.tree.inhibeExpand=False
473 self.editor.init_modif()
474 index = self.treeParent.children.index(self) - 1
475 if index < 0 : index =0
476 ret=self.treeParent.item.deplaceEntite(self.item.getObject())
480 Methode externe pour la destruction de l'objet associe au noeud
482 self.editor.init_modif()
483 index = self.vraiParent.children.index(self) - 1
484 if index < 0 : index =0
486 if self.item.nom == "VARIABLE" :
489 ret=self.vraiParent.item.suppitem(self.item)
490 self.treeParent.build_children()
491 if self.treeParent.childrenComplete : toselect=self.treeParent.childrenComplete[index]
492 else: toselect=self.treeParent
493 if recalcule : jdc.recalcule_etat_correlation()
494 from InterfaceQT4 import compojdc
495 # cas ou on detruit dans l arbre sans affichage
496 if isinstance(self.treeParent,compojdc.Node) :
497 toselect.affichePanneau()
499 if self.treeParent.fenetre== None : return
500 print "J appelle reaffiche de browser apres delete"
501 self.treeParent.fenetre.reaffiche(toselect)
503 def deleteMultiple(self,liste=()):
505 Methode externe pour la destruction d une liste de noeud
507 from InterfaceQT4 import compojdc
508 self.editor.init_modif()
513 while not(isinstance(jdc,compojdc.Node)):
516 if not( isinstance(noeud.treeParent, compojdc.Node)): continue
517 if noeud.item.nom == "VARIABLE" : recalcule=1
518 if noeud.treeParent.children.index(noeud) < index : index=noeud.treeParent.children.index(noeud)
519 if index < 0 : index =0
521 # Cas ou on détruit dans une ETape
523 parentPosition=self.treeParent
524 while not(isinstance(parentPosition, compojdc.Node)):
525 index=parentPosition.treeParent.children.index(parentPosition)
526 parentPosition=parentPosition.treeParent
529 noeud.treeParent.item.suppitem(noeud.item)
532 if recalcule : jdc.recalcule_etat_correlation()
533 try : toselect=parentPosition.children[index]
534 except : toselect=jdc
536 toselect.affichePanneau()
538 # #------------------------------------------------------------------
541 #print "onValid pour ", self.item.nom
542 if hasattr(self,'fenetre') and self.fenetre:
543 self.fenetre.setValide()
544 if self.item.nom == "VARIABLE" and self.item.isvalid():
545 self.item.jdc.recalcule_etat_correlation()
546 if hasattr(self.item,'forceRecalcul'):
547 self.forceRecalculChildren(self.item.forceRecalcul)
548 self.editor.init_modif()
550 self.update_node_valid()
551 self.update_node_label()
552 self.update_node_texte()
554 def onAdd(self,object):
555 #print "onAdd pour ", self.item.nom
556 self.editor.init_modif()
558 print "dans onAdd" ,self.item
559 # PN -- non necessaire si item=jdc
560 if hasattr(self.item,'jdc'): self.item.jdc.aReafficher=True
562 def onSupp(self,object):
563 #print "onSupp pour ", self.item.nom
564 self.editor.init_modif()
566 # PN -- non necessaire si item=jdc
567 if hasattr(self.item,'jdc'): self.item.jdc.aReafficher=True
569 def detruit_les_noeuds_issus_de_blocs(self,bloc):
570 from InterfaceQT4 import compobloc
571 if (isinstance(bloc,compobloc.Node)) :
572 for node in bloc.childrenComplete :
573 self.detruit_les_noeuds_issus_de_blocs(node)
574 parent=node.treeParent
575 #print "je detruit " , node.item.GetLabelText()
576 parent.removeChild(node)
578 def update_node_valid(self):
579 """Cette methode remet a jour la validite du noeud (icone)
582 repIcon=QString(self.appliEficas.repIcon)
583 monIcone = QIcon(repIcon+"/" +self.item.GetIconName() + ".png")
584 self.setIcon(0,monIcone)
587 def update_node_label(self):
588 """ Met a jour le label du noeud """
589 #print "NODE update_node_label", self.item.GetLabelText()
590 labeltext,fonte,couleur = self.item.GetLabelText()
592 #self.setText(0, labeltext)
595 def update_node_label_in_blue(self):
596 if hasattr(self.appliEficas,'noeudColore'):
597 self.appliEficas.noeudColore.setTextColor( 0,Qt.black)
598 self.appliEficas.noeudColore.update_node_label()
599 self.setTextColor( 0,Qt.blue )
600 labeltext,fonte,couleur = self.item.GetLabelText()
601 self.setText(0, labeltext)
602 self.appliEficas.noeudColore=self
604 def update_plusieurs_node_label_in_blue(self,liste):
605 if hasattr(self.appliEficas,'listeNoeudsColores'):
606 for noeud in self.appliEficas.listeNoeudsColores:
607 noeud.setTextColor( 0,Qt.black)
608 noeud.update_node_label()
609 self.appliEficas.listeNoeudsColores=[]
611 noeud.setTextColor( 0,Qt.blue )
612 labeltext,fonte,couleur = noeud.item.GetLabelText()
613 noeud.setText(0, labeltext)
614 self.appliEficas.listeNoeudsColores.append(noeud)
616 def update_node_texte_in_black(self):
617 """ Met a jour les noms des SD et valeurs des mots-cles """
618 self.setTextColor( 1,Qt.black )
619 value = self.item.GetText()
620 self.setText(1, value)
622 def update_node_texte(self):
623 """ Met a jour les noms des SD et valeurs des mots-cles """
624 value = self.item.GetText()
625 self.setText(1, value)
627 def update_node_texte_in_blue(self):
628 self.setTextColor( 1,Qt.blue )
629 value = self.item.GetText()
630 self.setText(1, value)
632 def update_nodes(self):
633 #print 'NODE update_nodes', self.item.GetLabelText()
634 self.build_children()
636 def update_valid(self) :
637 """Cette methode a pour but de mettre a jour la validite du noeud
638 et de propager la demande de mise a jour a son parent
640 #print "NODE update_valid", self.item.GetLabelText()
641 self.update_node_valid()
643 self.treeParent.update_valid()
647 def update_texte(self):
648 """ Met a jour les noms des SD et valeurs des mots-cles """
649 #print "NODE update_texte", self.item.GetLabelText()
650 self.update_node_texte()
651 if self.isExpanded() :
652 for child in self.children:
653 if child.isHidden() == false : child.update_texte()
656 def forceRecalculChildren(self,niveau):
657 if self.state=='recalcule' :
660 self.state='recalcule'
661 if hasattr(self.item,'object'):
662 self.item.object.state="modified"
663 for child in self.children:
664 if niveau > 0 : child.forceRecalculChildren(niveau - 1)
668 def doPaste(self,node_selected,pos='after'):
670 Déclenche la copie de l'objet item avec pour cible
671 l'objet passé en argument : node_selected
673 #print 'je passe dans doPaste'
674 objet_a_copier = self.item.get_copie_objet()
675 child=node_selected.doPasteCommande(objet_a_copier,pos)
678 def doPasteCommande(self,objet_a_copier,pos='after'):
680 Réalise la copie de l'objet passé en argument qui est nécessairement
685 child = self.append_brother(objet_a_copier,pos)
690 def doPastePremier(self,objet_a_copier):
692 Réalise la copie de l'objet passé en argument (objet_a_copier)
694 objet = objet_a_copier.item.get_copie_objet()
695 child = self.append_child(objet,pos='first')
699 def plieToutEtReaffiche(self):
700 print "je suis dans plieToutEtReaffiche", self.item.get_nom()
701 self.editor.deplier = False
702 for item in self.children :
704 self.affichePanneau()
706 def deplieToutEtReaffiche(self):
707 self.editor.deplier = True
708 for item in self.children :
710 self.affichePanneau()
713 #print "je mets inhibeExpand a true dans setPlie"
714 print "je suis dans plieTout", self.item.get_nom()
715 self.tree.inhibeExpand=True
716 self.tree.collapseItem(self)
717 self.setPlieChildren()
719 # on ne plie pas au niveau 1
720 #from InterfaceQT4 import compojdc
721 #if not(isinstance(self.treeParent,compojdc.Node)) :
725 # for item in self.children :
726 # item.appartientAUnNoeudPlie=False
727 #self.tree.inhibeExpand=False
728 #print "je mets inhibeExpand a false dans setPlie"
730 def setPlieChildren(self):
732 for c in self.children :
734 print "dans setPlieChildren appartientAUnNoeudPlie=True ", c, c.item.GetLabelText()[0]
735 c.appartientAUnNoeudPlie=True
741 #print "je mets inhibeExpand a true dans setDeplie"
742 self.tree.inhibeExpand=True
744 self.tree.expandItem(self)
745 self.setDeplieChildren()
746 self.tree.inhibeExpand=False
747 print "je mets inhibeExpand a false dans setDePlie"
749 def setDeplieChildren(self):
750 print "dans setDeplieChildren appartientAUnNoeudPlie=False ", self.item.GetLabelText()
751 for c in self.children :
752 c.setDeplieChildren()
753 print "dans setDeplieChildren appartientAUnNoeudPlie=False ", c.item.GetLabelText()
754 c.appartientAUnNoeudPlie=False
758 def selectAvant(self):
759 i=self.item.jdc.etapes.index(self.item.object)
761 cherche=self.item.jdc.etapes[i-1]
763 cherche=self.item.jdc.etapes[-1]
765 for i in self.tree.racine.children :
766 if i.item.object== cherche :
769 if node : node.affichePanneau()
771 def selectApres(self):
772 i=self.item.jdc.etapes.index(self.item.object)
774 cherche=self.item.jdc.etapes[i+1]
776 cherche=self.item.jdc.etapes[0]
778 for i in self.tree.racine.children :
779 if i.item.object== cherche :
782 if node : node.affichePanneau()