##// END OF EJS Templates
Last Update
Alexander Valdez -
r330:d095dce0c07d
parent child
Show More
This diff has been collapsed as it changes many lines, (687 lines changed) Show them Hide them
@@ -60,7 +60,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
60 60 self.__projObjDict = {}
61 61 self.__arbolDict = {}
62 62 self.__upObjDict = {}
63
63 self.__opObjDict= {}
64 64 self.indexclick=None
65 65
66 66 self.online=0
@@ -97,24 +97,49 class BasicWindow(QMainWindow, Ui_BasicWindow):
97 97
98 98 self.setParam()
99 99
100 #-----------------------------------NEW PROPERTIES------------------------------------------------#
100 #------------------VistadelNombreCompletousandoelpunteroSobrelosbotones---------------------------#
101 101 QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
102 102 self.addprojectBtn.setToolTip('Add_New_Project')
103 103 self.addUnitProces.setToolTip('Add_New_Processing_Unit')
104 104
105 #-----------------------------------NEW PROPERTIES------------------------------------------------#
105 #------------------------ManejodeEventosconelmouse------------------------------------------------#
106 106 self.model = QtGui.QStandardItemModel()
107 107 self.treeView.setModel(self.model)
108 108 self.treeView.clicked.connect(self.clickFunctiontree)
109 self.treeView.doubleClicked.connect(self.doubleclickFunctiontree)
109 110 self.treeView.expandAll()
110 #self.treeView.clicked.connect(self.treefunction1)
111
112 111
112 #self.treeView.setReadOnly(True)
113 self.treeView.setContextMenuPolicy(QtCore.Qt.CustomContextMenu)
114 self.treeView.customContextMenuRequested.connect(self.popup)
115 #self.treeView.clicked.connect(self.treefunction1)
113 116
114 117
115 118
116 119 #-----------------------------------BARRA DE MENU-------------------------------------------------#
117 120
121 def popup(self, pos):
122 # for i in self.treeView.selectionModel().selection().indexes():
123 # print i.row(), i.column()
124 menu = QtGui.QMenu()
125 #menu.centralWidget.setObjectName(_fromUtf8("centralWidget"))
126 quitAction0 = menu.addAction("Add Branch")
127 quitAction1 = menu.addAction("Delete Branch")
128 quitAction2 = menu.addAction("Exit")
129 #quitAction2 = menu.addAction("Exit")
130 print "pos:", pos
131 action = menu.exec_(self.mapToGlobal(pos))
132 if action == quitAction0:
133 self.addUP()
134
135 if action == quitAction1:
136 for i in self.__arbolDict:
137 if self.__arbolDict[i]==self.indexclick:
138 self.arbolItem=self.__arbolDict[i]
139 print self.arbolItem
140 self.arbolItem.removeRows(self.arbolItem.row(),1)
141 if action == quitAction2:
142 return
118 143 #----------------------------------- MENU_PROJECT--------------------------------------------------#
119 144
120 145 @pyqtSignature("")
@@ -259,6 +284,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
259 284 Llama al metodo addProject.
260 285 """
261 286 self.addProject()
287 self.setProjectParam()
262 288
263 289 #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------#
264 290
@@ -286,7 +312,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
286 312 self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
287 313 self.dataPathTxt.setText(self.dataPath)
288 314
289 self.startDateCmbBox.clear()
315 self.starDateCmbBox.clear()
290 316 self.endDateCmbBox.clear()
291 317
292 318 if not os.path.exists(self.dataPath):
@@ -340,11 +366,6 class BasicWindow(QMainWindow, Ui_BasicWindow):
340 366 """
341 367 print "DATOS DEL PROJECT PATH,DATE,TIME"
342 368
343 # self.model.clear()
344 # self.parentItem = self.model.invisibleRootItem()
345 # self.__arbolDict[i]= QtGui.QStandardItem(QtCore.QString(name+" %0").arg(self.idp))
346 # self.parentItem.appendRow(self.__arbolDict[self.idp
347
348 369 # print self.projectObj
349 370 # print i
350 371 # print "get",self.__arbolDict.items()
@@ -352,20 +373,18 class BasicWindow(QMainWindow, Ui_BasicWindow):
352 373
353 374 self.idp += 1
354 375 self.projectObj = Project()
355 print "self.projectObj",self.projectObj
356 376 self.__projObjDict[self.idp] = self.projectObj
357 377
358
359 378 self.description="Think"
379
360 380 id=self.idp
361 381 name=str(self.nameProjectTxt.text())
362 print "name",name
363 382 desc=str(self.description)
364 383
365 384 self.projectObj.setup(id = id, name=name, description=desc)
366 385 print "self.projectObj.id",self.projectObj.id
367 # print self.projectObj.name
368 # print self.projectObj.description
386
387 #-------AÑADIENDO PARAMETROS A LA UNIDAD DE LECTURA---------#
369 388
370 389 datatype=str(self.dataTypeCmbBox.currentText())
371 390 path=str(self.dataPathTxt.text())
@@ -374,23 +393,27 class BasicWindow(QMainWindow, Ui_BasicWindow):
374 393 endDate=str(self.endDateCmbBox.currentText())
375 394
376 395
396 reloj1=self.startTimeEdit.time()
397 print
398
399 reloj2=self.timeEdit_2.time()
400
401 print reloj1.hour()
402 print reloj1.minute()
403 print reloj1.second()
404
377 405 self.readUnitConfObj = self.projectObj.addReadUnit(datatype=datatype,
378 406 path=path,
379 407 startDate=starDate,
380 408 endDate=endDate,
381 startTime='06:10:00',
382 endTime='23:59:59',
409 startTime = str(reloj1.hour()) +":"+str(reloj1.minute())+":"+ str(reloj1.second()),
410 endTime = str(reloj2.hour()) +":"+str(reloj2.minute())+":"+ str(reloj2.second()),
383 411 online=online)
412 print self.readUnitConfObj.datatype,"self.readUnitConfObj.datatype"
384 413
385 414 self.readUnitConfObjList.append(self.readUnitConfObj)
386 print "self.readUnitConfObj.getId",self.readUnitConfObj.getId(),datatype
387
388 reloj1=self.startTimeEdit.time()
389 reloj2=self.timeEdit_2.time()
390 print reloj1.hour()
391 print reloj1.minute()
392 print reloj1.second()
393 415
416 #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------#
394 417 self.model_2=treeModel()
395 418 self.model_2.setParams(name =self.projectObj.name,
396 419 directorio =path,
@@ -407,6 +430,7 class BasicWindow(QMainWindow, Ui_BasicWindow):
407 430 self.treeView_2.setModel(self.model_2)
408 431 self.treeView_2.expandAll()
409 432
433 #--------CREACIÓNDELDIAGRAMADELARBOL------------------------#
410 434 self.parentItem = self.model.invisibleRootItem()
411 435 #self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name).arg(self.idp))
412 436 self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name).arg(self.idp))
@@ -414,31 +438,20 class BasicWindow(QMainWindow, Ui_BasicWindow):
414 438 print self.__arbolDict[self.idp]
415 439 self.parentItem.appendRow(self.__arbolDict[self.idp])
416 440 self.parentItem=self.__arbolDict[self.idp]
417 self.tabProject.setEnabled(False)
418
419 441
442 #--------BLOQUEO-------#
443 self.tabProject.setEnabled(False)
420 444
421 445
422 446 #-----------------PUSHBUTTON_ADD_PROCESSING UNIT PROJECT------------------#
423 447 @pyqtSignature("")
424 448 def on_addUnitProces_clicked(self):
425 449 """
426 CREAR PROCESSING UNI ,ANADE UNA UNIDAD DE PROCESAMIENTO, LLAMA AL MÉTODO addUP QUE CONTIENE LAS OPERACION DE CREACION DE UNIDADES DE PROCESAMIENTO
450 CREAR PROCESSING UNIT ,añade unidad de procesamiento, LLAMA AL MÉTODO addUP QUE CONTIENE LAS OPERACION DE CREACION DE UNIDADES DE PROCESAMIENTO
427 451 Llama al metodo addUP.
428 452 """
429 # print "En este nivel se adiciona una rama de procesamiento, y se le concatena con el id"
430 453 self.addUP()
431 454
432
433 #----------------------------BASICO-----------------------------------#
434
435 def getNumberofProject(self):
436 # for i in self.proObjList:
437 # print i
438 return self.proObjList
439 # for i in self.proObjList:
440 # print i
441
442 455 def setParam(self):
443 456
444 457 self.tabWidgetProject.setEnabled(False)
@@ -453,23 +466,84 class BasicWindow(QMainWindow, Ui_BasicWindow):
453 466 self.valuenFFTPointOpSpec.setEnabled(False)
454 467 self.lineProfileSelecopVolCEB.setEnabled(False)
455 468
469 def setProjectParam(self):
470 self.nameProjectTxt.setText("Test")
471 self.dataPathTxt.setText('C:\data')
472 self.dataTypeCmbBox.clear()
473 self.dataTypeCmbBox.addItem("Voltage")
474 self.dataTypeCmbBox.addItem("Spectra")
475 startTime="00:00:00"
476 endTime="23:59:59"
477 starlist=startTime.split(":")
478 endlist=endTime.split(":")
479 print starlist[0],starlist[1],starlist[2]
480 print endlist[0],endlist[1],endlist[2]
481 self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2]))
482 self.startTimeEdit.setTime(self.time)
483 self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2]))
484 self.timeEdit_2.setTime(self.time)
485
456 486 def clickFunctiontree(self,index):
487
457 488 self.indexclick= index.model().itemFromIndex(index)
458 489 print "OPCION CLICK"
459 490 print "ArbolDict",self.indexclick
460 491 print "name:",self.indexclick.text()
461 492 #print self.tabWidgetProject.currentIndex()
462 493
463 #return self.indexclick
494
495
496
497 def doubleclickFunctiontree(self):
464 498 for i in self.__arbolDict:
465 499 if self.__arbolDict[i]==self.indexclick:
466 500 print "INDEXCLICK=ARBOLDICT",i
467 501 if self.__projObjDict.has_key(i)==True:
468 502 self.tabWidgetProject.setCurrentWidget(self.tabProject)
503 self.nameProjectTxt.setText(str(self.__projObjDict[i].name))
504 self.dataTypeCmbBox.clear()
505 self.dataTypeCmbBox.addItem(str(self.readUnitConfObjList[i-1].datatype))
506 print str(self.readUnitConfObjList[i-1].path)
507 self.dataPathTxt.setText(str(self.readUnitConfObjList[i-1].path))
508 self.starDateCmbBox.clear()
509 self.endDateCmbBox.clear()
510 self.starDateCmbBox.addItem(str(self.readUnitConfObjList[i-1].startDate))
511 self.endDateCmbBox.addItem(str(self.readUnitConfObjList[i-1].endDate))
512 startTime=self.readUnitConfObjList[i-1].startTime
513 endTime=self.readUnitConfObjList[i-1].endTime
514 starlist=startTime.split(":")
515 endlist=endTime.split(":")
516 print starlist[0],starlist[1],starlist[2]
517 print endlist[0],endlist[1],endlist[2]
518 self.time.setHMS(int(starlist[0]),int(starlist[1]),int(starlist[2]))
519 self.startTimeEdit.setTime(self.time)
520 self.time.setHMS(int(endlist[0]),int(endlist[1]),int(endlist[2]))
521 self.timeEdit_2.setTime(self.time)
522
523 #--------VISUALIZACION EN LA VENTANA PROJECT PROPERTIES-----------------#
524 self.model_2=treeModel()
525 self.model_2.setParams(name = str(self.__projObjDict[i].name),
526 directorio = str(self.readUnitConfObjList[i-1].path),
527 workspace = "C:\\WorkspaceGUI",
528 remode = str(self.readModeCmBox.currentText()),
529 dataformat = "Voltage",
530 date = str(self.readUnitConfObjList[i-1].startDate)+"-"+str(self.readUnitConfObjList[i-1].endDate),
531 initTime = str(starlist[0]) +":"+str(starlist[1])+":"+ str(starlist[2]),
532 endTime = str(endlist[0]) +":"+str(endlist[1])+":"+ str(endlist[2]),
533 timezone = "Local" ,
534 Summary = "test de prueba")
535
536 self.model_2.arbol()
537 self.treeView_2.setModel(self.model_2)
538 self.treeView_2.expandAll()
539
540 #self.dataPathTxt.setText(str(self.__projObjDict[i].addReadUnit.path()))
469 541
470 542 if self.indexclick.text()=='Voltage':
471 543 self.tabVoltage.setEnabled(True)
472 544 self.tabWidgetProject.setCurrentWidget(self.tabVoltage)
545 # for i in self.__opObjDict[i]
546 # self.OpObj=
473 547
474 548 if self.indexclick.text()=='Spectra':
475 549 self.tabSpectra.setEnabled(True)
@@ -479,44 +553,17 class BasicWindow(QMainWindow, Ui_BasicWindow):
479 553 self.tabCorrelation.setEnabled(True)
480 554 self.tabWidgetProject.setCurrentWidget(self.tabCorrelation)
481 555
482
483 # self.indexclick= index.model().itemFromIndex(index).text()
484 # return self.indexclick
485 # print self.indexclick()
486 # print index.model().itemFromIndex(index)
487 # print self.indexclick
488 # NumofPro=self.indexclick[8:10]
489 # self.valuep=NumofPro
490 # #print self.valuep
491 # NameofPro=self.indexclick[0:7]
492 # self.namepTree=NameofPro
493 # print self.namepTree
494
495 556 def addProject(self):
557
496 558 self.tabWidgetProject.setEnabled(True)
559 #---------------KILL-----------------#
560 # self.tabWidgetProject.setTabsClosable(True)
561 # self.tabWidgetProject.tabCloseRequested.connect(self.tabWidgetProject.removeTab)
562 #------------------------------------#
497 563 self.tabWidgetProject.setCurrentWidget(self.tabProject)
498 564 self.tabProject.setEnabled(True)
499 565 #self.tabVoltage.setEnabled(False)
500 566 print "HABILITA WIDGET"
501 #+++++++++++++++++++Creacion del Objeto Controller-XML+++++++++++++#
502
503 # self.idp += 1
504 # self.projectObj = Project()
505 # print self.projectObj
506 # self.__projObjDict[self.idp] = self.projectObj
507 #
508 # #++++++++++++++++++Creación del Arbol++++++++++++++++++++#
509 #
510 # name='Test'
511 #
512 # self.parentItem = self.model.invisibleRootItem()
513 # self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name).arg(self.idp))
514 #
515 # print "Nombre del projecto es :",self.__arbolDict[self.idp].setAccessibleText('HOLA')
516 # print self.__arbolDict[self.idp]
517 # self.parentItem.appendRow(self.__arbolDict[self.idp])
518 # self.parentItem=self.__arbolDict[self.idp]
519
520 567
521 568 def existDir(self, var_dir):
522 569 """
@@ -621,8 +668,6 class BasicWindow(QMainWindow, Ui_BasicWindow):
621 668 self.endDateCmbBox.setCurrentIndex(self.starDateCmbBox.count()-1)
622 669 self.dataOkBtn.setEnabled(True)
623 670
624
625
626 671 def HourChanged(self):
627 672 #self.hour = self.HourScrollBar.value()
628 673 self.set_time()
@@ -652,27 +697,24 class BasicWindow(QMainWindow, Ui_BasicWindow):
652 697 if self.__projObjDict.has_key(i)==True:
653 698 self.projectObj=self.__projObjDict[int(i)]
654 699 print "self.projectObj.id",self.projectObj.id
700 #-----------Añadiendo Tipo de dato y Projecto a la Clase UnitProcess que abre la ventana de selección----#
655 701 self.configUP.dataTypeProject=str(self.dataTypeCmbBox.currentText())
656 702 self.configUP.getfromWindowList.append(self.projectObj)
657 703
658 for i in self.projectObj.procUnitConfObjDict:
659 if self.projectObj.procUnitConfObjDict[i].getElementName()=='ProcUnit':
660 self.upObj=self.projectObj.procUnitConfObjDict[i]
661 self.configUP.getfromWindowList.append(self.upObj)
704 # for i in self.projectObj.procUnitConfObjDict:
705 # if self.projectObj.procUnitConfObjDict[i].getElementName()=='ProcUnit':
706 # self.upObj=self.projectObj.procUnitConfObjDict[i]
707 # self.configUP.getfromWindowList.append(self.upObj)
662 708 else:
709 #-----------Añadiendo Unidad de Procesamiento a una Unidad de Procesamiento----#
663 710 self.upObj=self.__upObjDict[i]
664 711 print "self.upObj.id",self.upObj.id
665 712 self.configUP.getfromWindowList.append(self.upObj)
666 713
667
668
669 714 self.configUP.loadTotalList()
670 715 self.configUP.show()
671 #self.configUP.unitPsavebut.clicked.connect(self.reciveUPparameters)
672 716 self.configUP.closed.connect(self.createUP)
673 717
674
675
676 718 def createUP(self):
677 719
678 720 print "ADICION DE BRANCH Y ID"
@@ -716,6 +758,9 class BasicWindow(QMainWindow, Ui_BasicWindow):
716 758 self.numbertree=int(self.procUnitConfObj1.getId())-1
717 759 print self.procUnitConfObj1.id," ID DE LA UNIDAD DE PROCESAMIENTO "
718 760 #self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype+"%1").arg(self.numbertree))
761
762
763
719 764 self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype).arg(self.numbertree))
720 765 self.parentItem.appendRow(self.__arbolDict[self.procUnitConfObj1.id])
721 766 self.parentItem=self.__arbolDict[self.procUnitConfObj1.id]
@@ -735,8 +780,8 class BasicWindow(QMainWindow, Ui_BasicWindow):
735 780
736 781
737 782 def resetopSpec(self):
738 self.nFFTPointOpSpecCEB.setChecked(False)
739 783
784 self.nFFTPointOpSpecCEB.setChecked(False)
740 785 self.valuenFFTPointOpSpec.clear()
741 786
742 787 def resetgraphSpec(self):
@@ -744,19 +789,265 class BasicWindow(QMainWindow, Ui_BasicWindow):
744 789 self.CrossSpectraPlotGraphceb.setChecked(False)
745 790 self.RTIPlotGraphCEB.setChecked(False)
746 791
747
748 792 def saveProject(self):
749 793 print "entro"
750 794 #filename="C:\WorkspaceGUI\config1.xml"
751 795 for i in self.__arbolDict:
752 796 if self.__arbolDict[i]==self.indexclick:
753 self.projectObj=self.__projObjDict[int(i)]
797 self.projectObj=self.__projObjDict[i]
754 798 print "Encontre project"
755 799 filename="C:\WorkspaceGUI\config"+str(self.projectObj.id)+".xml"
756 800 print "Escribo Project"
757 801 self.projectObj.writeXml(filename)
758 802
759 803
804
805 # -----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------#
806
807 @pyqtSignature("int")
808 def on_selecChannelopVolCEB_stateChanged(self, p0):
809 """
810 Check Box habilita operaciones de Selecci�n de Canales
811 """
812 if p0==2:
813 self.numberChannelopVol.setEnabled(True)
814 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
815 # opObj10=upProcessSelect.addOperation(name='selectChannels')
816 # print opObj10.id
817 # self.operObjList.append(opObj10)
818 print " Ingresa seleccion de Canales"
819 if p0==0:
820 self.numberChannelopVol.setEnabled(False)
821
822 print " deshabilitado"
823
824 @pyqtSignature("int")
825 def on_selecHeighopVolCEB_stateChanged(self, p0):
826 """
827 Check Box habilita operaciones de Selecci�n de Alturas
828 """
829 if p0==2:
830 self.lineHeighProfileTxtopVol.setEnabled(True)
831 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
832 # opObj10=upProcessSelect.addOperation(name='selectHeights')
833 # print opObj10.id
834 # self.operObjList.append(opObj10)
835 print " Select Type of Profile"
836 if p0==0:
837 self.lineHeighProfileTxtopVol.setEnabled(False)
838 print " deshabilitado"
839
840
841 @pyqtSignature("int")
842 def on_profileSelecopVolCEB_stateChanged(self, p0):
843 """
844 Check Box habilita ingreso del rango de Perfiles
845 """
846 if p0==2:
847 self.lineProfileSelecopVolCEB.setEnabled(True)
848 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
849 # opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other')
850 # print opObj10.id
851 # self.operObjList.append(opObj10)
852 print " Select Type of Profile"
853 if p0==0:
854 self.lineProfileSelecopVolCEB.setEnabled(False)
855
856 print " deshabilitado"
857
858
859 @pyqtSignature("int")
860 def on_coherentIntegrationCEB_stateChanged(self, p0):
861 """
862 Check Box habilita ingresode del numero de Integraciones a realizar
863 """
864 if p0==2:
865 self.numberIntegration.setEnabled(True)
866 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
867 # opObj10=upProcessSelect.addOperation(name='CohInt', optype='other')
868 # print opObj10.id
869 # self.operObjList.append(opObj10)
870 print "Choose number of Cohint"
871 if p0==0:
872 print " deshabilitado"
873 self.numberIntegration.setEnabled(False)
874
875 #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------#
876
877 @pyqtSignature("")
878 def on_dataopVolOkBtn_clicked(self):
879 """
880 BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES A�ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
881 PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
882 """
883 for i in self.__arbolDict:
884 if self.__arbolDict[i]==self.indexclick:
885 print "INDEXCLICK=ARBOLDICT",i
886 if self.__upObjDict.has_key(i)==True:
887 self.upObj=self.__upObjDict[i]
888 # self.operObjList.append(opObj10)
889
890 if self.selecChannelopVolCEB.isChecked():
891 opObj10=self.upObj.addOperation(name='selectChannels')
892 self.operObjList.append(opObj10)
893 value=self.numberChannelopVol.text()
894 opObj10.addParameter(name='channelList', value=value, format='intlist')
895
896
897 print "channel"
898
899 if self.selecHeighopVolCEB.isChecked():
900 opObj10=self.upObj.addOperation(name='selectHeights')
901 print opObj10.id
902 self.operObjList.append(opObj10)
903 value=self.lineHeighProfileTxtopVol.text()
904 valueList=value.split(',')
905 opObj10.addParameter(name='minHei', value=valueList[0], format='float')
906 opObj10.addParameter(name='maxHei', value=valueList[1], format='float')
907
908 print "height"
909
910
911 if self.selecHeighopVolCEB.isChecked():
912 obj10=self.upObj.addOperation(name='ProfileSelector', optype='other')
913 print opObj10.id
914 self.operObjList.append(opObj10)
915 value=self.lineProfileSelecopVolCEB.text()
916 obj10.addParameter(name='ProfileSelector', value=value, format='intlist')
917
918 # for i in self.operObjList:
919 # if i.name=='ProfileSelector' :
920 # value=self.lineProfileSelecopVolCEB.text()
921 # i.addParameter(name='ProfileSelector', value=value, format='intlist')
922
923 if self.coherentIntegrationCEB.isChecked():
924 opObj10=self.upObj.addOperation(name='CohInt', optype='other')
925 print opObj10.id
926 self.operObjList.append(opObj10)
927 value=self.numberIntegration.text()
928 opObj10.addParameter(name='n', value=value, format='int')
929 # self.__opObjDict[i]==self.operObjList
930
931
932 #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------#
933
934 @pyqtSignature("int")
935 def on_nFFTPointOpSpecCEB_stateChanged(self, p0):
936 """
937 Habilita la opcion de a�adir el par�metro nFFTPoints a la Unidad de Procesamiento .
938 """
939 if p0==2:
940 self.valuenFFTPointOpSpec.setEnabled(True)
941 print " nFFTPoint"
942 if p0==0:
943 print " deshabilitado"
944 self.valuenFFTPointOpSpec.setEnabled(False)
945
946
947
948 @pyqtSignature("")
949 def on_dataopSpecOkBtn_clicked(self):
950 """
951 A�ade al archivo de configuraci�n el par�metros nFFTPoints a la UP.
952 """
953 print "A�adimos operaciones Spectra,nchannels,value,format"
954
955 for i in self.__arbolDict:
956 if self.__arbolDict[i]==self.indexclick:
957 print "INDEXCLICK=ARBOLDICT",i
958 if self.__upObjDict.has_key(i)==True:
959 self.upObj=self.__upObjDict[i]
960 # self.operObjList.append(opObj10)
961
962 if self.nFFTPointOpSpecCEB.isChecked():
963 value=self.numberChannelopVol.text()
964 self.upObj.addParameter(name='nFFTPoints',value=value,format='int')
965 print "nFFTpoints"
966
967
968
969 #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------#
970
971 @pyqtSignature("int")
972 def on_SpectraPlotGraphCEB_stateChanged(self, p0):
973 """
974 Habilita la opcion de Ploteo Spectra Plot
975 """
976 if p0==2:
977 print "Habilitado"
978
979 if p0==0:
980 print " deshabilitado"
981
982 @pyqtSignature("int")
983 def on_CrossSpectraPlotGraphceb_stateChanged(self, p0):
984 """
985 Habilita la opci�n de Ploteo CrossSpectra
986 """
987 if p0==2:
988 print "Habilitado"
989 if p0==0:
990 print " deshabilitado"
991
992 @pyqtSignature("int")
993 def on_RTIPlotGraphCEB_stateChanged(self, p0):
994 """
995 Habilita la opci�n de Plote RTIPlot
996 """
997 if p0==2:
998 print "Habilitado"
999 if p0==0:
1000 print " deshabilitado"
1001
1002 #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------#
1003 @pyqtSignature("")
1004 def on_dataGraphSpecOkBtn_clicked(self):
1005 """
1006 HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES.
1007 """
1008 for i in self.__arbolDict:
1009 if self.__arbolDict[i]==self.indexclick:
1010 print "INDEXCLICK=ARBOLDICT",i
1011 if self.__upObjDict.has_key(i)==True:
1012 self.upObj=self.__upObjDict[i]
1013 print "Graficar Spec op"
1014
1015 if self.SpectraPlotGraphCEB_2.isChecked():
1016 opObj10=self.upObj.addOperation(name='SpectraPlot',optype='other')
1017 print opObj10.id
1018 self.operObjList.append(opObj10)
1019 for i in self.operObjList:
1020 if i.name=='SpectraPlot':
1021 i.addParameter(name='idfigure', value='1', format='int')
1022 i.addParameter(name='wintitle', value='SpectraPlot0', format='str')
1023 i.addParameter(name='zmin', value='40', format='int')
1024 i.addParameter(name='zmax', value='90', format='int')
1025 i.addParameter(name='showprofile', value='1', format='int')
1026
1027 if self.CrossSpectraPlotGraphceb.isChecked():
1028 opObj10=self.upObj.addOperation(name='CrossSpectraPlot',optype='other')
1029 print opObj10.id
1030 self.operObjList.append(opObj10)
1031 for i in self.operObjList:
1032 if i.name=='CrossSpectraPlot' :
1033 i.addParameter(name='idfigure', value='2', format='int')
1034 i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str')
1035 i.addParameter(name='zmin', value='40', format='int')
1036 i.addParameter(name='zmax', value='90', format='int')
1037
1038 if self.RTIPlotGraphCEB.isChecked():
1039 opObj10=self.upObj.addOperation(name='RTIPlot',optype='other')
1040 print opObj10.id
1041 self.operObjList.append(opObj10)
1042 for i in self.operObjList:
1043 if i.name=='RTIPlot':
1044 i.addParameter(name='n', value='2', format='int')
1045 i.addParameter(name='overlapping', value='1', format='int')
1046
1047
1048
1049
1050
760 1051 class UnitProcess(QMainWindow, Ui_UnitProcess):
761 1052 """
762 1053 Class documentation goes here.
@@ -792,8 +1083,6 class UnitProcess(QMainWindow, Ui_UnitProcess):
792 1083 """
793 1084 Slot documentation goes here.
794 1085 """
795 # TODO: not implemented yet
796 #raise NotImplementedError
797 1086 self.create=False
798 1087 self.close()
799 1088
@@ -802,9 +1091,16 class UnitProcess(QMainWindow, Ui_UnitProcess):
802 1091 for i in self.getfromWindowList:
803 1092
804 1093 name=i.getElementName()
1094 print "name",name
805 1095 if name=='Project':
806 1096 id= i.id
807 1097 name=i.name
1098 print "tipodeproyecto",self.dataTypeProject
1099 if self.dataTypeProject=='Voltage':
1100 self.comboTypeBox.clear()
1101 self.comboTypeBox.addItem("Voltage")
1102 self.comboTypeBox.addItem("Spectra")
1103 self.comboTypeBox.addItem("Correlation")
808 1104 if self.dataTypeProject=='Spectra':
809 1105 self.comboTypeBox.clear()
810 1106 self.comboTypeBox.addItem("Spectra")
@@ -823,222 +1119,11 class UnitProcess(QMainWindow, Ui_UnitProcess):
823 1119 self.comboTypeBox.addItem("Correlation")
824 1120
825 1121
826 #self.comboInputBox.addItem(str(name))
827 self.comboInputBox.addItem(str(name)+str(id))
1122 self.comboInputBox.addItem(str(name))
1123 #self.comboInputBox.addItem(str(name)+str(id))
828 1124
829 1125 def closeEvent(self, event):
830 1126 self.closed.emit()
831 1127 event.accept()
832 1128
833 1129
No newline at end of file
834
835
836
837 #-----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------#
838 #
839 # @pyqtSignature("int")
840 # def on_selecChannelopVolCEB_stateChanged(self, p0):
841 # """
842 # Check Box habilita operaciones de Selecci�n de Canales
843 # """
844 # if p0==2:
845 # self.numberChannelopVol.setEnabled(True)
846 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
847 # opObj10=upProcessSelect.addOperation(name='selectChannels')
848 # print opObj10.id
849 # self.operObjList.append(opObj10)
850 # print " Ingresa seleccion de Canales"
851 # if p0==0:
852 # print " deshabilitado"
853 #
854 # @pyqtSignature("int")
855 # def on_selecHeighopVolCEB_stateChanged(self, p0):
856 # """
857 # Check Box habilita operaciones de Selecci�n de Alturas
858 # """
859 # if p0==2:
860 # self.lineHeighProfileTxtopVol.setEnabled(True)
861 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
862 # opObj10=upProcessSelect.addOperation(name='selectHeights')
863 # print opObj10.id
864 # self.operObjList.append(opObj10)
865 # print " Select Type of Profile"
866 # if p0==0:
867 # print " deshabilitado"
868 #
869 #
870 # @pyqtSignature("int")
871 # def on_profileSelecopVolCEB_stateChanged(self, p0):
872 # """
873 # Check Box habilita ingreso del rango de Perfiles
874 # """
875 # if p0==2:
876 # self.lineProfileSelecopVolCEB.setEnabled(True)
877 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
878 # opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other')
879 # print opObj10.id
880 # self.operObjList.append(opObj10)
881 # print " Select Type of Profile"
882 # if p0==0:
883 # print " deshabilitado"
884 #
885 #
886 # @pyqtSignature("int")
887 # def on_coherentIntegrationCEB_stateChanged(self, p0):
888 # """
889 # Check Box habilita ingresode del numero de Integraciones a realizar
890 # """
891 # if p0==2:
892 # self.numberIntegration.setEnabled(True)
893 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
894 # opObj10=upProcessSelect.addOperation(name='CohInt', optype='other')
895 # print opObj10.id
896 # self.operObjList.append(opObj10)
897 # print "Choose number of Cohint"
898 # if p0==0:
899 # print " deshabilitado"
900 # self.numberChannelopVol.setEnabled(False)
901 #
902 # #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------#
903 #
904 # @pyqtSignature("")
905 # def on_dataopVolOkBtn_clicked(self):
906 # """
907 # BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES A�ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
908 # PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
909 # """
910 # if self.selecChannelopVolCEB.isChecked():
911 # for i in self.operObjList:
912 # if i.name=='selectChannels':
913 # value=self.numberChannelopVol.text()
914 # i.addParameter(name='channelList', value=value, format='intlist')
915 #
916 #
917 # print "channel"
918 #
919 # if self.selecHeighopVolCEB.isChecked():
920 # for i in self.operObjList:
921 # if i.name=='selectHeights' :
922 # value=self.lineHeighProfileTxtopVol.text()
923 # valueList=value.split(',')
924 # i.addParameter(name='minHei', value=valueList[0], format='float')
925 # i.addParameter(name='maxHei', value=valueList[1], format='float')
926 #
927 # print "height"
928 #
929 #
930 # if self.selecHeighopVolCEB.isChecked():
931 # for i in self.operObjList:
932 # if i.name=='ProfileSelector' :
933 # value=self.lineProfileSelecopVolCEB.text()
934 # i.addParameter(name='ProfileSelector', value=value, format='intlist')
935 #
936 #
937 #
938 # if self.coherentIntegrationCEB.isChecked():
939 # for i in self.operObjList:
940 # if i.name=='CohInt':
941 # value=self.numberIntegration.text()
942 # i.addParameter(name='n', value=value, format='int')
943 #
944 #
945 # #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------#
946 #
947 # @pyqtSignature("int")
948 # def on_nFFTPointOpSpecCEB_stateChanged(self, p0):
949 # """
950 # Habilita la opcion de a�adir el par�metro nFFTPoints a la Unidad de Procesamiento .
951 # """
952 # if p0==2:
953 # self.valuenFFTPointOpSpec.setEnabled(True)
954 # print " nFFTPoint"
955 # if p0==0:
956 # print " deshabilitado"
957 #
958 # #------------------PUSH_BUTTON_SPECTRA_OK------------------------------------#
959 #
960 # @pyqtSignature("")
961 # def on_dataopSpecOkBtn_clicked(self):
962 # """
963 # A�ade al archivo de configuraci�n el par�metros nFFTPoints a la UP.
964 # """
965 # print "A�adimos operaciones Spectra,nchannels,value,format"
966 # if self.nFFTPointOpSpecCEB.isChecked():
967 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
968 # value=self.valuenFFTPointOpSpec.text()
969 # upProcessSelect.addParameter(name='nFFTPoints',value=value,format='int')
970 # #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------#
971 #
972 # @pyqtSignature("int")
973 # def on_SpectraPlotGraphCEB_stateChanged(self, p0):
974 # """
975 # Habilita la opcion de Ploteo Spectra Plot
976 # """
977 # if p0==2:
978 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
979 # opObj10=upProcessSelect.addOperation(name='SpectraPlot',optype='other')
980 # print opObj10.id
981 # self.operObjList.append(opObj10)
982 #
983 # if p0==0:
984 # print " deshabilitado"
985 #
986 # @pyqtSignature("int")
987 # def on_CrossSpectraPlotGraphceb_stateChanged(self, p0):
988 # """
989 # Habilita la opci�n de Ploteo CrossSpectra
990 # """
991 # if p0==2:
992 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
993 # opObj10=upProcessSelect.addOperation(name='CrossSpectraPlot',optype='other')
994 # print opObj10.id
995 # self.operObjList.append(opObj10)
996 # if p0==0:
997 # print " deshabilitado"
998 #
999 # @pyqtSignature("int")
1000 # def on_RTIPlotGraphCEB_stateChanged(self, p0):
1001 # """
1002 # Habilita la opci�n de Plote RTIPlot
1003 # """
1004 # if p0==2:
1005 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
1006 # opObj10=upProcessSelect.addOperation(name='RTIPlot',optype='other')
1007 # print opObj10.id
1008 # self.operObjList.append(opObj10)
1009 # if p0==0:
1010 # print " deshabilitado"
1011 #
1012 # #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------#
1013 # @pyqtSignature("")
1014 # def on_dataGraphSpecOkBtn_clicked(self):
1015 # """
1016 # HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES.
1017 # """
1018 # print "Graficar Spec op"
1019 # if self.SpectraPlotGraphCEB.isChecked():
1020 # for i in self.operObjList:
1021 # if i.name=='SpectraPlot':
1022 # i.addParameter(name='idfigure', value='1', format='int')
1023 # i.addParameter(name='wintitle', value='SpectraPlot0', format='str')
1024 # i.addParameter(name='zmin', value='40', format='int')
1025 # i.addParameter(name='zmax', value='90', format='int')
1026 # i.addParameter(name='showprofile', value='1', format='int')
1027 #
1028 # if self.CrossSpectraPlotGraphceb.isChecked():
1029 # for i in self.operObjList:
1030 # if i.name=='CrossSpectraPlot' :
1031 # i.addParameter(name='idfigure', value='2', format='int')
1032 # i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str')
1033 # i.addParameter(name='zmin', value='40', format='int')
1034 # i.addParameter(name='zmax', value='90', format='int')
1035 #
1036 # if self.RTIPlotGraphCEB.isChecked():
1037 # for i in self.operObjList:
1038 # if i.name=='RTIPlot':
1039 # i.addParameter(name='n', value='2', format='int')
1040 # i.addParameter(name='overlapping', value='1', format='int')
1041 #
1042 #
1043
1044 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now