X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=InterfaceQT4%2Fcompocomm.py;h=d3e15102ab5ab44915cd604573cd71b3d75109ac;hb=e570dff249a11579eb7d33de376ed71be16d7261;hp=671bc67ec98c2bbb198c96f1f123fdd4c2623fe2;hpb=69ed0ccae7884aee37bbe54cb1af2983cb51492d;p=tools%2Feficas.git diff --git a/InterfaceQT4/compocomm.py b/InterfaceQT4/compocomm.py index 671bc67e..d3e15102 100644 --- a/InterfaceQT4/compocomm.py +++ b/InterfaceQT4/compocomm.py @@ -1,23 +1,22 @@ # -*- coding: utf-8 -*- -# CONFIGURATION MANAGEMENT OF EDF VERSION -# ====================================================================== -# COPYRIGHT (C) 1991 - 2002 EDF R&D WWW.CODE-ASTER.ORG -# THIS PROGRAM IS FREE SOFTWARE; YOU CAN REDISTRIBUTE IT AND/OR MODIFY -# IT UNDER THE TERMS OF THE GNU GENERAL PUBLIC LICENSE AS PUBLISHED BY -# THE FREE SOFTWARE FOUNDATION; EITHER VERSION 2 OF THE LICENSE, OR -# (AT YOUR OPTION) ANY LATER VERSION. +# Copyright (C) 2007-2013 EDF R&D # -# THIS PROGRAM 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 -# GENERAL PUBLIC LICENSE FOR MORE DETAILS. +# 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. # -# YOU SHOULD HAVE RECEIVED A COPY OF THE GNU GENERAL PUBLIC LICENSE -# ALONG WITH THIS PROGRAM; IF NOT, WRITE TO EDF R&D CODE_ASTER, -# 1 AVENUE DU GENERAL DE GAULLE, 92141 CLAMART CEDEX, FRANCE. +# 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 PyQt4.QtGui import * from PyQt4.QtCore import * @@ -26,20 +25,22 @@ import string from Editeur import Objecttreeitem import browser import typeNode +from Extensions.i18n import tr +from Extensions.eficas_exception import EficasException class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel): - def getPanel( self ): + def getPanel2( self ): """ """ - from monCommentairePanel import MonCommentairePanel - return MonCommentairePanel(self,parent=self.editor) + from monWidgetCommentaire import MonWidgetCommentaire + return MonWidgetCommentaire(self,self.editor,self.item.object) def createPopUpMenu(self): typeNode.PopUpMenuNodePartiel.createPopUpMenu(self) - self.Decommente = QAction('Decommenter',self.tree) + self.Decommente = QAction(tr("Decommenter"),self.tree) self.tree.connect(self.Decommente,SIGNAL("activated()"),self.Decommenter) - self.Decommente.setStatusTip("Decommente la commande ") + self.Decommente.setStatusTip(tr("Decommente la commande ")) if hasattr(self.item,'uncomment'): self.menu.addAction(self.Decommente) @@ -54,6 +55,7 @@ class Node(browser.JDCNode,typeNode.PopUpMenuNodePartiel): debComm=self.item.GetText() self.setText(1,debComm) + class COMMTreeItem(Objecttreeitem.ObjectTreeItem): itemNode=Node @@ -75,7 +77,7 @@ class COMMTreeItem(Objecttreeitem.ObjectTreeItem): - la fonte dans laquelle afficher ce texte - la couleur du texte """ - return 'commentaire' #CS_pbruno,Fonte_Commentaire,None + return 'c',None,None def get_valeur(self): """ @@ -110,7 +112,7 @@ class COMMTreeItem(Objecttreeitem.ObjectTreeItem): surcharge la méthode get_objet_commentarise de la classe Objecttreeitem.ObjectTreeItem elle a pour but d'empecher l'utilisateur final de commentariser un commentaire. """ - raise Exception( 'Impossible de commentariser un commentaire' ) + raise EficasException( 'Impossible de commentariser un commentaire' ) import Extensions treeitem =COMMTreeItem