]> SALOME platform Git repositories - modules/hydrosolver.git/commitdiff
Salome HOME
refs #1032: messages about state
authorasl <asl@opencascade.com>
Fri, 18 Nov 2016 05:40:52 +0000 (08:40 +0300)
committerasl <asl@opencascade.com>
Fri, 18 Nov 2016 05:40:52 +0000 (08:40 +0300)
src/salome_hydro/interpolz_gui.py

index 6da5813d1b53834d063fac8706df9818d6715c6d..926029a3db7a19b2255757c5a08a5d3ef0dfe25e 100644 (file)
@@ -76,7 +76,8 @@ class InterpolzDlg( QtGui.QDialog ):
         self.connect( self.btnMEDFile, QtCore.SIGNAL( "clicked()" ), self.onMEDFile )
         self.connect( self.CalcCase, QtCore.SIGNAL( "textChanged( const QString& )" ), self.onCalcCaseChanged )
         self.connect( self.MEDFile, QtCore.SIGNAL( "textChanged( const QString& )" ), self.onMEDChanged )
-        self.UndefZ.setText( "-9999" )
+        self.UndefZ.setRange( -100000, 100000 )
+        self.UndefZ.setValue( -9999 )
         self.InterpMethod.addItem( "Interpolation at the nearest point" )
         self.connect( self.ApplyClose, QtCore.SIGNAL( "clicked()" ), self.onApplyClose )
         self.connect( self.Apply, QtCore.SIGNAL( "clicked()" ), self.onApply )
@@ -134,10 +135,28 @@ class InterpolzDlg( QtGui.QDialog ):
         for i in range( 0, self.Groups.rowCount() ):
             med_group = str( self.Groups.item( i, 0 ).text() )
             hydro_reg = str( self.Groups.cellWidget( i, 1 ).currentText() )
-            med_groups_regions[med_group] = hydro_reg
-        z_undef = int(str(self.UndefZ.text()))
+            if len(med_group)>0 and len(hydro_reg)>0:
+                med_groups_regions[med_group] = hydro_reg
+        z_undef = self.UndefZ.value()
         interp = str(self.InterpMethod.currentText())
-        generate( path, calc_case, med_file, med_groups_regions, z_undef, interp )
+        
+        msg = ""
+        if len(path)==0:
+            msg = "Please input the output path"
+        elif len(calc_case)==0:
+            msg = "Please choose the calculation case"
+        elif len(med_file)==0:
+            msg = "Please choose the MED file"
+        elif len(med_groups_regions)==0:
+            msg = "Please fill groups table"
+        elif len(interp)==0:
+            msg = "Please choose interpolation method"
+        
+        if len(msg)==0:
+            generate( path, calc_case, med_file, med_groups_regions, z_undef, interp )
+            msg = "InterpolZ script is successfully generated"
+            
+        QtGui.QMessageBox.information( self, "", msg )
         
     def onClose( self ):
         self.close()