# -*- coding: utf-8 -*-
+# Copyright (C) 2007-2013 EDF R&D
+#
+# This library is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 2.1 of the License.
+#
+# This library is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public
+# License along with this library; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+#
+# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+#
from Editeur import Objecttreeitem
import browser
+import typeNode
+from Extensions.i18n import tr
-class Node(browser.JDCNode):
+class Node(browser.JDCNode,typeNode.PopUpMenuRacine):
+
def getPanel(self):
- """
- """
- from monRacinePanel import MonRacinePanel
- return MonRacinePanel(self,parent=self.editor)
+ from monChoixCommande import MonChoixCommande
+ return MonChoixCommande(self,self.item, self.editor)
+
+
+ def createPopUpMenu(self):
+ typeNode.PopUpMenuRacine.createPopUpMenu(self)
+ def addParameters(self,apres):
+ param=self.append_child("PARAMETRE",pos=0)
+ return param
+
class JDCTreeItem(Objecttreeitem.ObjectTreeItem):
return " "
def GetLabelText(self):
- # None --> fonte et couleur par défaut
- return self.object.nom,None,None
+ # None --> fonte et couleur par defaut
+ return tr(self.object.nom),None,None
def get_jdc(self):
"""
- Retourne l'objet pointé par self
+ Retourne l'objet pointe par self
"""
return self.object
return cmd
def suppitem(self,item) :
- # item = item de l'ETAPE à supprimer du JDC
+ # item = item de l'ETAPE a supprimer du JDC
# item.getObject() = ETAPE ou COMMENTAIRE
# self.object = JDC
itemobject=item.getObject()
if self.object.suppentite(itemobject):
if itemobject.nature == "COMMENTAIRE" :
- message = "Commentaire supprimé"
+ message = tr("Commentaire supprime")
else :
- message = "Commande " + itemobject.nom + " supprimée"
- self.appli.affiche_infos(message)
- return 1
+ message = tr("Commande %s supprimee",itemobject.nom)
+ return 1,message
else:
- self.appli.affiche_infos("Pb interne : impossible de supprimer cet objet",Qt.red)
- return 0
+ message=tr("Pb interne : impossible de supprimer cet objet")
+ return 0,message
def GetSubList(self):
"""
return self.sublist
def get_l_noms_etapes(self):
- """ Retourne la liste des noms des étapes de self.object"""
+ """ Retourne la liste des noms des etapes de self.object"""
return self.object.get_l_noms_etapes()
def get_liste_cmd(self):