]> SALOME platform Git repositories - modules/eficas.git/commitdiff
Salome HOME
*** empty log message ***
authorPascale Noyret <pascale.noyret@edf.fr>
Tue, 1 Dec 2009 15:40:36 +0000 (15:40 +0000)
committerPascale Noyret <pascale.noyret@edf.fr>
Tue, 1 Dec 2009 15:40:36 +0000 (15:40 +0000)
InterfaceQT4/browser.py
InterfaceQT4/monPlusieursBasePanel.py
InterfaceQT4/monPlusieursIntoPanel.py
InterfaceQT4/monUniqueBasePanel.py
UiQT4/desUniqueBase.ui
generator/generator_vers3DSalome.py

index 729dce1f151ad59465f384157feb68243b8d1946..ff9cddec8043a130c3dd4358c5ee49bd2a269a4a 100644 (file)
@@ -336,14 +336,14 @@ class JDCNode(QTreeWidgetItem):
         self.setText(1, value)
 
     def update_nodes(self):
-        print 'NODE update_nodes', self.item.GetLabelText()
+        #print 'NODE update_nodes', self.item.GetLabelText()
         self.build_children()
 
     def update_valid(self) :
         """Cette methode a pour but de mettre a jour la validite du noeud
            et de propager la demande de mise a jour a son parent
         """
-        print "NODE update_valid", self.item.GetLabelText()
+        #print "NODE update_valid", self.item.GetLabelText()
         self.update_node_valid()
         try :
           self.treeParent.update_valid()
index 9195fa5253e15b903b17c0c87a0aaf947fabb534..8728fdce8fd33e6b9ad8cbdd9c72fbd69cf2a83c 100644 (file)
@@ -45,6 +45,7 @@ class DPlusBase (Ui_DPlusBase,QDialog):
           parent.addWidget(parent.partieDroite)
           parent.leLayout.widgetActive=self
        self.setupUi(self)
+       self.appliEficas=parent.appliEficas
        self.RepIcon=parent.appliEficas.RepIcon
        icon = QIcon(self.RepIcon+"/arrow_left.png")
        self.BAjout1Val.setIcon(icon)
@@ -78,6 +79,8 @@ class MonPlusieursBasePanel(DPlusBase,QTPanel,SaisieValeur):
         self.connect(self.BSup1Val,SIGNAL("clicked()"),self.Sup1Valeur)
         self.connect(self.LEValeur,SIGNAL("returnPressed()"),self.LEValeurPressed)
         self.connect(self.BSalome,SIGNAL("clicked()"),self.BSalomePressed)
+        self.connect(self.BView2D,SIGNAL("clicked()"),self.BView2DPressed)
+
 
   def detruitBouton(self):
         icon3 = QIcon(self.RepIcon+"/image240.png")
@@ -119,6 +122,7 @@ class MonPlusieursBasePanel(DPlusBase,QTPanel,SaisieValeur):
         for valeur in self.listeValeursCourantes :
                 if i != index : listeVal.append(valeur)
                 i = i+1
+        self.LBValeurs.setCurrentItem(self.LBValeurs.item(index -1))
         self.listeValeursCourantes=listeVal
           
 
@@ -205,7 +209,7 @@ class MonPlusieursBasePanel(DPlusBase,QTPanel,SaisieValeur):
             if "GROUP_MA" in e: kwType = "GROUP_MA"
 
         #print "BkwType",kwType
-        selection, commentaire = self.editor.appliEficas.selectGroupFromSalome(kwType,editor=self.editor)
+        selection, commentaire = self.appliEficas.selectGroupFromSalome(kwType,editor=self.editor)
         if commentaire !="" :
             self.Commentaire.setText(QString(commentaire))
         monTexte=""
@@ -218,11 +222,12 @@ class MonPlusieursBasePanel(DPlusBase,QTPanel,SaisieValeur):
   def BView2DPressed(self):
         valeur=self.LEValeur.text()
         if valeur == QString("") :
-           valeur=self.LBValeurs.currentText()
+           if self.LBValeurs.currentItem() != None :
+              valeur=self.LBValeurs.currentItem().text()
         if valeur == QString("") : return
         valeur = str(valeur)
         if valeur :
-           ok, msgError = self.editor.parent.appliEficas.displayShape(valeur)
+           ok, msgError = self.appliEficas.displayShape(valeur)
            if not ok:
-              self.editor.parent.appli.affiche_infos(msgError)
+              self.editor.affiche_infos(msgError)
 
index 5b084b306578fa480f9e3832b552e1fee965fe0e..3b5ed195b29507379488a698ccd2ddd37adca4ef 100644 (file)
@@ -96,6 +96,7 @@ class MonPlusieursIntoPanel(DPlusInto,QTPanel,SaisieValeur):
         for valeur in self.listeValeursCourantes :
                 if i != indexCourant : listeVal.append(valeur)
                 i = i+1
+        self.LBValeurs.setCurrentItem(self.LBValeurs.item(index -1))
         self.listeValeursCourantes=listeVal
         SaisieValeur.RemplitPanel(self,self.listeValeursCourantes)
           
index 392dbe6f9522de3f4a049bcf22796e78dab92334..0bbab299e4e6fc5317598a62f16ace576267c213 100644 (file)
@@ -87,7 +87,6 @@ class MonUniqueBasePanel(DUnBase,QTPanel,SaisieValeur):
         else :
           self.bParametres.close()
         type = mc.type[0]
-        #if not('grma' in repr(type)) or not(self.editor.salome) :
         if not(('grma' in repr(type)) or ('grno' in repr(type))) or not(self.editor.salome) :
            self.BSalome.close()
            self.BView2D.close()
@@ -151,7 +150,7 @@ class MonUniqueBasePanel(DUnBase,QTPanel,SaisieValeur):
             if "GROUP_NO" in e: kwType = "GROUP_NO"
             if "GROUP_MA" in e: kwType = "GROUP_MA"
 
-        selection, commentaire = self.editor.parent.appliEficas.selectGroupFromSalome(kwType,editor=self.editor)
+        selection, commentaire = self.appliEficas.selectGroupFromSalome(kwType,editor=self.editor)
         if commentaire !="" :
             self.Commentaire.setText(QString(commentaire))
         monTexte=""
@@ -159,14 +158,14 @@ class MonUniqueBasePanel(DUnBase,QTPanel,SaisieValeur):
         for geomElt in selection:
             monTexte=geomElt+","
         monTexte= monTexte[0:-1]
-        self.LEValeur.setText(QString(monTexte))
+        self.lineEditVal.setText(QString(monTexte))
 
   def BView2DPressed(self):
-        valeur=self.LEValeur.text()
+        valeur=self.lineEditVal.text()
         if valeur == QString("") : return
         valeur = str(valeur)
         if valeur :
-           ok, msgError = self.editor.parent.appliEficas.displayShape(valeur)
+           ok, msgError = self.appliEficas.displayShape(valeur)
            if not ok:
-              self.editor.parent.appli.affiche_infos(msgError)
+              self.appliEficas.affiche_infos(msgError)
 
index 57b0a4bab738d0eb547c546c6c2f53f9903c2531..4fd8997208bc79e4638ebd294580ed8c2cf6e321 100644 (file)
@@ -1,7 +1,8 @@
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
  <class>DUnBase</class>
- <widget class="QWidget" name="DUnBase" >
-  <property name="geometry" >
+ <widget class="QWidget" name="DUnBase">
+  <property name="geometry">
    <rect>
     <x>0</x>
     <y>0</y>
     <height>480</height>
    </rect>
   </property>
-  <property name="minimumSize" >
+  <property name="minimumSize">
    <size>
     <width>350</width>
     <height>0</height>
    </size>
   </property>
-  <property name="windowTitle" >
+  <property name="windowTitle">
    <string>DUnIn</string>
   </property>
-  <layout class="QGridLayout" >
-   <item row="0" column="0" >
-    <widget class="QTabWidget" name="tabuniqueinto" >
-     <widget class="QWidget" name="Widget8" >
-      <attribute name="title" >
+  <layout class="QGridLayout">
+   <item row="0" column="0">
+    <widget class="QTabWidget" name="tabuniqueinto">
+     <widget class="QWidget" name="Widget8">
+      <attribute name="title">
        <string>Saisir Valeur</string>
       </attribute>
-      <layout class="QGridLayout" name="gridLayout>
-       <item row="0" column="0" colspan="4" >
-        <layout class="QHBoxLayout" name="horizontalLayout" >
+      <layout class="QGridLayout" name="gridLayout_2">
+       <item row="0" column="0">
+        <layout class="QHBoxLayout" name="horizontalLayout">
          <item>
-          <widget class="QLabel" name="textLabel2" >
-           <property name="text" >
-            <string>&lt;b>&lt;u>&lt;p align="center">Valeur: &lt;/p>&lt;/u>&lt;/b></string>
+          <widget class="QLabel" name="textLabel2">
+           <property name="text">
+            <string>&lt;b&gt;&lt;u&gt;&lt;p align=&quot;center&quot;&gt;Valeur: &lt;/p&gt;&lt;/u&gt;&lt;/b&gt;</string>
            </property>
-           <property name="wordWrap" >
+           <property name="wordWrap">
             <bool>false</bool>
            </property>
           </widget>
          </item>
          <item>
-          <widget class="QLineEdit" name="lineEditVal" >
-           <property name="minimumSize" >
+          <widget class="QLineEdit" name="lineEditVal">
+           <property name="minimumSize">
             <size>
              <width>290</width>
              <height>50</height>
          </item>
         </layout>
        </item>
-       <item row="1" column="2" >
-        <spacer name="verticalSpacer" >
-         <property name="orientation" >
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeHint" stdset="0" >
-          <size>
-           <width>137</width>
-           <height>43</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item rowspan="2" row="1" column="3" >
-        <widget class="QPushButton" name="bParametres" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>140</width>
-           <height>45</height>
-          </size>
-         </property>
-         <property name="text" >
-          <string>Parametres</string>
-         </property>
-        </widget>
-       </item>
-       <item row="2" column="0" colspan="3" >
-        <spacer name="horizontalSpacer_3" >
-         <property name="orientation" >
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0" >
-          <size>
-           <width>293</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item row="3" column="0" >
-        <widget class="QPushButton" name="BSalome" >
-         <property name="minimumSize" >
-          <size>
-           <width>142</width>
-           <height>40</height>
-          </size>
-         </property>
-         <property name="text" >
-          <string/>
-         </property>
-         <property name="icon" >
-          <iconset>
-           <normaloff>image240.png</normaloff>image240.png</iconset>
-         </property>
-        </widget>
-       </item>
-       <item row="3" column="1" >
-        <spacer name="horizontalSpacer_5" >
-         <property name="orientation" >
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0" >
-          <size>
-           <width>138</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item rowspan="2" row="3" column="2" >
-        <spacer name="spacer4" >
-         <property name="orientation" >
-          <enum>Qt::Vertical</enum>
-         </property>
-         <property name="sizeType" >
-          <enum>QSizePolicy::Expanding</enum>
-         </property>
-         <property name="sizeHint" stdset="0" >
-          <size>
-           <width>137</width>
-           <height>77</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item row="3" column="3" >
-        <widget class="QPushButton" name="BView2D" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>140</width>
-           <height>40</height>
-          </size>
-         </property>
-         <property name="text" >
-          <string>Visualiser</string>
-         </property>
-        </widget>
-       </item>
-       <item rowspan="2" row="4" column="3" >
-        <widget class="QPushButton" name="BFichier" >
-         <property name="sizePolicy" >
-          <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
-           <horstretch>0</horstretch>
-           <verstretch>0</verstretch>
-          </sizepolicy>
-         </property>
-         <property name="minimumSize" >
-          <size>
-           <width>140</width>
-           <height>40</height>
-          </size>
-         </property>
-         <property name="text" >
-          <string>Fichier</string>
-         </property>
-         <property name="icon" >
-          <iconset>
-           <normaloff>image240.png</normaloff>image240.png</iconset>
-         </property>
-        </widget>
-       </item>
-       <item row="5" column="0" colspan="3" >
-        <spacer name="horizontalSpacer_4" >
-         <property name="orientation" >
-          <enum>Qt::Horizontal</enum>
-         </property>
-         <property name="sizeHint" stdset="0" >
-          <size>
-           <width>293</width>
-           <height>20</height>
-          </size>
-         </property>
-        </spacer>
-       </item>
-       <item row="6" column="0" colspan="4" >
-        <layout class="QVBoxLayout" name="verticalLayout" >
-         <item>
-          <spacer name="verticalSpacer_2" >
-           <property name="orientation" >
-            <enum>Qt::Vertical</enum>
+       <item row="1" column="0">
+        <layout class="QGridLayout" name="gridLayout">
+         <item row="0" column="0">
+          <spacer name="horizontalSpacer_3">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeHint" stdset="0" >
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>293</width>
+             <height>20</height>
+            </size>
+           </property>
+          </spacer>
+         </item>
+         <item row="0" column="1">
+          <widget class="QPushButton" name="BSalome">
+           <property name="minimumSize">
             <size>
-             <width>20</width>
+             <width>142</width>
              <height>40</height>
             </size>
            </property>
+           <property name="text">
+            <string>Selectionner</string>
+           </property>
+           <property name="icon">
+            <iconset>
+             <normaloff>image240.png</normaloff>image240.png</iconset>
+           </property>
+          </widget>
+         </item>
+         <item row="0" column="2">
+          <widget class="QPushButton" name="bParametres">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>45</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Parametres</string>
+           </property>
+          </widget>
+         </item>
+         <item row="1" column="0">
+          <spacer name="horizontalSpacer_5">
+           <property name="orientation">
+            <enum>Qt::Horizontal</enum>
+           </property>
+           <property name="sizeHint" stdset="0">
+            <size>
+             <width>138</width>
+             <height>20</height>
+            </size>
+           </property>
           </spacer>
          </item>
-         <item>
-          <widget class="QLabel" name="Commentaire" >
-           <property name="text" >
-            <string>TextLabel</string>
+         <item row="1" column="1">
+          <widget class="QPushButton" name="BView2D">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
+           </property>
+           <property name="minimumSize">
+            <size>
+             <width>140</width>
+             <height>40</height>
+            </size>
+           </property>
+           <property name="text">
+            <string>Visualiser</string>
            </property>
           </widget>
          </item>
-         <item>
-          <spacer name="verticalSpacer_3" >
-           <property name="orientation" >
-            <enum>Qt::Vertical</enum>
+         <item row="1" column="2">
+          <widget class="QPushButton" name="BFichier">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+             <horstretch>0</horstretch>
+             <verstretch>0</verstretch>
+            </sizepolicy>
            </property>
-           <property name="sizeHint" stdset="0" >
+           <property name="minimumSize">
             <size>
-             <width>20</width>
+             <width>140</width>
              <height>40</height>
             </size>
            </property>
-          </spacer>
+           <property name="text">
+            <string>Fichier</string>
+           </property>
+           <property name="icon">
+            <iconset>
+             <normaloff>image240.png</normaloff>image240.png</iconset>
+           </property>
+          </widget>
          </item>
         </layout>
        </item>
-       <item row="7" column="0" colspan="4" >
-        <layout class="QHBoxLayout" name="horizontalLayout_2" >
+       <item row="2" column="0">
+        <widget class="QLabel" name="Commentaire">
+         <property name="text">
+          <string>TextLabel</string>
+         </property>
+        </widget>
+       </item>
+       <item row="3" column="0">
+        <layout class="QHBoxLayout" name="horizontalLayout_2">
          <item>
-          <spacer name="horizontalSpacer" >
-           <property name="orientation" >
+          <spacer name="horizontalSpacer">
+           <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeHint" stdset="0" >
+           <property name="sizeHint" stdset="0">
             <size>
              <width>40</width>
              <height>20</height>
           </spacer>
          </item>
          <item>
-          <widget class="QPushButton" name="bOk" >
-           <property name="sizePolicy" >
-            <sizepolicy vsizetype="Fixed" hsizetype="Fixed" >
+          <widget class="QPushButton" name="bOk">
+           <property name="sizePolicy">
+            <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
              <horstretch>0</horstretch>
              <verstretch>0</verstretch>
             </sizepolicy>
            </property>
-           <property name="minimumSize" >
+           <property name="minimumSize">
             <size>
              <width>140</width>
              <height>40</height>
             </size>
            </property>
-           <property name="toolTip" >
+           <property name="toolTip">
             <string>validation de la saisie</string>
            </property>
-           <property name="text" >
+           <property name="text">
             <string>&amp;Valider</string>
            </property>
-           <property name="shortcut" >
+           <property name="shortcut">
             <string>Shift+A, Alt+A, Alt+A, Alt+A</string>
            </property>
           </widget>
          </item>
          <item>
-          <spacer name="horizontalSpacer_2" >
-           <property name="orientation" >
+          <spacer name="horizontalSpacer_2">
+           <property name="orientation">
             <enum>Qt::Horizontal</enum>
            </property>
-           <property name="sizeHint" stdset="0" >
+           <property name="sizeHint" stdset="0">
             <size>
              <width>40</width>
              <height>20</height>
    </item>
   </layout>
  </widget>
- <layoutdefault spacing="6" margin="11" />
+ <layoutdefault spacing="6" margin="11"/>
  <tabstops>
   <tabstop>lineEditVal</tabstop>
-  <tabstop>bOk</tabstop>
-  <tabstop>BSalome</tabstop>
-  <tabstop>BView2D</tabstop>
  </tabstops>
  <resources/>
  <connections/>
index 298dd547d438ad112819c63d8d2817916a4931e9..7fb29fbdbcfea8c88b28978cadc095a3ea050a12 100644 (file)
@@ -67,7 +67,7 @@ class vers3DSalomeGenerator(PythonGenerator):
                             "BARRE", "CABLE", "CARA", "COQUE", "EPAIS", 
                             "EXCENTREMENT", "GROUP_MA", "ORIENTATION", 
                             "POUTRE", "SECTION", "VALE", "VARI_SECT",
-                            "GRILLE", "ANGL_REP",
+                            "GRILLE", "ANGL_REP", "VECTEUR",
                              "b_constant", "b_homothetique", 
                             "b_rectangle", "b_affine", "b_cercle" )
       self.dict_deb_com={"POUTRE":"VisuPoutre", "CABLE" : "VisuCable",
@@ -77,7 +77,7 @@ class vers3DSalomeGenerator(PythonGenerator):
       self.dict_suite_com={"RECTANGLE":"Rectangle","GENERALE":"Generale",
                            "CERCLE":"Cercle"}
 
-      self.dict_traduit={"VARI_SECT":"extrusion","EXCENTREMENT":"Excentre","EPAIS":"Epais"}
+      self.dict_traduit={"VARI_SECT":"extrusion","EXCENTREMENT":"Excentre","EPAIS":"Epais","VECTEUR":"Vecteur"}
 
       self.init_ligne() 
 
@@ -95,6 +95,7 @@ class vers3DSalomeGenerator(PythonGenerator):
       self.node=node
       self.list_commandes=[];
       self.generator(self.node.object)
+      #print self.list_commandes
       return self.list_commandes
 
    def generator(self,obj):
@@ -223,4 +224,3 @@ class vers3DSalomeGenerator(PythonGenerator):
       self.dict_attributs["axeX"]=alpha
       self.dict_attributs["axeY"]=beta
       self.dict_attributs["axeZ"]=gamma
-