]> SALOME platform Git repositories - modules/hydrosolver.git/commitdiff
Salome HOME
Lot 6: GUI for interpolz
authorasl <asl@opencascade.com>
Wed, 12 Oct 2016 05:36:24 +0000 (08:36 +0300)
committerasl <asl@opencascade.com>
Wed, 12 Oct 2016 05:36:24 +0000 (08:36 +0300)
src/salome_hydro/interpolz.ui [new file with mode: 0644]
src/salome_hydro/interpolz_gui.py [new file with mode: 0644]

diff --git a/src/salome_hydro/interpolz.ui b/src/salome_hydro/interpolz.ui
new file mode 100644 (file)
index 0000000..f3b1c17
--- /dev/null
@@ -0,0 +1,177 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>Dialog</class>
+ <widget class="QDialog" name="Dialog">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>656</width>
+    <height>500</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string>Dialog</string>
+  </property>
+  <layout class="QGridLayout" name="gridLayout_2">
+   <item row="0" column="0">
+    <layout class="QGridLayout" name="gridLayout">
+     <item row="0" column="1">
+      <widget class="QLabel" name="lblCalcCase">
+       <property name="text">
+        <string>Calculation case:</string>
+       </property>
+      </widget>
+     </item>
+     <item row="0" column="2">
+      <widget class="QLineEdit" name="CalcCase"/>
+     </item>
+    </layout>
+   </item>
+   <item row="1" column="0">
+    <widget class="QGroupBox" name="grpPaths">
+     <property name="title">
+      <string>Paths</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_4">
+      <item row="0" column="0">
+       <layout class="QGridLayout" name="gridLayout_3">
+        <item row="0" column="0">
+         <widget class="QLabel" name="lblOutputPath">
+          <property name="text">
+           <string>Output path:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="2">
+         <widget class="QLineEdit" name="OutputPath"/>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="lblMEDFile">
+          <property name="text">
+           <string>MED file:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="2">
+         <widget class="QLineEdit" name="MEDFile"/>
+        </item>
+        <item row="0" column="3">
+         <widget class="QToolButton" name="btnOutputPath">
+          <property name="text">
+           <string>...</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="3">
+         <widget class="QToolButton" name="btnMEDFile">
+          <property name="text">
+           <string>...</string>
+          </property>
+         </widget>
+        </item>
+       </layout>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="2" column="0">
+    <widget class="QGroupBox" name="grpParams">
+     <property name="title">
+      <string>Parameters</string>
+     </property>
+     <layout class="QGridLayout" name="gridLayout_6">
+      <item row="0" column="0">
+       <layout class="QGridLayout" name="gridLayout_5">
+        <item row="0" column="0">
+         <widget class="QLabel" name="lblUndefZ">
+          <property name="text">
+           <string>Undefined Z:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="0" column="1">
+         <widget class="QLineEdit" name="UndefZ"/>
+        </item>
+        <item row="1" column="0">
+         <widget class="QLabel" name="lblInterpMethod">
+          <property name="text">
+           <string>Interpolation method:</string>
+          </property>
+         </widget>
+        </item>
+        <item row="1" column="1">
+         <widget class="QComboBox" name="InterpMethod"/>
+        </item>
+       </layout>
+      </item>
+      <item row="1" column="0">
+       <widget class="QTableWidget" name="Groups"/>
+      </item>
+     </layout>
+    </widget>
+   </item>
+   <item row="3" column="0">
+    <widget class="QFrame" name="frame">
+     <property name="frameShape">
+      <enum>QFrame::StyledPanel</enum>
+     </property>
+     <property name="frameShadow">
+      <enum>QFrame::Raised</enum>
+     </property>
+     <layout class="QHBoxLayout" name="horizontalLayout_2">
+      <property name="spacing">
+       <number>0</number>
+      </property>
+      <property name="margin">
+       <number>0</number>
+      </property>
+      <item>
+       <widget class="QPushButton" name="ApplyClose">
+        <property name="text">
+         <string>Apply and Close</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Apply">
+        <property name="text">
+         <string>Apply</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Close">
+        <property name="text">
+         <string>Close</string>
+        </property>
+       </widget>
+      </item>
+      <item>
+       <spacer name="horizontalSpacer">
+        <property name="orientation">
+         <enum>Qt::Horizontal</enum>
+        </property>
+        <property name="sizeHint" stdset="0">
+         <size>
+          <width>40</width>
+          <height>20</height>
+         </size>
+        </property>
+       </spacer>
+      </item>
+      <item>
+       <widget class="QPushButton" name="Help">
+        <property name="text">
+         <string>Help</string>
+        </property>
+       </widget>
+      </item>
+     </layout>
+    </widget>
+   </item>
+  </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/src/salome_hydro/interpolz_gui.py b/src/salome_hydro/interpolz_gui.py
new file mode 100644 (file)
index 0000000..7e507f0
--- /dev/null
@@ -0,0 +1,23 @@
+
+import sys, os
+from PyQt4 import QtCore, QtGui
+
+class InterpolzDlg( QtGui.QDialog ):
+
+    def __init__(self, parent = None):
+        QtGui.QDialog.__init__( self, parent )
+               
+
+#app = QtGui.QApplication( sys.argv )
+#dlg = InterpolzDlg()
+#dlg.show()
+#app.exec_()
+
+sys.path.append(os.path.join(os.environ['MEDFILE_ROOT_DIR'], 'lib\python2.7\site-packages\med'))
+import medfile
+import medmesh
+import medenum
+
+file_path = "c:/hydro/channel.med"
+f = medfile.MEDfileOpen(str(file_path), medenum.MED_ACC_RDEXT)
+print medmesh.MEDmeshInfo(fid, 1)