]> SALOME platform Git repositories - tools/eficas.git/blob - InterfaceQT4/monWidgetInactif.py
Salome HOME
a247920e30b754a843b1a1fa8a8b75696bdfe8a1
[tools/eficas.git] / InterfaceQT4 / monWidgetInactif.py
1 # Copyright (C) 2007-2013   EDF R&D
2 #
3 # This library is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU Lesser General Public
5 # License as published by the Free Software Foundation; either
6 # version 2.1 of the License.
7 #
8 # This library is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 # Lesser General Public License for more details.
12 #
13 # You should have received a copy of the GNU Lesser General Public
14 # License along with this library; if not, write to the Free Software
15 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 #
17 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 #
19 # Modules Python
20 # Modules Eficas
21
22 from PyQt4.QtGui import *
23 from PyQt4.QtCore import *
24 from Extensions.i18n import tr
25 from desWidgetInactif import Ui_WidgetInactif
26 import Accas 
27 import os
28 import string
29
30     
31 # Import des panels
32
33 class MonWidgetInactif(QWidget,Ui_WidgetInactif):
34   """
35   """
36   def __init__(self,node,editor):
37        QWidget.__init__(self,None)
38        self.node=node
39        self.editor=editor
40        self.setupUi(self)
41        if self.editor.widgetOptionnel!= None :
42           self.monOptionnel=self.editor.widgetOptionnel
43        else :
44           self.monOptionnel=MonWidgetOptionnel(self)
45           self.editor.widgetOptionnel=self.monOptionnel
46           self.editor.splitter.addWidget(self.monOptionnel)
47        self.afficheOptionnel()
48        self.connect(self.bAvant,SIGNAL("clicked()"), self.afficheAvant)
49        self.connect(self.bApres,SIGNAL("clicked()"), self.afficheApres)
50        self.connect(self.bCatalogue,SIGNAL("clicked()"), self.afficheCatalogue)
51
52   
53
54   def setValide(self):
55       pass 
56
57   def afficheOptionnel(self):
58       # N a pas de parentQt. doit donc etre redefini
59       liste=[]
60       #print "dans afficheOptionnel", self.monOptionnel
61       # dans le cas ou l insertion n a pas eu leiu (souci d ordre par exemple)
62       #if self.monOptionnel == None : return
63       self.monOptionnel.parentMC=self
64       self.monOptionnel.affiche(liste)
65
66
67   def afficheCatalogue(self):
68       if self.editor.widgetOptionnel != None : self.monOptionnel.hide()
69       self.racine.affichePanneau()
70       if self.node : self.node.select()
71       else : self.racine.select()
72
73   def afficheApres(self):
74        self.node.selectApres()
75
76   def afficheAvant(self):
77        self.node.selectAvant()
78
79