]> SALOME platform Git repositories - tools/eficas.git/blobdiff - InterfaceQT4/gereIcones.py
Salome HOME
onItem=Deplie
[tools/eficas.git] / InterfaceQT4 / gereIcones.py
index e5d3d67caa5b4b6f745b3d67465523c4cac867f1..8a5f69abbd8277afa217bd0c6847f48442686ccd 100644 (file)
@@ -18,7 +18,7 @@
 # See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 #
 # Modules Python
-import string,types,os,re
+import string,types,os,re,sys
 import traceback
 
 from PyQt4 import *
@@ -31,15 +31,18 @@ listeSuffixe=('bmp','png','jpg' ,'txt','med')
 class FacultatifOuOptionnel:
 
   def setReglesEtAide(self):
-      from monWidgetCommande import MonWidgetCommande
       listeRegles=()
       try :
          listeRegles     = self.node.item.get_regles()
       except :
          pass
-      if listeRegles==() and hasattr(self,"RBRegle"): self.RBRegle.close() 
+      if hasattr(self,"RBRegle"):
+        if listeRegles==() : self.RBRegle.close() 
+        else : self.connect( self.RBRegle,SIGNAL("clicked()"),self.viewRegles)
+
       cle_doc=None
       if not hasattr(self,"RBInfo"):return
+      from monWidgetCommande import MonWidgetCommande
       if isinstance(self,MonWidgetCommande) and self.editor.code =="MAP":
          self.cle_doc = self.chercheDocMAP()
       else :
@@ -69,6 +72,9 @@ class FacultatifOuOptionnel:
       except:
           QMessageBox.warning( self,tr( "Aide Indisponible"),tr( "l'aide n est pas installee "))
 
+  def viewRegles(self):
+      self.node.AppelleBuildLBRegles()
+
 
   def setIconePoubelle(self):
       if not(hasattr(self,"RBPoubelle")):return
@@ -156,11 +162,13 @@ class ContientIcones:
   def BFichierVisu(self):
        fichier=self.lineEditVal.text()
        if fichier == None or str(fichier)=="" : return
-       from qtCommun import ViewText
+       from monViewTexte import ViewText
        try :
-         if sys.platform[0:5]=="linux" : cmd="xdg-open "+ str(fichier)
-         else                         : cmd="start "+ str(fichier)
-         os.system(cmd)
+         if sys.platform[0:5]=="linux" :
+           cmd="xdg-open "+ str(fichier)
+           os.system(cmd)
+         else                         :
+           os.startfile(str(fichier)) 
        except:
          try :
             fp=open(fichier)
@@ -198,7 +206,7 @@ class ContientIcones:
          ulfile = os.path.abspath(unicode(fichier))
          self.appliEficas.CONFIGURATION.savedir=os.path.split(ulfile)[0]
          self.lineEditVal.setText(fichier)
-         self.editor.affiche_infos(tr("Fichier selectionne"))
+         self.editor.affiche_commentaire(tr("Fichier selectionne"))
          self.LEValeurPressed()
          if (QFileInfo(fichier).suffix() in listeSuffixe ):
              self.image=fichier
@@ -232,7 +240,7 @@ class ContientIcones:
           
 
   def BSalomePressed(self):
-        self.editor.affiche_infos(QString(""))
+        self.editor.affiche_commentaire(QString(""))
         selection=[]
         commentaire=""
         genea=self.node.item.get_genealogie()
@@ -281,7 +289,7 @@ class ContientIcones:
         if valeur :
            ok, msgError = self.appliEficas.displayShape(valeur)
            if not ok:
-              self.appliEficas.affiche_infos(msgError,Qt.red)
+              self.editor.affiche_infos(msgError,Qt.red)
 
   def BParametresPressed(self):
         liste=self.node.item.get_liste_param_possible()