+ return self.treeParent.append_child(name,pos=index,plier=plier)
+
+ def verifiePosition(self,name,pos,aLaRacine=False):
+ if name not in self.editor.Classement_Commandes_Ds_Arbre : return True
+ indexName=self.editor.Classement_Commandes_Ds_Arbre.index(name)
+
+ etapes=self.item.get_jdc().etapes
+ if etapes == [] : return True
+
+ if aLaRacine == False :indexOu=etapes.index(self.item.object)
+ else : indexOu=0
+
+ if pos=="after" : indexOu = indexOu+1
+ for e in etapes[:indexOu] :
+ nom=e.nom
+ if nom not in self.editor.Classement_Commandes_Ds_Arbre : continue
+ indexEtape=self.editor.Classement_Commandes_Ds_Arbre.index(nom)
+ if indexEtape > indexName :
+ comment=tr('le mot clef ')+name+tr(' doit etre insere avant ')+nom
+ QMessageBox.information( None,tr('insertion impossible'),comment, )
+ return False
+ for e in etapes[indexOu:] :
+ nom=e.nom
+ if nom not in self.editor.Classement_Commandes_Ds_Arbre : continue
+ indexEtape=self.editor.Classement_Commandes_Ds_Arbre.index(nom)
+ if indexEtape < indexName :
+ comment=tr('le mot clef ')+name+tr(' doit etre insere apres ')+nom
+ QMessageBox.information( None,tr('insertion impossible'),comment, )
+ return False
+ return True
+
+ def append_child(self,name,pos=None,plier=False):