]> SALOME platform Git repositories - tools/eficas.git/commitdiff
Salome HOME
matrice coloree
authorpascale.noyret <pascale.noyret@edf.fr>
Tue, 28 Sep 2021 09:47:39 +0000 (11:47 +0200)
committerpascale.noyret <pascale.noyret@edf.fr>
Tue, 28 Sep 2021 09:47:39 +0000 (11:47 +0200)
InterfaceQT4/composimp.py
InterfaceQT4/monWidgetMatrice.py
UiQT5/desWidgetMatrice.ui

index e58363c3a85d7a214b491e2540e5debfcc39e1bb..79556d1e55441f378938b201440272cf2785096d 100644 (file)
@@ -668,8 +668,10 @@ class SIMPTreeItem(Objecttreeitem.AtomicObjectTreeItem):
     def waitMatrice(self):
         """ Methode booleenne qui retourne 1 si l'objet pointe par self
         attend un Tuple, 0 sinon """
+        # il faut trouver autre chose que ce find!!!
         for ss_type in self.object.definition.type:
-            if repr(ss_type).find('Matrice') != -1 :
+            #if repr(ss_type).find('Matrice') != -1 :
+            if hasattr(ss_type, 'typElt') : 
                 return 1
         return 0
 
index 02fb9311bda7fc5277ad3b57457a31af294b9208..352459ced0e4f789f72bc2663b71f9af7b377468 100644 (file)
@@ -208,7 +208,7 @@ class MonWidgetMatriceOT (MonWidgetMatrice):
             try:
                 MonWidgetMatrice.__dict__[self.monType.methodeCalculTaille](*(self,))
             except :
-                QMessageBox.critical( self, tr("Mauvaise execution "),tr( "impossible d executer la methode ") + monType.methodeCalculTaille )
+                QMessageBox.critical( self, tr("Mauvaise execution "),tr( "impossible d executer la methode ") + self.monType.methodeCalculTaille )
                 return
         else :
             self.nbLigs=self.monType.nbLigs
@@ -244,6 +244,20 @@ class MonWidgetMatriceOT (MonWidgetMatrice):
         self.TBMatrice.setVerticalHeaderLabels(header)
         self.TBMatrice.setHorizontalHeaderLabels(header)
 
+    def  nbDeVariables(self):
+    # uniquement pour OT
+        jdc=self.node.item.object.jdc
+        etape=self.node.item.object.etape
+        self.listeVariables=jdc.getVariables(etape)
+        if self.listeVariables == [] :
+            QMessageBox.critical( self, tr("Mauvaise Commande "),tr( "Aucune variable connue. Entrez les variables avant la matrice"))
+            return
+        self.TBMatrice.setColumnCount(len(self.listeVariables))
+        self.TBMatrice.setRowCount(len(self.listeVariables))
+        self.nbLigs=len(self.listeVariables)
+        self.nbCols=len(self.listeVariables)
+
+
     def  initialValeur(self):
     # uniquement pour OT
         liste=self.node.item.getValeur()
index 1874cede803e5c7923fb25f8872019abe61bd4d3..378b9d7f831c8762e2fe72350b6d084d32b837db 100644 (file)
@@ -6,34 +6,34 @@
    <rect>
     <x>0</x>
     <y>0</y>
-    <width>1067</width>
-    <height>770</height>
+    <width>399</width>
+    <height>226</height>
    </rect>
   </property>
+  <property name="sizePolicy">
+   <sizepolicy hsizetype="MinimumExpanding" vsizetype="MinimumExpanding">
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
+  <property name="minimumSize">
+   <size>
+    <width>0</width>
+    <height>0</height>
+   </size>
+  </property>
   <property name="windowTitle">
    <string>Dialog</string>
   </property>
   <layout class="QHBoxLayout" name="horizontalLayout">
-   <property name="spacing">
-    <number>4</number>
-   </property>
-   <property name="leftMargin">
-    <number>0</number>
-   </property>
-   <property name="topMargin">
-    <number>0</number>
-   </property>
-   <property name="rightMargin">
-    <number>0</number>
-   </property>
-   <property name="bottomMargin">
-    <number>0</number>
-   </property>
    <item>
     <layout class="QVBoxLayout" name="verticalLayout_2">
      <property name="spacing">
       <number>0</number>
      </property>
+     <property name="sizeConstraint">
+      <enum>QLayout::SetFixedSize</enum>
+     </property>
      <item>
       <layout class="QHBoxLayout" name="horizontalLayout_2">
        <property name="spacing">
        </property>
        <property name="icon">
         <iconset theme="view-refresh">
-         <normaloff>.</normaloff>.</iconset>
+         <normaloff/>
+        </iconset>
        </property>
       </widget>
      </item>
      </property>
      <property name="minimumSize">
       <size>
-       <width>300</width>
+       <width>100</width>
        <height>25</height>
       </size>
      </property>
      <property name="maximumSize">
       <size>
-       <width>178</width>
+       <width>100</width>
        <height>16777215</height>
       </size>
      </property>
     </widget>
    </item>
    <item>
-    <widget class="QTableWidget" name="TBMatrice"/>
+    <spacer name="horizontalSpacer">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::MinimumExpanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>2</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
+   </item>
+   <item>
+    <layout class="QVBoxLayout" name="verticalLayout">
+     <item>
+      <widget class="QTableWidget" name="TBMatrice">
+       <property name="minimumSize">
+        <size>
+         <width>200</width>
+         <height>200</height>
+        </size>
+       </property>
+       <property name="frameShape">
+        <enum>QFrame::Box</enum>
+       </property>
+       <property name="frameShadow">
+        <enum>QFrame::Raised</enum>
+       </property>
+       <property name="sizeAdjustPolicy">
+        <enum>QAbstractScrollArea::AdjustToContents</enum>
+       </property>
+       <property name="dragEnabled">
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <spacer name="verticalSpacer_3">
+       <property name="orientation">
+        <enum>Qt::Vertical</enum>
+       </property>
+       <property name="sizeType">
+        <enum>QSizePolicy::Ignored</enum>
+       </property>
+       <property name="sizeHint" stdset="0">
+        <size>
+         <width>20</width>
+         <height>2</height>
+        </size>
+       </property>
+      </spacer>
+     </item>
+    </layout>
+   </item>
+   <item>
+    <spacer name="horizontalSpacer_2">
+     <property name="orientation">
+      <enum>Qt::Horizontal</enum>
+     </property>
+     <property name="sizeType">
+      <enum>QSizePolicy::MinimumExpanding</enum>
+     </property>
+     <property name="sizeHint" stdset="0">
+      <size>
+       <width>2</width>
+       <height>2</height>
+      </size>
+     </property>
+    </spacer>
    </item>
   </layout>
+  <zorder>label</zorder>
+  <zorder>horizontalSpacer_2</zorder>
+  <zorder>TBMatrice</zorder>
  </widget>
  <customwidgets>
   <customwidget>