This diff has been collapsed as it changes many lines, (637 lines changed) Show them Hide them | |||
@@ -71,12 +71,12 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
71 | 71 | |
|
72 | 72 | self.setParam() |
|
73 | 73 | |
|
74 | #-----------------------------------NEW PROPERTIES-----------------------------------------------# | |
|
74 | #-----------------------------------NEW PROPERTIES------------------------------------------------# | |
|
75 | 75 | QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10)) |
|
76 | 76 | self.addprojectBtn.setToolTip('Add_New_Project') |
|
77 | 77 | self.addUnitProces.setToolTip('Add_New_Processing_Unit') |
|
78 | 78 | |
|
79 | #-----------------------------------NEW PROPERTIES-----------------------------------------------# | |
|
79 | #-----------------------------------NEW PROPERTIES------------------------------------------------# | |
|
80 | 80 | self.model = QtGui.QStandardItemModel() |
|
81 | 81 | self.treeView.setModel(self.model) |
|
82 | 82 | self.treeView.clicked.connect(self.clickFunctiontree) |
@@ -85,7 +85,7 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
85 | 85 | |
|
86 | 86 | #-----------------------------------BARRA DE MENU-------------------------------------------------# |
|
87 | 87 | |
|
88 |
#----------------------------------- MENU_P |
|
|
88 | #----------------------------------- MENU_PROJECT--------------------------------------------------# | |
|
89 | 89 | |
|
90 | 90 | @pyqtSignature("") |
|
91 | 91 | def on_menuFileAbrirObj_triggered(self): |
@@ -153,7 +153,7 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
153 | 153 | Llama al metodo close. |
|
154 | 154 | """ |
|
155 | 155 | print "Not implemented yet" |
|
156 | #-----------------------------------MENU_HELP--------------------------------------------------# | |
|
156 | #-----------------------------------MENU_HELP-------------------------------------------------------# | |
|
157 | 157 | @pyqtSignature("") |
|
158 | 158 | def on_menuHELPAboutObj_clicked(self): |
|
159 | 159 | """ |
@@ -204,7 +204,15 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
204 | 204 | """ |
|
205 | 205 | print "Not implemented yet" |
|
206 | 206 | |
|
207 | #-----------------------------------PUSHBUTTON_CREATE PROJECT-----------------------------------# | |
|
207 | @pyqtSignature("") | |
|
208 | def on_actSaveObj_triggered(self): | |
|
209 | """ | |
|
210 | METODO EJECUTADO CUANDO OCURRE EL EVENTO SAVE | |
|
211 | Llama al metodo SAVE. | |
|
212 | """ | |
|
213 | self.saveProject() | |
|
214 | ||
|
215 | #-----------------------------------PUSHBUTTON_CREATE PROJECT----------------------------------# | |
|
208 | 216 | |
|
209 | 217 | @pyqtSignature("") |
|
210 | 218 | def on_addprojectBtn_clicked(self): |
@@ -213,20 +221,71 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
213 | 221 | Llama al metodo addProject. |
|
214 | 222 | """ |
|
215 | 223 | self.addProject() |
|
224 | ||
|
225 | #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------# | |
|
226 | ||
|
227 | ||
|
228 | @pyqtSignature("int") | |
|
229 | def on_dataTypeCmbBox_activated(self,index): | |
|
230 | """ | |
|
231 | Metodo que identifica que tipo de dato se va a trabajar VOLTAGE O ESPECTRA | |
|
232 | """ | |
|
233 | self.dataFormatTxt.setReadOnly(True) | |
|
234 | if index==0: | |
|
235 | self.datatype='Voltage' | |
|
236 | elif index==1: | |
|
237 | self.datatype='Spectra' | |
|
238 | else : | |
|
239 | self.datatype='' | |
|
240 | self.dataFormatTxt.setReadOnly(False) | |
|
241 | self.dataFormatTxt.setText(self.datatype) | |
|
216 | 242 | |
|
217 | #-----------------------------------PUSHBUTTON_PROCESSING UNIT PROJECT--------------------------# | |
|
218 | 243 | @pyqtSignature("") |
|
219 |
def on_ |
|
|
244 | def on_dataPathBrowse_clicked(self): | |
|
220 | 245 | """ |
|
221 | CREAR PROCESSING UNI ,ANADE UNA UNIDAD DE PROCESAMIENTO, LLAMA AL MΓTODO addUP QUE CONTIENE LAS OPERACION DE CREACION DE UNIDADES DE PROCESAMIENTO | |
|
222 | Llama al metodo addUP. | |
|
246 | OBTENCION DE LA RUTA DE DATOS | |
|
223 | 247 | """ |
|
224 | # print "En este nivel se adiciona una rama de procesamiento, y se le concatena con el id" | |
|
225 | # self.procUnitConfObj0 = self.controllerObj.addProcUnit(datatype='Voltage', inputId=self.readUnitConfObj.getId()) | |
|
226 | self.addUP() | |
|
248 | self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
|
249 | self.dataPathTxt.setText(self.dataPath) | |
|
250 | self.statusDpath=self.existDir(self.dataPath) | |
|
251 | self.loadDays() | |
|
227 | 252 | |
|
253 | @pyqtSignature("int") | |
|
254 | def on_starDateCmbBox_activated(self, index): | |
|
255 | """ | |
|
256 | SELECCION DEL RANGO DE FECHAS -START DATE | |
|
257 | """ | |
|
258 | var_StopDay_index=self.endDateCmbBox.count() - self.endDateCmbBox.currentIndex() | |
|
259 | self.endDateCmbBox.clear() | |
|
260 | for i in self.variableList[index:]: | |
|
261 | self.endDateCmbBox.addItem(i) | |
|
262 | self.endDateCmbBox.setCurrentIndex(self.endDateCmbBox.count() - var_StopDay_index) | |
|
263 | self.getsubList() | |
|
264 | ||
|
265 | @pyqtSignature("int") | |
|
266 | def on_endDateCmbBox_activated(self, index): | |
|
267 | """ | |
|
268 | SELECCION DEL RANGO DE FECHAS-END DATE | |
|
269 | """ | |
|
270 | var_StartDay_index=self.starDateCmbBox.currentIndex() | |
|
271 | var_end_index = self.endDateCmbBox.count() - index | |
|
272 | self.starDateCmbBox.clear() | |
|
273 | for i in self.variableList[:len(self.variableList) - var_end_index + 1]: | |
|
274 | self.starDateCmbBox.addItem(i) | |
|
275 | self.starDateCmbBox.setCurrentIndex(var_StartDay_index) | |
|
276 | self.getsubList() #Se carga var_sublist[] con el rango de las fechas seleccionadas | |
|
277 | ||
|
278 | @pyqtSignature("int") | |
|
279 | def on_readModeCmBox_activated(self, p0): | |
|
280 | """ | |
|
281 | SELECCION DEL MODO DE LECTURA ON=1, OFF=0 | |
|
282 | """ | |
|
283 | if p0==0: | |
|
284 | self.online=0 | |
|
285 | elif p0==1: | |
|
286 | self.online=1 | |
|
228 | 287 | |
|
229 |
# |
|
|
288 | #---------------PUSHBUTTON_dataOkBtn_CONFIGURATION PROJECT--------------------------# | |
|
230 | 289 | |
|
231 | 290 | @pyqtSignature("") |
|
232 | 291 | def on_dataOkBtn_clicked(self): |
@@ -271,9 +330,227 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
271 | 330 | Summary="test de prueba") |
|
272 | 331 | self.model_2.arbol() |
|
273 | 332 | self.treeView_2.setModel(self.model_2) |
|
274 | self.treeView_2.expandAll() | |
|
333 | self.treeView_2.expandAll() | |
|
334 | ||
|
335 | ||
|
336 | #-----------------PUSHBUTTON_ADD_PROCESSING UNIT PROJECT------------------# | |
|
337 | @pyqtSignature("") | |
|
338 | def on_addUnitProces_clicked(self): | |
|
339 | """ | |
|
340 | CREAR PROCESSING UNI ,ANADE UNA UNIDAD DE PROCESAMIENTO, LLAMA AL MΓTODO addUP QUE CONTIENE LAS OPERACION DE CREACION DE UNIDADES DE PROCESAMIENTO | |
|
341 | Llama al metodo addUP. | |
|
342 | """ | |
|
343 | # print "En este nivel se adiciona una rama de procesamiento, y se le concatena con el id" | |
|
344 | # self.procUnitConfObj0 = self.controllerObj.addProcUnit(datatype='Voltage', inputId=self.readUnitConfObj.getId()) | |
|
345 | self.addUP() | |
|
346 | ||
|
347 | ||
|
348 | #-----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------# | |
|
349 | ||
|
350 | @pyqtSignature("int") | |
|
351 | def on_selecChannelopVolCEB_stateChanged(self, p0): | |
|
352 | """ | |
|
353 | Check Box habilita operaciones de SelecciΓ³n de Canales | |
|
354 | """ | |
|
355 | if p0==2: | |
|
356 | self.numberChannelopVol.setEnabled(True) | |
|
357 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
358 | opObj10=upProcessSelect.addOperation(name='selectChannels') | |
|
359 | print opObj10.id | |
|
360 | self.operObjList.append(opObj10) | |
|
361 | print " Ingresa seleccion de Canales" | |
|
362 | if p0==0: | |
|
363 | print " deshabilitado" | |
|
364 | ||
|
365 | @pyqtSignature("int") | |
|
366 | def on_selecHeighopVolCEB_stateChanged(self, p0): | |
|
367 | """ | |
|
368 | Check Box habilita operaciones de SelecciΓ³n de Alturas | |
|
369 | """ | |
|
370 | if p0==2: | |
|
371 | self.lineHeighProfileTxtopVol.setEnabled(True) | |
|
372 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
373 | opObj10=upProcessSelect.addOperation(name='selectHeights') | |
|
374 | print opObj10.id | |
|
375 | self.operObjList.append(opObj10) | |
|
376 | print " Select Type of Profile" | |
|
377 | if p0==0: | |
|
378 | print " deshabilitado" | |
|
379 | ||
|
380 | ||
|
381 | @pyqtSignature("int") | |
|
382 | def on_profileSelecopVolCEB_stateChanged(self, p0): | |
|
383 | """ | |
|
384 | Check Box habilita ingreso del rango de Perfiles | |
|
385 | """ | |
|
386 | if p0==2: | |
|
387 | self.lineProfileSelecopVolCEB.setEnabled(True) | |
|
388 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
389 | opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other') | |
|
390 | print opObj10.id | |
|
391 | self.operObjList.append(opObj10) | |
|
392 | print " Select Type of Profile" | |
|
393 | if p0==0: | |
|
394 | print " deshabilitado" | |
|
395 | ||
|
396 | ||
|
397 | @pyqtSignature("int") | |
|
398 | def on_coherentIntegrationCEB_stateChanged(self, p0): | |
|
399 | """ | |
|
400 | Check Box habilita ingresode del numero de Integraciones a realizar | |
|
401 | """ | |
|
402 | if p0==2: | |
|
403 | self.numberIntegration.setEnabled(True) | |
|
404 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
405 | opObj10=upProcessSelect.addOperation(name='CohInt', optype='other') | |
|
406 | print opObj10.id | |
|
407 | self.operObjList.append(opObj10) | |
|
408 | print "Choose number of Cohint" | |
|
409 | if p0==0: | |
|
410 | print " deshabilitado" | |
|
411 | self.numberChannelopVol.setEnabled(False) | |
|
412 | ||
|
413 | #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------# | |
|
414 | ||
|
415 | @pyqtSignature("") | |
|
416 | def on_dataopVolOkBtn_clicked(self): | |
|
417 | """ | |
|
418 | BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AΓADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO | |
|
419 | PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML | |
|
420 | """ | |
|
421 | if self.selecChannelopVolCEB.isChecked(): | |
|
422 | for i in self.operObjList: | |
|
423 | if i.name=='selectChannels': | |
|
424 | value=self.numberChannelopVol.text() | |
|
425 | i.addParameter(name='channelList', value=value, format='intlist') | |
|
426 | ||
|
427 | ||
|
428 | print "channel" | |
|
429 | ||
|
430 | if self.selecHeighopVolCEB.isChecked(): | |
|
431 | for i in self.operObjList: | |
|
432 | if i.name=='selectHeights' : | |
|
433 | value=self.lineHeighProfileTxtopVol.text() | |
|
434 | valueList=value.split(',') | |
|
435 | i.addParameter(name='minHei', value=valueList[0], format='float') | |
|
436 | i.addParameter(name='maxHei', value=valueList[1], format='float') | |
|
437 | ||
|
438 | print "height" | |
|
275 | 439 | |
|
276 | 440 | |
|
441 | if self.selecHeighopVolCEB.isChecked(): | |
|
442 | for i in self.operObjList: | |
|
443 | if i.name=='ProfileSelector' : | |
|
444 | value=self.lineProfileSelecopVolCEB.text() | |
|
445 | i.addParameter(name='ProfileSelector', value=value, format='intlist') | |
|
446 | ||
|
447 | ||
|
448 | ||
|
449 | if self.coherentIntegrationCEB.isChecked(): | |
|
450 | for i in self.operObjList: | |
|
451 | if i.name=='CohInt': | |
|
452 | value=self.numberIntegration.text() | |
|
453 | i.addParameter(name='n', value=value, format='int') | |
|
454 | ||
|
455 | ||
|
456 | #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------# | |
|
457 | ||
|
458 | @pyqtSignature("int") | |
|
459 | def on_nFFTPointOpSpecCEB_stateChanged(self, p0): | |
|
460 | """ | |
|
461 | Habilita la opcion de aΓ±adir el parΓ‘metro nFFTPoints a la Unidad de Procesamiento . | |
|
462 | """ | |
|
463 | if p0==2: | |
|
464 | self.valuenFFTPointOpSpec.setEnabled(True) | |
|
465 | print " nFFTPoint" | |
|
466 | if p0==0: | |
|
467 | print " deshabilitado" | |
|
468 | ||
|
469 | #------------------PUSH_BUTTON_SPECTRA_OK------------------------------------# | |
|
470 | ||
|
471 | @pyqtSignature("") | |
|
472 | def on_dataopSpecOkBtn_clicked(self): | |
|
473 | """ | |
|
474 | AΓ±ade al archivo de configuraciΓ³n el parΓ‘metros nFFTPoints a la UP. | |
|
475 | """ | |
|
476 | print "AΓ±adimos operaciones Spectra,nchannels,value,format" | |
|
477 | if self.nFFTPointOpSpecCEB.isChecked(): | |
|
478 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
479 | value=self.valuenFFTPointOpSpec.text() | |
|
480 | upProcessSelect.addParameter(name='nFFTPoints',value=value,format='int') | |
|
481 | #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------# | |
|
482 | ||
|
483 | @pyqtSignature("int") | |
|
484 | def on_SpectraPlotGraphCEB_stateChanged(self, p0): | |
|
485 | """ | |
|
486 | Habilita la opcion de Ploteo Spectra Plot | |
|
487 | """ | |
|
488 | if p0==2: | |
|
489 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
490 | opObj10=upProcessSelect.addOperation(name='SpectraPlot',optype='other') | |
|
491 | print opObj10.id | |
|
492 | self.operObjList.append(opObj10) | |
|
493 | ||
|
494 | if p0==0: | |
|
495 | print " deshabilitado" | |
|
496 | ||
|
497 | @pyqtSignature("int") | |
|
498 | def on_CrossSpectraPlotGraphceb_stateChanged(self, p0): | |
|
499 | """ | |
|
500 | Habilita la opciΓ³n de Ploteo CrossSpectra | |
|
501 | """ | |
|
502 | if p0==2: | |
|
503 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
504 | opObj10=upProcessSelect.addOperation(name='CrossSpectraPlot',optype='other') | |
|
505 | print opObj10.id | |
|
506 | self.operObjList.append(opObj10) | |
|
507 | if p0==0: | |
|
508 | print " deshabilitado" | |
|
509 | ||
|
510 | @pyqtSignature("int") | |
|
511 | def on_RTIPlotGraphCEB_stateChanged(self, p0): | |
|
512 | """ | |
|
513 | Habilita la opciΓ³n de Plote RTIPlot | |
|
514 | """ | |
|
515 | if p0==2: | |
|
516 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
517 | opObj10=upProcessSelect.addOperation(name='RTIPlot',optype='other') | |
|
518 | print opObj10.id | |
|
519 | self.operObjList.append(opObj10) | |
|
520 | if p0==0: | |
|
521 | print " deshabilitado" | |
|
522 | ||
|
523 | #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------# | |
|
524 | @pyqtSignature("") | |
|
525 | def on_dataGraphSpecOkBtn_clicked(self): | |
|
526 | """ | |
|
527 | HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES. | |
|
528 | """ | |
|
529 | print "Graficar Spec op" | |
|
530 | if self.SpectraPlotGraphCEB.isChecked(): | |
|
531 | for i in self.operObjList: | |
|
532 | if i.name=='SpectraPlot': | |
|
533 | i.addParameter(name='idfigure', value='1', format='int') | |
|
534 | i.addParameter(name='wintitle', value='SpectraPlot0', format='str') | |
|
535 | i.addParameter(name='zmin', value='40', format='int') | |
|
536 | i.addParameter(name='zmax', value='90', format='int') | |
|
537 | i.addParameter(name='showprofile', value='1', format='int') | |
|
538 | ||
|
539 | if self.CrossSpectraPlotGraphceb.isChecked(): | |
|
540 | for i in self.operObjList: | |
|
541 | if i.name=='CrossSpectraPlot' : | |
|
542 | i.addParameter(name='idfigure', value='2', format='int') | |
|
543 | i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str') | |
|
544 | i.addParameter(name='zmin', value='40', format='int') | |
|
545 | i.addParameter(name='zmax', value='90', format='int') | |
|
546 | ||
|
547 | if self.RTIPlotGraphCEB.isChecked(): | |
|
548 | for i in self.operObjList: | |
|
549 | if i.name=='RTIPlot': | |
|
550 | i.addParameter(name='n', value='2', format='int') | |
|
551 | i.addParameter(name='overlapping', value='1', format='int') | |
|
552 | ||
|
553 | ||
|
277 | 554 | def getNumberofProject(self): |
|
278 | 555 | # for i in self.proObjList: |
|
279 | 556 | # print i |
@@ -344,21 +621,12 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
344 | 621 | print "Porfavor ingrese los parΓ‘metros de configuracion del Proyecto" |
|
345 | 622 | |
|
346 | 623 | def loadProjects(self): |
|
624 | ||
|
347 | 625 | self.proConfCmbBox.clear() |
|
348 | 626 | for i in self.proObjList: |
|
349 | 627 | self.proConfCmbBox.addItem("Project"+str(i.id)) |
|
350 | 628 | |
|
351 | @pyqtSignature("int") | |
|
352 | def on_dataTypeCmbBox_activated(self,index): | |
|
353 | self.dataFormatTxt.setReadOnly(True) | |
|
354 | if index==0: | |
|
355 | self.datatype='Voltage' | |
|
356 | elif index==1: | |
|
357 | self.datatype='Spectra' | |
|
358 | else : | |
|
359 | self.datatype='' | |
|
360 | self.dataFormatTxt.setReadOnly(False) | |
|
361 | self.dataFormatTxt.setText(self.datatype) | |
|
629 | ||
|
362 | 630 | |
|
363 | 631 | def existDir(self, var_dir): |
|
364 | 632 | """ |
@@ -393,7 +661,7 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
393 | 661 | Dirlist[a]=fname+"/"+str(fechaList[0])+"/"+str(fechaList[1]) |
|
394 | 662 | #+"-"+ fechaList[0]+"-"+fechaList[1] |
|
395 | 663 | |
|
396 | #---------------AQUI TIENE QUE SER MODIFICADO--------# | |
|
664 | #---------------AQUI TIENE QUE SER MODIFICADO--------# | |
|
397 | 665 | |
|
398 | 666 | #Se cargan las listas para seleccionar StartDay y StopDay (QComboBox) |
|
399 | 667 | for i in range(0, (len(Dirlist))): |
@@ -404,63 +672,16 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
404 | 672 | self.endDateCmbBox.addItem(i) |
|
405 | 673 | self.endDateCmbBox.setCurrentIndex(self.starDateCmbBox.count()-1) |
|
406 | 674 | |
|
407 | self.getsubList() | |
|
408 | self.dataOkBtn.setEnabled(True) | |
|
409 | ||
|
410 | def getsubList(self): | |
|
411 | """ | |
|
412 | OBTIENE EL RANDO DE LAS FECHAS SELECCIONADAS | |
|
413 | """ | |
|
414 | self.subList=[] | |
|
415 | for i in self.variableList[self.starDateCmbBox.currentIndex():self.starDateCmbBox.currentIndex() + self.endDateCmbBox.currentIndex()+1]: | |
|
416 | self.subList.append(i) | |
|
417 | ||
|
418 | @pyqtSignature("") | |
|
419 | def on_dataPathBrowse_clicked(self): | |
|
420 | """ | |
|
421 | OBTENCION DE LA RUTA DE DATOS | |
|
422 | """ | |
|
423 | self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
|
424 | self.dataPathTxt.setText(self.dataPath) | |
|
425 | self.statusDpath=self.existDir(self.dataPath) | |
|
426 | self.loadDays() | |
|
427 | ||
|
428 | @pyqtSignature("int") | |
|
429 | def on_starDateCmbBox_activated(self, index): | |
|
430 | """ | |
|
431 | SELECCION DEL RANGO DE FECHAS -STAR DATE | |
|
432 | """ | |
|
433 | var_StopDay_index=self.endDateCmbBox.count() - self.endDateCmbBox.currentIndex() | |
|
434 | self.endDateCmbBox.clear() | |
|
435 | for i in self.variableList[index:]: | |
|
436 | self.endDateCmbBox.addItem(i) | |
|
437 | self.endDateCmbBox.setCurrentIndex(self.endDateCmbBox.count() - var_StopDay_index) | |
|
438 | self.getsubList() | |
|
439 | ||
|
440 | @pyqtSignature("int") | |
|
441 | def on_endDateCmbBox_activated(self, index): | |
|
442 | """ | |
|
443 | SELECCION DEL RANGO DE FECHAS-END DATE | |
|
444 | """ | |
|
445 | var_StartDay_index=self.starDateCmbBox.currentIndex() | |
|
446 | var_end_index = self.endDateCmbBox.count() - index | |
|
447 | self.starDateCmbBox.clear() | |
|
448 | for i in self.variableList[:len(self.variableList) - var_end_index + 1]: | |
|
449 | self.starDateCmbBox.addItem(i) | |
|
450 | self.starDateCmbBox.setCurrentIndex(var_StartDay_index) | |
|
451 | self.getsubList() #Se carga var_sublist[] con el rango de las fechas seleccionadas | |
|
452 | ||
|
453 | @pyqtSignature("int") | |
|
454 | def on_readModeCmBox_activated(self, p0): | |
|
675 | self.getsubList() | |
|
676 | self.dataOkBtn.setEnabled(True) | |
|
677 | ||
|
678 | def getsubList(self): | |
|
455 | 679 | """ |
|
456 | Slot documentation goes here. | |
|
680 | OBTIENE EL RANDO DE LAS FECHAS SELECCIONADAS | |
|
457 | 681 | """ |
|
458 | if p0==0: | |
|
459 | self.online=0 | |
|
460 | elif p0==1: | |
|
461 | self.online=1 | |
|
462 | ||
|
463 | ||
|
682 | self.subList=[] | |
|
683 | for i in self.variableList[self.starDateCmbBox.currentIndex():self.starDateCmbBox.currentIndex() + self.endDateCmbBox.currentIndex()+1]: | |
|
684 | self.subList.append(i) | |
|
464 | 685 | |
|
465 | 686 | def addUP(self): |
|
466 | 687 | |
@@ -522,71 +743,7 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
522 | 743 | |
|
523 | 744 | self.resetopVolt() |
|
524 | 745 | self.resetopSpec() |
|
525 | ||
|
526 | ||
|
527 | @pyqtSignature("int") | |
|
528 | def on_selecChannelopVolCEB_stateChanged(self, p0): | |
|
529 | """ | |
|
530 | Slot documentation goes here. | |
|
531 | """ | |
|
532 | if p0==2: | |
|
533 | self.numberChannelopVol.setEnabled(True) | |
|
534 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
535 | opObj10=upProcessSelect.addOperation(name='selectChannels') | |
|
536 | print opObj10.id | |
|
537 | self.operObjList.append(opObj10) | |
|
538 | print " Ingresa seleccion de Canales" | |
|
539 | if p0==0: | |
|
540 | print " deshabilitado" | |
|
541 | ||
|
542 | @pyqtSignature("int") | |
|
543 | def on_selecHeighopVolCEB_stateChanged(self, p0): | |
|
544 | """ | |
|
545 | Slot documentation goes here. | |
|
546 | """ | |
|
547 | if p0==2: | |
|
548 | self.lineHeighProfileTxtopVol.setEnabled(True) | |
|
549 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
550 | opObj10=upProcessSelect.addOperation(name='selectHeights') | |
|
551 | print opObj10.id | |
|
552 | self.operObjList.append(opObj10) | |
|
553 | print " Select Type of Profile" | |
|
554 | if p0==0: | |
|
555 | print " deshabilitado" | |
|
556 | ||
|
557 | 746 | |
|
558 | @pyqtSignature("int") | |
|
559 | def on_profileSelecopVolCEB_stateChanged(self, p0): | |
|
560 | """ | |
|
561 | Slot documentation goes here. | |
|
562 | """ | |
|
563 | if p0==2: | |
|
564 | self.lineProfileSelecopVolCEB.setEnabled(True) | |
|
565 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
566 | opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other') | |
|
567 | print opObj10.id | |
|
568 | self.operObjList.append(opObj10) | |
|
569 | print " Select Type of Profile" | |
|
570 | if p0==0: | |
|
571 | print " deshabilitado" | |
|
572 | ||
|
573 | ||
|
574 | @pyqtSignature("int") | |
|
575 | def on_coherentIntegrationCEB_stateChanged(self, p0): | |
|
576 | """ | |
|
577 | Slot documentation goes here. | |
|
578 | """ | |
|
579 | if p0==2: | |
|
580 | self.numberIntegration.setEnabled(True) | |
|
581 | upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())] | |
|
582 | opObj10=upProcessSelect.addOperation(name='CohInt', optype='other') | |
|
583 | print opObj10.id | |
|
584 | self.operObjList.append(opObj10) | |
|
585 | print "Choose number of Cohint" | |
|
586 | if p0==0: | |
|
587 | print " deshabilitado" | |
|
588 | self.numberChannelopVol.setEnabled(False) | |
|
589 | ||
|
590 | 747 | def resetopVolt(self): |
|
591 | 748 | self.selecChannelopVolCEB.setChecked(False) |
|
592 | 749 | self.selecHeighopVolCEB.setChecked(False) |
@@ -598,159 +755,18 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
598 | 755 | self.numberChannelopVol.clear() |
|
599 | 756 | self.numberIntegration.clear() |
|
600 | 757 | |
|
601 | ||
|
602 | @pyqtSignature("") | |
|
603 | def on_dataopVolOkBtn_clicked(self): | |
|
604 | """ | |
|
605 | Slot documentation goes here. | |
|
606 | """ | |
|
607 | if self.selecChannelopVolCEB.isChecked(): | |
|
608 | for i in self.operObjList: | |
|
609 | if i.name=='selectChannels': | |
|
610 | value=self.numberChannelopVol.text() | |
|
611 | i.addParameter(name='channelList', value=value, format='intlist') | |
|
612 | ||
|
613 | ||
|
614 | print "channel" | |
|
615 | ||
|
616 | if self.selecHeighopVolCEB.isChecked(): | |
|
617 | for i in self.operObjList: | |
|
618 | if i.name=='selectHeights' : | |
|
619 | value=self.lineHeighProfileTxtopVol.text() | |
|
620 | valueList=value.split(',') | |
|
621 | i.addParameter(name='minHei', value=valueList[0], format='float') | |
|
622 | i.addParameter(name='maxHei', value=valueList[1], format='float') | |
|
623 | ||
|
624 | print "height" | |
|
625 | ||
|
626 | ||
|
627 | if self.selecHeighopVolCEB.isChecked(): | |
|
628 | for i in self.operObjList: | |
|
629 | if i.name=='ProfileSelector' : | |
|
630 | value=self.lineProfileSelecopVolCEB.text() | |
|
631 | i.addParameter(name='ProfileSelector', value=value, format='intlist') | |
|
632 | ||
|
633 | ||
|
634 | ||
|
635 | if self.coherentIntegrationCEB.isChecked(): | |
|
636 | for i in self.operObjList: | |
|
637 | if i.name=='CohInt': | |
|
638 | value=self.numberIntegration.text() | |
|
639 | i.addParameter(name='n', value=value, format='int') | |
|
640 | ||
|
641 | ||
|
642 | @pyqtSignature("int") | |
|
643 | def on_nFFTPointOpSpecCEB_stateChanged(self, p0): | |
|
644 | """ | |
|
645 | Slot documentation goes here. | |
|
646 | """ | |
|
647 | if p0==2: | |
|
648 | self.valuenFFTPointOpSpec.setEnabled(True) | |
|
649 | print " nFFTPoint" | |
|
650 | if p0==0: | |
|
651 | print " deshabilitado" | |
|
652 | ||
|
653 | ||
|
758 | ||
|
654 | 759 | def resetopSpec(self): |
|
655 | 760 | self.nFFTPointOpSpecCEB.setChecked(False) |
|
656 | 761 | |
|
657 | 762 | self.valuenFFTPointOpSpec.clear() |
|
658 | ||
|
659 | ||
|
660 | @pyqtSignature("") | |
|
661 | def on_dataopSpecOkBtn_clicked(self): | |
|
662 | """ | |
|
663 | Slot documentation goes here. | |
|
664 | """ | |
|
665 | print "AΓ±adimos operaciones Spectra,nchannels,value,format" | |
|
666 | if self.nFFTPointOpSpecCEB.isChecked(): | |
|
667 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
668 | value=self.valuenFFTPointOpSpec.text() | |
|
669 | upProcessSelect.addParameter(name='nFFTPoints',value=value,format='int') | |
|
670 | ||
|
671 | @pyqtSignature("int") | |
|
672 | def on_SpectraPlotGraphCEB_stateChanged(self, p0): | |
|
673 | """ | |
|
674 | Slot documentation goes here. | |
|
675 | """ | |
|
676 | if p0==2: | |
|
677 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
678 | opObj10=upProcessSelect.addOperation(name='SpectraPlot',optype='other') | |
|
679 | print opObj10.id | |
|
680 | self.operObjList.append(opObj10) | |
|
681 | ||
|
682 | if p0==0: | |
|
683 | print " deshabilitado" | |
|
684 | ||
|
685 | @pyqtSignature("int") | |
|
686 | def on_CrossSpectraPlotGraphceb_stateChanged(self, p0): | |
|
687 | """ | |
|
688 | Slot documentation goes here. | |
|
689 | """ | |
|
690 | if p0==2: | |
|
691 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
692 | opObj10=upProcessSelect.addOperation(name='CrossSpectraPlot',optype='other') | |
|
693 | print opObj10.id | |
|
694 | self.operObjList.append(opObj10) | |
|
695 | if p0==0: | |
|
696 | print " deshabilitado" | |
|
697 | ||
|
698 | @pyqtSignature("int") | |
|
699 | def on_RTIPlotGraphCEB_stateChanged(self, p0): | |
|
700 | """ | |
|
701 | Slot documentation goes here. | |
|
702 | """ | |
|
703 | if p0==2: | |
|
704 | upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())] | |
|
705 | opObj10=upProcessSelect.addOperation(name='RTIPlot',optype='other') | |
|
706 | print opObj10.id | |
|
707 | self.operObjList.append(opObj10) | |
|
708 | if p0==0: | |
|
709 | print " deshabilitado" | |
|
710 | ||
|
711 | 763 | |
|
712 | 764 | def resetgraphSpec(self): |
|
713 | 765 | self.SpectraPlotGraphCEB.setChecked(False) |
|
714 | 766 | self.CrossSpectraPlotGraphceb.setChecked(False) |
|
715 | 767 | self.RTIPlotGraphCEB.setChecked(False) |
|
716 | 768 | |
|
717 | @pyqtSignature("") | |
|
718 | def on_dataGraphSpecOkBtn_clicked(self): | |
|
719 | """ | |
|
720 | Slot documentation goes here. | |
|
721 | """ | |
|
722 | print "Graficar Spec op" | |
|
723 | if self.SpectraPlotGraphCEB.isChecked(): | |
|
724 | for i in self.operObjList: | |
|
725 | if i.name=='SpectraPlot': | |
|
726 | i.addParameter(name='idfigure', value='1', format='int') | |
|
727 | i.addParameter(name='wintitle', value='SpectraPlot0', format='str') | |
|
728 | i.addParameter(name='zmin', value='40', format='int') | |
|
729 | i.addParameter(name='zmax', value='90', format='int') | |
|
730 | i.addParameter(name='showprofile', value='1', format='int') | |
|
731 | ||
|
732 | if self.CrossSpectraPlotGraphceb.isChecked(): | |
|
733 | for i in self.operObjList: | |
|
734 | if i.name=='CrossSpectraPlot' : | |
|
735 | i.addParameter(name='idfigure', value='2', format='int') | |
|
736 | i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str') | |
|
737 | i.addParameter(name='zmin', value='40', format='int') | |
|
738 | i.addParameter(name='zmax', value='90', format='int') | |
|
739 | ||
|
740 | if self.RTIPlotGraphCEB.isChecked(): | |
|
741 | for i in self.operObjList: | |
|
742 | if i.name=='RTIPlot': | |
|
743 | i.addParameter(name='n', value='2', format='int') | |
|
744 | i.addParameter(name='overlapping', value='1', format='int') | |
|
745 | ||
|
746 | @pyqtSignature("") | |
|
747 | def on_actionguardarObj_triggered(self): | |
|
748 | """ | |
|
749 | GUARDAR EL ARCHIVO DE CONFIGURACION XML | |
|
750 | """ | |
|
751 | self.saveProject() | |
|
752 | ||
|
753 | ||
|
769 | ||
|
754 | 770 | def saveProject(self): |
|
755 | 771 | if self.idp==1: |
|
756 | 772 | self.valuep=1 |
@@ -760,6 +776,9 class MainWindow(QMainWindow, Ui_MainWindow): | |||
|
760 | 776 | self.controllerObj=self.proObjList[int(self.valuep)-1] |
|
761 | 777 | self.controllerObj.writeXml(filename) |
|
762 | 778 | |
|
779 | ||
|
780 | ||
|
781 | ||
|
763 | 782 | |
|
764 | 783 | class Window(QMainWindow, Ui_window): |
|
765 | 784 | """ |
@@ -815,6 +834,9 class Window(QMainWindow, Ui_window): | |||
|
815 | 834 | event.accept() |
|
816 | 835 | |
|
817 | 836 | |
|
837 | ||
|
838 | #--------------------------------------VENTANA DE CONFIGURACION DE LA UP-----------------------# | |
|
839 | ||
|
818 | 840 | class UnitProcess(QMainWindow, Ui_UnitProcess): |
|
819 | 841 | """ |
|
820 | 842 | Class documentation goes here. |
@@ -829,33 +851,7 class UnitProcess(QMainWindow, Ui_UnitProcess): | |||
|
829 | 851 | self.getFromWindow=None |
|
830 | 852 | self.getfromWindowList=[] |
|
831 | 853 | |
|
832 |
self.listUP=None |
|
|
833 | ||
|
834 | def loadTotalList(self): | |
|
835 | self.comboInputBox.clear() | |
|
836 | for i in self.getfromWindowList: | |
|
837 | name=i.getElementName() | |
|
838 | id= i.id | |
|
839 | if i.getElementName()=='ProcUnit': | |
|
840 | id=int(i.id)-1 | |
|
841 | self.comboInputBox.addItem(str(name)+str(id)) | |
|
842 | ||
|
843 | @pyqtSignature("QString") | |
|
844 | def on_comboInputBox_activated(self, p0): | |
|
845 | """ | |
|
846 | Slot documentation goes here. | |
|
847 | """ | |
|
848 | ||
|
849 | # TODO: not implemented yet | |
|
850 | #raise NotImplementedError | |
|
851 | ||
|
852 | @pyqtSignature("QString") | |
|
853 | def on_comboTypeBox_activated(self, p0): | |
|
854 | """ | |
|
855 | Slot documentation goes here. | |
|
856 | """ | |
|
857 | # TODO: not implemented yet | |
|
858 | #raise NotImplementedError | |
|
854 | self.listUP=None | |
|
859 | 855 | |
|
860 | 856 | @pyqtSignature("") |
|
861 | 857 | def on_unitPokbut_clicked(self): |
@@ -880,7 +876,16 class UnitProcess(QMainWindow, Ui_UnitProcess): | |||
|
880 | 876 | """ |
|
881 | 877 | # TODO: not implemented yet |
|
882 | 878 | #raise NotImplementedError |
|
883 | self.hide() | |
|
879 | self.hide() | |
|
880 | ||
|
881 | def loadTotalList(self): | |
|
882 | self.comboInputBox.clear() | |
|
883 | for i in self.getfromWindowList: | |
|
884 | name=i.getElementName() | |
|
885 | id= i.id | |
|
886 | if i.getElementName()=='ProcUnit': | |
|
887 | id=int(i.id)-1 | |
|
888 | self.comboInputBox.addItem(str(name)+str(id)) | |
|
884 | 889 | |
|
885 | 890 | def almacena(self): |
|
886 | 891 | self.getFromWindow=self.getfromWindowList[int(self.comboInputBox.currentIndex())] |
General Comments 0
You need to be logged in to leave comments.
Login now