X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=InterfaceQT4%2FgereIcones.py;h=1155e72b2a9b0d5c03a49747b36cf94a0e07cedc;hb=a54fdbf858683f1439bc26f155ece0fec66ae026;hp=4d3285e15b4389d3a18731ed07eb8fe2af3a1f96;hpb=97c204c49d4c9e2785779957f56d9b13a1e93181;p=tools%2Feficas.git diff --git a/InterfaceQT4/gereIcones.py b/InterfaceQT4/gereIcones.py index 4d3285e1..1155e72b 100644 --- a/InterfaceQT4/gereIcones.py +++ b/InterfaceQT4/gereIcones.py @@ -69,16 +69,50 @@ class FacultatifOuOptionnel: QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee ")) - def setPoubelle(self): + def setIconePoubelle(self): if not(hasattr(self,"RBPoubelle")):return + icon1 = QtGui.QIcon() + repIcon=os.path.join(os.path.abspath(os.path.dirname(__file__)),'../Editeur/icons') if self.node.item.object.isoblig() : - icon1 = QtGui.QIcon() - icon1.addPixmap(QtGui.QPixmap("/home/A96028/Install_EficasV1/KarineEficas/Editeur/icons/deleteRondVide.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) + icon1.addPixmap(QtGui.QPixmap(repIcon+"/deleteRondVide.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.RBPoubelle.setIcon(icon1) return + icon1.addPixmap(QtGui.QPixmap(repIcon+"/deleteRond.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off) self.RBPoubelle.show() self.connect(self.RBPoubelle,SIGNAL("clicked()"),self.aDetruire) + def setIconesSalome(self): + if not (hasattr(self,"RBSalome")): return + from Accas import SalomeEntry + mc = self.node.item.get_definition() + mctype = mc.type[0] + enable_salome_selection = self.editor.salome and \ + (('grma' in repr(mctype)) or ('grno' in repr(mctype)) or ('SalomeEntry' in repr(mctype)) or \ + (hasattr(mctype, "enable_salome_selection") and mctype.enable_salome_selection)) + if enable_salome_selection: + self.connect(self.RBSalome,SIGNAL("pressed()"),self.BSalomePressed) + if not(('grma' in repr(mctype)) or ('grno' in repr(mctype))) or not(self.editor.salome): self.BView2D.close() + else : self.connect(self.RBSalomeVue,SIGNAL("clicked()"),self.BView2DPressed) + else: + self.RBSalome.close() + self.RBSalomeVue.close() + + + def setIconesFichier(self): + if not ( hasattr(self,"BFichier")): return + mc = self.node.item.get_definition() + mctype = mc.type[0] + if mctype == "Repertoire": + self.BRepertoire=self.BFichier + self.connect(self.BRepertoire,SIGNAL("clicked()"),self.BRepertoirePressed) + self.BVisuFichier.close() + else : + self.connect(self.BFichier,SIGNAL("clicked()"),self.BFichierPressed) + self.connect(self.BVisuFichier,SIGNAL("clicked()"),self.BFichierVisu) + + + + def setRun(self): if hasattr(self.editor.appliEficas, 'mesScripts'): if self.tree.currentItem().item.get_nom() in self.appliEficas.mesScripts.dict_commandes.keys() : @@ -95,16 +129,25 @@ class FacultatifOuOptionnel: #print " c est le moment de gerer le passage au suivant" if not(hasattr (self,'RBValide')) : return icon = QIcon() + repIcon=os.path.join(os.path.abspath(os.path.dirname(__file__)),'../Editeur/icons') if self.node.item.object.isvalid() : - icon=QIcon(self.repIcon+"/ast-green-ball.png") + icon=QIcon(repIcon+"/ast-green-ball.png") else : - icon=QIcon(self.repIcon+"/ast-red-ball.png") + icon=QIcon(repIcon+"/ast-red-ball.png") self.RBValide.setIcon(icon) + # il faut chercher la bonne fenetre def rendVisible(self): - print "je passe par rendVisible de FacultatifOuOptionnel" - self.editor.fenetreCentraleAffichee.scrollAreaCommandes.ensureWidgetVisible(self) - self.setFocus() + #print "je passe par rendVisible de FacultatifOuOptionnel" + #print self + #print self.node.fenetre + #print "return pour etre sure" + return + #PNPN + newNode=self.node.treeParent.chercheNoeudCorrespondant(self.node.item.object) + #print newNode + self.editor.fenetreCentraleAffichee.scrollAreaCommandes.ensureWidgetVisible(newNode.fenetre) + #newNode.fenetre.setFocus() class ContientIcones: