##// END OF EJS Templates
GUI: Shows message when output path has not been defined.
Miguel Valdez -
r801:b5ee42833830
parent child
Show More
@@ -4,4 +4,4 Created on Feb 7, 2012
4 4 @author $Author$
5 5 @version $Id$
6 6 '''
7 __version__ = "2.2.3.2" No newline at end of file
7 __version__ = "2.2.3.3" No newline at end of file
@@ -5327,23 +5327,18 class BasicWindow(QMainWindow, Ui_BasicWindow):
5327 5327 output_path = str(self.specHeisOutputPath.text())
5328 5328 blocksperfile = str(self.specHeisOutputblocksperfile.text())
5329 5329 metadata_file = str(self.specHeisOutputMetada.text())
5330
5331 if output_path == '':
5332 outputstr = 'Outputpath is empty'
5333 self.console.append(outputstr)
5334 parms_ok = False
5330
5331 message = ''
5335 5332
5336 5333 if not os.path.isdir(output_path):
5337 outputstr = 'OutputPath:%s does not exist' % output_path
5338 self.console.append(outputstr)
5334 message += 'OutputPath:%s does not exist\n' % output_path
5339 5335 parms_ok = False
5340 5336
5341 5337 try:
5342 5338 profilesperblock = int(profilesperblock)
5343 5339 except:
5344 5340 if datatype == "Voltage":
5345 outputstr = 'Profilesperblock: %s, this must be a integer number' % str(self.volOutputprofilesperblock.text())
5346 self.console.append(outputstr)
5341 message += 'Profilesperblock: %s, this must be a integer number\n' % str(self.volOutputprofilesperblock.text())
5347 5342 parms_ok = False
5348 5343 profilesperblock = None
5349 5344
@@ -5351,23 +5346,24 class BasicWindow(QMainWindow, Ui_BasicWindow):
5351 5346 blocksperfile = int(blocksperfile)
5352 5347 except:
5353 5348 if datatype == "Voltage":
5354 outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.volOutputblocksperfile.text())
5349 message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.volOutputblocksperfile.text())
5355 5350 elif datatype == "Spectra":
5356 outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specOutputblocksperfile.text())
5351 message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.specOutputblocksperfile.text())
5357 5352 elif datatype == "SpectraHeis":
5358 outputstr = 'Blocksperfile: %s, this must be a integer number' % str(self.specHeisOutputblocksperfile.text())
5359
5360 self.console.append(outputstr)
5353 message += 'Blocksperfile: %s, this must be a integer number\n' % str(self.specHeisOutputblocksperfile.text())
5354
5361 5355 parms_ok = False
5362 5356 blocksperfile = None
5363 5357
5364 5358 if datatype == "SpectraHeis":
5365 5359 if metadata_file != '':
5366 5360 if not os.path.isfile(metadata_file):
5367 outputstr = 'Metadata file %s does not exist' % metadata_file
5368 self.console.append(outputstr)
5361 message += 'Metadata file %s does not exist\n' % metadata_file
5369 5362 parms_ok = False
5370
5363
5364 if str.strip(output_path) != '':
5365 self.console.append(message)
5366
5371 5367 if datatype == "Voltage":
5372 5368 return parms_ok, output_path, blocksperfile, profilesperblock
5373 5369
General Comments 0
You need to be logged in to leave comments. Login now