]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
update GUI: display only one model pannel
authorBernard Sécherà <bernard.secher@cea.fr>
Fri, 26 Feb 2021 12:20:07 +0000 (13:20 +0100)
committerBernard Sécherà <bernard.secher@cea.fr>
Fri, 26 Feb 2021 12:20:07 +0000 (13:20 +0100)
CoreFlows/gui/ui/MainCFWidget.py
CoreFlows/gui/ui/MainCFWidget.ui

index 64a5dcfe46c66252f7f76c0e7e85e304f30e45d9..6b3fcf4bede8f33436cc3caf79aa1bf0dc3af9e0 100755 (executable)
@@ -11,6 +11,13 @@ class MainCFWidget(QtWidgets.QTabWidget):
     QtWidgets.QTabWidget.__init__(self)
     loadUi(completeResPath("MainCFWidget.ui"), self)
     self._python_dump = []
+    self.models = []
+    for i in range(6):
+      self.models += [self.widget(2+i)]
+    for i in range(5):
+      self.removeTab(3)
+#    for i in range(5):
+#      self.insertTab(3+i,self.models[i],"Physical model")
     
   def scanWidgets(self):
     print(self.tabModel)
@@ -264,3 +271,43 @@ class MainCFWidget(QtWidgets.QTabWidget):
     myProblem.terminate()
     
     # TODO use a helper object here.
+    
+  def onSinglePhaseSelected(self,isChecked):
+    if(isChecked):
+      print("SinglePhaseSelected")
+      self.removeTab(2)
+      self.insertTab(2,self.models[0],"Physical model")
+      
+    
+  def onDriftModelSelected(self,isChecked):
+    if(isChecked):
+      print("DriftModelSelected")
+      self.removeTab(2)
+      self.insertTab(2,self.models[1],"Physical model")
+
+  def onTransportSelected(self,isChecked):
+    if(isChecked):
+      print("TransportSelected")
+      self.removeTab(2)
+      self.insertTab(2,self.models[5],"Physical model")
+      
+    
+  def onIsothermal2FluidSelected(self,isChecked):
+    if(isChecked):
+      print("Isothermal2FluidSelected")
+      self.removeTab(2)
+      self.insertTab(2,self.models[3],"Physical model")
+
+  def onDiffusionSelected(self,isChecked):
+    if(isChecked):
+      print("DiffusionSelected")
+      self.removeTab(2)
+      self.insertTab(2,self.models[4],"Physical model")
+      
+    
+  def on5Eq2FluidSelected(self,isChecked):
+    if(isChecked):
+      print("5Eq2FluidSelected")
+      self.removeTab(2)
+      self.insertTab(2,self.models[2],"Physical model")
+
index 74e86f641eb5f48f627a00d4c5faa910be3efe2a..d4228671533d7cddb34f19c0269f0324cceabe77 100755 (executable)
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>618</x>
-     <y>212</y>
+     <x>610</x>
+     <y>237</y>
     </hint>
     <hint type="destinationlabel">
-     <x>858</x>
-     <y>377</y>
+     <x>110</x>
+     <y>65</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>482</x>
-     <y>212</y>
+     <x>476</x>
+     <y>237</y>
     </hint>
     <hint type="destinationlabel">
-     <x>608</x>
-     <y>377</y>
+     <x>110</x>
+     <y>65</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>346</x>
-     <y>212</y>
+     <x>342</x>
+     <y>237</y>
     </hint>
     <hint type="destinationlabel">
-     <x>358</x>
-     <y>377</y>
+     <x>110</x>
+     <y>65</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>183</x>
-     <y>249</y>
+     <x>100</x>
+     <y>65</y>
     </hint>
     <hint type="destinationlabel">
-     <x>604</x>
-     <y>370</y>
+     <x>780</x>
+     <y>235</y>
     </hint>
    </hints>
   </connection>
    <slot>onLaunchSimu()</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>989</x>
-     <y>753</y>
+     <x>349</x>
+     <y>80</y>
     </hint>
     <hint type="destinationlabel">
      <x>918</x>
     </hint>
    </hints>
   </connection>
+  <connection>
+   <sender>DriftModel_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onDriftModelSelected(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>647</x>
+     <y>465</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>SinglePhase_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onSinglePhaseSelected(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>522</x>
+     <y>390</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>TransportEquation_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onTransportSelected(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>522</x>
+     <y>294</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>DiffusionEquation_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onDiffusionSelected(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>522</x>
+     <y>330</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>IsothermalTwoFluid_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onIsothermal2FluidSelected(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>522</x>
+     <y>486</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>FiveEqsTwoFluid_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>on5Eq2FluidSelected(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>522</x>
+     <y>522</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
  </connections>
  <slots>
   <slot>onTransportSelected(bool)</slot>