]> SALOME platform Git repositories - tools/solverlab.git/commitdiff
Salome HOME
manage meshes
authorBernard Sécherà <bernard.secher@cea.fr>
Fri, 26 Feb 2021 14:33:52 +0000 (15:33 +0100)
committerBernard Sécherà <bernard.secher@cea.fr>
Fri, 26 Feb 2021 14:33:52 +0000 (15:33 +0100)
CoreFlows/gui/ui/MainCFWidget.py
CoreFlows/gui/ui/MainCFWidget.ui

index 82ca2fa133f6fdc288e60b7c5a2a73dedd94f9f5..3c656021e224750dc988524353756388ae736f5e 100755 (executable)
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 from PyQt5 import QtWidgets, QtCore
+from PyQt5.QtWidgets import QFileDialog
 from PyQt5.uic import loadUi
 from slutils import completeResPath
 
@@ -275,8 +276,7 @@ class MainCFWidget(QtWidgets.QTabWidget):
       print("SinglePhaseSelected")
       self.removeTab(2)
       self.insertTab(2,self.models[0],"Physical model")
-      
-    
+
   def onDriftModelSelected(self,isChecked):
     if(isChecked):
       print("DriftModelSelected")
@@ -288,8 +288,7 @@ class MainCFWidget(QtWidgets.QTabWidget):
       print("TransportSelected")
       self.removeTab(2)
       self.insertTab(2,self.models[5],"Physical model")
-      
-    
+
   def onIsothermal2FluidSelected(self,isChecked):
     if(isChecked):
       print("Isothermal2FluidSelected")
@@ -301,11 +300,22 @@ class MainCFWidget(QtWidgets.QTabWidget):
       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")
 
+  def onCreationMesh(self,isChecked):
+    if(isChecked):
+      print("CreationMesh")
+
+  def onMeshFile(self,isChecked):
+    if(isChecked):
+      print("Input Mesh File")
+
+  def onSelectMeshFile(self):
+    print("Select Mesh File")
+    fname = QFileDialog.getOpenFileName(self, 'Open file','',"Image files (*.med)")
+    print(fname[0])
index d4228671533d7cddb34f19c0269f0324cceabe77..1d8abe56cd1e85284af70ecd9924e1ae6a258fa3 100755 (executable)
@@ -29,7 +29,7 @@
    <string notr="true"/>
   </property>
   <property name="currentIndex">
-   <number>0</number>
+   <number>1</number>
   </property>
   <widget class="QWidget" name="tabModel">
    <attribute name="title">
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>610</x>
-     <y>237</y>
+     <x>194</x>
+     <y>70</y>
     </hint>
     <hint type="destinationlabel">
-     <x>110</x>
-     <y>65</y>
+     <x>832</x>
+     <y>371</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>476</x>
-     <y>237</y>
+     <x>194</x>
+     <y>70</y>
     </hint>
     <hint type="destinationlabel">
-     <x>110</x>
-     <y>65</y>
+     <x>582</x>
+     <y>371</y>
     </hint>
    </hints>
   </connection>
    <slot>setEnabled(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>342</x>
-     <y>237</y>
+     <x>194</x>
+     <y>70</y>
     </hint>
     <hint type="destinationlabel">
-     <x>110</x>
-     <y>65</y>
+     <x>331</x>
+     <y>371</y>
     </hint>
    </hints>
   </connection>
   <connection>
    <sender>MeshCreation_RadioButton</sender>
    <signal>toggled(bool)</signal>
-   <receiver>Mesh_Creation</receiver>
-   <slot>setEnabled(bool)</slot>
+   <receiver>TabWidget</receiver>
+   <slot>onCreationMesh(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>100</x>
-     <y>65</y>
+     <x>228</x>
+     <y>270</y>
     </hint>
     <hint type="destinationlabel">
-     <x>780</x>
-     <y>235</y>
+     <x>610</x>
+     <y>425</y>
     </hint>
    </hints>
   </connection>
    <slot>onDriftModelSelected(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>647</x>
-     <y>465</y>
+     <x>314</x>
+     <y>75</y>
     </hint>
     <hint type="destinationlabel">
      <x>610</x>
    <slot>onSinglePhaseSelected(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>522</x>
-     <y>390</y>
+     <x>314</x>
+     <y>75</y>
     </hint>
     <hint type="destinationlabel">
      <x>610</x>
    <slot>onTransportSelected(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>522</x>
-     <y>294</y>
+     <x>314</x>
+     <y>75</y>
     </hint>
     <hint type="destinationlabel">
      <x>610</x>
    <slot>onDiffusionSelected(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>522</x>
-     <y>330</y>
+     <x>314</x>
+     <y>75</y>
     </hint>
     <hint type="destinationlabel">
      <x>610</x>
    <slot>onIsothermal2FluidSelected(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>522</x>
-     <y>486</y>
+     <x>314</x>
+     <y>75</y>
     </hint>
     <hint type="destinationlabel">
      <x>610</x>
    <slot>on5Eq2FluidSelected(bool)</slot>
    <hints>
     <hint type="sourcelabel">
-     <x>522</x>
-     <y>522</y>
+     <x>314</x>
+     <y>75</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>MeshInputFileName_RadioButton</sender>
+   <signal>toggled(bool)</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onMeshFile(bool)</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>183</x>
+     <y>153</y>
+    </hint>
+    <hint type="destinationlabel">
+     <x>610</x>
+     <y>425</y>
+    </hint>
+   </hints>
+  </connection>
+  <connection>
+   <sender>MeshInputFileName_toolButton</sender>
+   <signal>clicked()</signal>
+   <receiver>TabWidget</receiver>
+   <slot>onSelectMeshFile()</slot>
+   <hints>
+    <hint type="sourcelabel">
+     <x>601</x>
+     <y>153</y>
     </hint>
     <hint type="destinationlabel">
      <x>610</x>
   <slot>Dim_1(bool)</slot>
   <slot>Dim_2(bool)</slot>
   <slot>Dim_3(bool)</slot>
+  <slot>onMeshFile(bool)</slot>
+  <slot>onSelectMeshFile()</slot>
+  <slot>onCreationMesh(bool)</slot>
   <slot>onLaunchSimu()</slot>
  </slots>
 </ui>