# -*- coding: utf-8 -*-
from PyQt5 import QtWidgets, QtCore
+from PyQt5.QtWidgets import QFileDialog
from PyQt5.uic import loadUi
from slutils import completeResPath
print("SinglePhaseSelected")
self.removeTab(2)
self.insertTab(2,self.models[0],"Physical model")
-
-
+
def onDriftModelSelected(self,isChecked):
if(isChecked):
print("DriftModelSelected")
print("TransportSelected")
self.removeTab(2)
self.insertTab(2,self.models[5],"Physical model")
-
-
+
def onIsothermal2FluidSelected(self,isChecked):
if(isChecked):
print("Isothermal2FluidSelected")
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])
<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>