##// END OF EJS Templates
basicwindow:...
Alexander Valdez -
r322:bd8704f4f307
parent child
Show More
This diff has been collapsed as it changes many lines, (717 lines changed) Show them Hide them
@@ -1,1085 +1,1044
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2 """
2 """
3 Module implementing MainWindow.
3 Module implementing MainWindow.
4 #+++++++++++++++++++++INTERFAZ DE USUARIO V1.1++++++++++++++++++++++++#
4 #+++++++++++++INTERFAZ DE USUARIO V1.1++++++++++++++#
5 """
5 """
6 from PyQt4.QtGui import QMainWindow
6 import os
7 from PyQt4.QtCore import pyqtSignature
7 import datetime
8 from PyQt4.QtCore import pyqtSignal
8
9 from PyQt4 import QtCore
9 from PyQt4.QtGui import QMainWindow
10 from PyQt4 import QtGui
10 from PyQt4.QtCore import pyqtSignature
11 from timeconversions import Doy2Date
11 from PyQt4.QtCore import pyqtSignal
12 from modelProperties import treeModel
12 from PyQt4 import QtCore
13 from PyQt4 import QtGui
14 from timeconversions import Doy2Date
15 from modelProperties import treeModel
13
16
14 from viewer.ui_unitprocess import Ui_UnitProcess
17 from viewer.ui_unitprocess import Ui_UnitProcess
15 from viewer.ui_window import Ui_window
18 from viewer.ui_window import Ui_window
16 from viewer.ui_mainwindow import Ui_BasicWindow
19 from viewer.ui_mainwindow import Ui_BasicWindow
20 from controller import Project,ReadUnitConf,ProcUnitConf,OperationConf,ParameterConf
17
21
18
22
19 from controller import Project,ReadUnitConf,ProcUnitConf,OperationConf,ParameterConf
23 def isRadarFile(file):
20 import os
21
24
25 try:
26 year = int(file[1:5])
27 doy = int(file[5:8])
28 set = int(file[8:11])
29 except:
30 return 0
31
32 return 1
33
34 def isRadarPath(path):
35 try:
36 year = int(path[1:5])
37 doy = int(path[5:8])
38 except:
39 return 0
40
41 return 1
22
42
23 class BasicWindow(QMainWindow, Ui_BasicWindow):
43 class BasicWindow(QMainWindow, Ui_BasicWindow):
24 __projObjDict = {}
44 __projObjDict = None
25 __arbolDict = {}
45 __arbolDict = None
26 __upObjDict = {}
46 __upObjDict = None
27
47
28 """
48 """
29 Class documentation goes here.
49 Class documentation goes here.
30 #*##################VENTANA CUERPO DEL PROGRAMA####################
50 #*############VENTANA CUERPO DEL PROGRAMA##############
31 """
51 """
32 def __init__(self, parent = None):
52 def __init__(self, parent = None):
33 """
53 """
34 Constructor
54 Constructor
35 """
55 """
36 print "Inicio de Programa Interfaz GrΓ‘fica"
56 print "INICIO PROGRAMA "
37 QMainWindow.__init__(self, parent)
57 QMainWindow.__init__(self, parent)
38 self.setupUi(self)
58 self.setupUi(self)
39
59
60 self.__projObjDict = {}
61 self.__arbolDict = {}
62 self.__upObjDict = {}
63
40 self.indexclick=None
64 self.indexclick=None
41
65
42 self.online=0
66 self.online=0
43 self.datatype=0
67 self.datatype=0
44 self.variableList=[]
68 self.dateList=[]
45
69
46 self.proObjList=[]
70 self.proObjList=[]
47 self.idp=0
71 self.idp=0
48 self.namep=0
72 self.namep=0
49 self.description=0
73 self.description=0
50 self.namepTree=0
74 self.namepTree=0
51 self.valuep=0
75 self.valuep=0
52
76
53 self.upObjList= []
77 self.upObjList= []
54 self.upn=0
78 self.upn=0
55 self.upName=0
79 self.upName=0
56 self.upType=0
80 self.upType=0
57 self.uporProObjRecover=0
81 self.uporProObjRecover=0
58
82
59 self.readUnitConfObjList=[]
83 self.readUnitConfObjList=[]
60
84
61 self.upObjVolList=[]
85 self.upObjVolList=[]
62 self.upobjSpecList=[]
86 self.upobjSpecList=[]
63
87
64 self.operObjList=[]
88 self.operObjList=[]
65
89
66 self.configProject=None
90 self.configProject=None
67 self.configUP=None
91 self.configUP=None
68
92
69 self.readUnitConfObj=None
93 self.readUnitConfObj=None
70 self.procUnitConfObj0=None
94 self.procUnitConfObj0=None
71 self.opObj10=None
95 self.opObj10=None
72 self.opObj12=None
96 self.opObj12=None
73
97
74 self.setParam()
98 self.setParam()
75
99
76 #-----------------------------------NEW PROPERTIES------------------------------------------------#
100 #-----------------------------------NEW PROPERTIES------------------------------------------------#
77 QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
101 QtGui.QToolTip.setFont(QtGui.QFont('SansSerif', 10))
78 self.addprojectBtn.setToolTip('Add_New_Project')
102 self.addprojectBtn.setToolTip('Add_New_Project')
79 self.addUnitProces.setToolTip('Add_New_Processing_Unit')
103 self.addUnitProces.setToolTip('Add_New_Processing_Unit')
80
104
81 #-----------------------------------NEW PROPERTIES------------------------------------------------#
105 #-----------------------------------NEW PROPERTIES------------------------------------------------#
82 self.model = QtGui.QStandardItemModel()
106 self.model = QtGui.QStandardItemModel()
83 self.treeView.setModel(self.model)
107 self.treeView.setModel(self.model)
84 self.treeView.clicked.connect(self.clickFunctiontree)
108 self.treeView.clicked.connect(self.clickFunctiontree)
85 self.treeView.expandAll()
109 self.treeView.expandAll()
86 #self.treeView.clicked.connect(self.treefunction1)
110 #self.treeView.clicked.connect(self.treefunction1)
87
111
112
113
114
115
88 #-----------------------------------BARRA DE MENU-------------------------------------------------#
116 #-----------------------------------BARRA DE MENU-------------------------------------------------#
89
117
90 #----------------------------------- MENU_PROJECT--------------------------------------------------#
118 #----------------------------------- MENU_PROJECT--------------------------------------------------#
91
119
92 @pyqtSignature("")
120 @pyqtSignature("")
93 def on_menuFileAbrirObj_triggered(self):
121 def on_menuFileAbrirObj_triggered(self):
94 """
122 """
95 Abre un archivo de configuracion seleccionado, lee los parametros y
123 Abre un archivo de configuracion seleccionado, lee los parametros y
96 actualiza los atributos de esta clase; creando los objetos necesarios
124 actualiza los atributos de esta clase; creando los objetos necesarios
97 con los parametros leidos desde el archivo.
125 con los parametros leidos desde el archivo.
98 """
126 """
99 print "Leer un archivo xml y extraer sus atributos Not implemented yet"
127 print "Leer un archivo xml y extraer sus atributos Not implemented yet"
100
128
101 @pyqtSignature("")
129 @pyqtSignature("")
102 def on_menuFileCrearObj_triggered(self):
130 def on_menuFileCrearObj_triggered(self):
103 """
131 """
104 Crea un proyecto nuevo y lo anade a mi diccionario de proyectos
132 Crea un proyecto nuevo y lo anade a mi diccionario de proyectos
105 y habilita la ventana de configuracion del proyecto.
133 y habilita la ventana de configuracion del proyecto.
106
134
107 """
135 """
108 self.addProject()
136 self.addProject()
109
137
110 @pyqtSignature("")
138 @pyqtSignature("")
111 def on_menuFileGuardarObj_triggered(self):
139 def on_menuFileGuardarObj_triggered(self):
112 """
140 """
113 METODO EJECUTADO CUANDO OCURRE EL EVENTO GUARDAR PROJECTO
141 METODO EJECUTADO CUANDO OCURRE EL EVENTO GUARDAR PROJECTO
114
142
115 Llama al metodo saveProject.
143 Llama al metodo saveProject.
116 """
144 """
117 # my_id = arbol_selected()
145 # my_id = arbol_selected()
118 # filename = savefindow.show()
146 # filename = savefindow.show()
119 # self.saveProject(id, filename)
147 # self.saveProject(id, filename)
120 print "probsave"
148 print "probsave"
121 self.saveProject()
149 self.saveProject()
122
150
123 @pyqtSignature("")
151 @pyqtSignature("")
124 def on_menuFileCerrarObj_triggered(self):
152 def on_menuFileCerrarObj_triggered(self):
125 """
153 """
126 METODO EJECUTADO CUANDO OCURRE EL EVENTO CERRAR
154 METODO EJECUTADO CUANDO OCURRE EL EVENTO CERRAR
127 Llama al metodo close.
155 Llama al metodo close.
128 """
156 """
129 self.close()
157 self.close()
130
158
131 #-----------------------------------MENU_RUN----------------------------------------------------#
159 #-----------------------------------MENU_RUN----------------------------------------------------#
132
160
133 @pyqtSignature("")
161 @pyqtSignature("")
134 def on_menuRUNStartObj_clicked(self):
162 def on_menuRUNStartObj_clicked(self):
135 """
163 """
136 METODO EJECUTADO CUANDO OCURRE EL EVENTO RUN
164 METODO EJECUTADO CUANDO OCURRE EL EVENTO RUN
137 Llama al metodo RUN.
165 Llama al metodo RUN.
138 """
166 """
139 print "Not implemented yet"
167 print "Not implemented yet"
140
168
141 @pyqtSignature("")
169 @pyqtSignature("")
142 def on_menuRUNPausaObj_clicked(self):
170 def on_menuRUNPausaObj_clicked(self):
143 """
171 """
144 METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA
172 METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA
145 Llama al metodo PAUSA.
173 Llama al metodo PAUSA.
146 """
174 """
147 print "Not implemented yet"
175 print "Not implemented yet"
148
176
149 #-----------------------------------MENU_OPTION-------------------------------------------------#
177 #-----------------------------------MENU_OPTION-------------------------------------------------#
150
178
151 @pyqtSignature("")
179 @pyqtSignature("")
152 def on_menuOptConfigLogfileObj_clicked(self):
180 def on_menuOptConfigLogfileObj_clicked(self):
153 """
181 """
154 METODO EJECUTADO CUANDO OCURRE EL EVENTO ConfigLog
182 METODO EJECUTADO CUANDO OCURRE EL EVENTO ConfigLog
155 Llama al metodo close.
183 Llama al metodo close.
156 """
184 """
157 print "Not implemented yet"
185 print "Not implemented yet"
158
186
159 @pyqtSignature("")
187 @pyqtSignature("")
160 def on_menuOptConfigserverObj_clicked(self):
188 def on_menuOptConfigserverObj_clicked(self):
161 """
189 """
162 METODO EJECUTADO CUANDO OCURRE EL EVENTO Config Server
190 METODO EJECUTADO CUANDO OCURRE EL EVENTO Config Server
163 Llama al metodo close.
191 Llama al metodo close.
164 """
192 """
165 print "Not implemented yet"
193 print "Not implemented yet"
166 #-----------------------------------MENU_HELP-------------------------------------------------------#
194 #-----------------------------------MENU_HELP-------------------------------------------------------#
167
195
168 @pyqtSignature("")
196 @pyqtSignature("")
169 def on_menuHELPAboutObj_clicked(self):
197 def on_menuHELPAboutObj_clicked(self):
170 """
198 """
171 METODO EJECUTADO CUANDO OCURRE EL EVENTO HELP
199 METODO EJECUTADO CUANDO OCURRE EL EVENTO HELP
172 Llama al metodo close.
200 Llama al metodo close.
173 """
201 """
174 print "Not implemented yet"
202 print "Not implemented yet"
175
203
176 @pyqtSignature("")
204 @pyqtSignature("")
177 def on_menuHELPPrfObj_clicked(self):
205 def on_menuHELPPrfObj_clicked(self):
178 """
206 """
179 METODO EJECUTADO CUANDO OCURRE EL EVENTO HElp
207 METODO EJECUTADO CUANDO OCURRE EL EVENTO HElp
180 Llama al metodo close.
208 Llama al metodo close.
181 """
209 """
182 print "Not implemented yet"
210 print "Not implemented yet"
183
211
184 #-----------------------------------BARRA DE HERRAMIENTAS----------------------------------------#
212 #-----------------------------------BARRA DE HERRAMIENTAS----------------------------------------#
185
213
186 @pyqtSignature("")
214 @pyqtSignature("")
187 def on_actOpenObj_triggered(self):
215 def on_actOpenObj_triggered(self):
188 """
216 """
189 METODO CARGA UN ARCHIVO DE CONFIGURACION ANTERIOR
217 METODO CARGA UN ARCHIVO DE CONFIGURACION ANTERIOR
190 """
218 """
191 print "Leer un archivo xml y extraer sus atributos Not implemented yet"
219 print "Leer un archivo xml y extraer sus atributos Not implemented yet"
192
220
193 @pyqtSignature("")
221 @pyqtSignature("")
194 def on_actCreateObj_triggered(self):
222 def on_actCreateObj_triggered(self):
195 """
223 """
196 CREAR PROJECT ,ANADE UN NUEVO PROYECTO, LLAMA AL MÉTODO QUE CONTIENE LAS OPERACION DE CREACION DE PROYECTOS
224 CREAR PROJECT ,ANADE UN NUEVO PROYECTO, LLAMA AL MÉTODO QUE CONTIENE LAS OPERACION DE CREACION DE PROYECTOS
197 Llama al metodo addProject.
225 Llama al metodo addProject.
198 """
226 """
199 self.addProject()
227 self.addProject()
200
228
201 @pyqtSignature("")
229 @pyqtSignature("")
202 def on_actStopObj_triggered(self):
230 def on_actStopObj_triggered(self):
203 """
231 """
204 METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA
232 METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA
205 Llama al metodo PAUSA.
233 Llama al metodo PAUSA.
206 """
234 """
207 print "Not implemented yet"
235 print "Not implemented yet"
208
236
209 @pyqtSignature("")
237 @pyqtSignature("")
210 def on_actPlayObj_triggered(self):
238 def on_actPlayObj_triggered(self):
211 """
239 """
212 METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA
240 METODO EJECUTADO CUANDO OCURRE EL EVENTO PAUSA
213 Llama al metodo PAUSA.
241 Llama al metodo PAUSA.
214 """
242 """
215 print "Not implemented yet"
243 print "Not implemented yet"
216
244
217 @pyqtSignature("")
245 @pyqtSignature("")
218 def on_actSaveObj_triggered(self):
246 def on_actSaveObj_triggered(self):
219 """
247 """
220 METODO EJECUTADO CUANDO OCURRE EL EVENTO SAVE
248 METODO EJECUTADO CUANDO OCURRE EL EVENTO SAVE
221 Llama al metodo SAVE.
249 Llama al metodo SAVE.
222 """
250 """
223 self.saveProject()
251 self.saveProject()
224
252
225 #-----------------------------------PUSHBUTTON_CREATE PROJECT----------------------------------#
253 #-----------------------------------PUSHBUTTON_CREATE PROJECT----------------------------------#
226
254
227 @pyqtSignature("")
255 @pyqtSignature("")
228 def on_addprojectBtn_clicked(self):
256 def on_addprojectBtn_clicked(self):
229 """
257 """
230 CREAR PROJECT ,ANADE UN NUEVO PROYECTO, LLAMA AL MÉTODO QUE CONTIENE LAS OPERACION DE CREACION DE PROYECTOS
258 CREAR PROJECT ,ANADE UN NUEVO PROYECTO, LLAMA AL MÉTODO QUE CONTIENE LAS OPERACION DE CREACION DE PROYECTOS
231 Llama al metodo addProject.
259 Llama al metodo addProject.
232 """
260 """
233 self.addProject()
261 self.addProject()
234
262
235 #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------#
263 #------------------------------------VENTANA CONFIGURACION PROJECT----------------------------#
236
264
237 @pyqtSignature("int")
265 @pyqtSignature("int")
238 def on_dataTypeCmbBox_activated(self,index):
266 def on_dataTypeCmbBox_activated(self,index):
239 """
267 """
240 Metodo que identifica que tipo de dato se va a trabajar VOLTAGE O ESPECTRA
268 Metodo que identifica que tipo de dato se va a trabajar VOLTAGE O ESPECTRA
241 """
269 """
242 self.dataFormatTxt.setReadOnly(True)
270 self.dataFormatTxt.setReadOnly(True)
243 if index==0:
271 if index==0:
244 self.datatype='Voltage'
272 self.datatype='.r'
245 elif index==1:
273 elif index==1:
246 self.datatype='Spectra'
274 self.datatype='.pdata'
247 else :
275 else :
248 self.datatype=''
276 self.datatype=''
249 self.dataFormatTxt.setReadOnly(False)
277 self.dataFormatTxt.setReadOnly(False)
250 self.dataFormatTxt.setText(self.datatype)
278 self.dataFormatTxt.setText(self.datatype)
279 self.loadDays()
251
280
252 @pyqtSignature("")
281 @pyqtSignature("")
253 def on_dataPathBrowse_clicked(self):
282 def on_dataPathBrowse_clicked(self):
254 """
283 """
255 OBTENCION DE LA RUTA DE DATOS
284 OBTENCION DE LA RUTA DE DATOS
256 """
285 """
257 self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
286 self.dataPath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
258 self.dataPathTxt.setText(self.dataPath)
287 self.dataPathTxt.setText(self.dataPath)
259 self.statusDpath=self.existDir(self.dataPath)
288
260 self.loadDays()
289 self.startDateCmbBox.clear()
290 self.endDateCmbBox.clear()
291
292 if not os.path.exists(self.dataPath):
293 self.dataOkBtn.setEnabled(False)
294 return
295
296 self.loadDays()
261
297
262 @pyqtSignature("int")
298 @pyqtSignature("int")
263 def on_starDateCmbBox_activated(self, index):
299 def on_starDateCmbBox_activated(self, index):
264 """
300 """
265 SELECCION DEL RANGO DE FECHAS -START DATE
301 SELECCION DEL RANGO DE FECHAS -START DATE
266 """
302 """
267 var_StopDay_index=self.endDateCmbBox.count() - self.endDateCmbBox.currentIndex()
303 stopIndex = self.endDateCmbBox.count() - self.endDateCmbBox.currentIndex()
268 self.endDateCmbBox.clear()
304 self.endDateCmbBox.clear()
269 for i in self.variableList[index:]:
305
306 for i in self.dateList[index:]:
270 self.endDateCmbBox.addItem(i)
307 self.endDateCmbBox.addItem(i)
271 self.endDateCmbBox.setCurrentIndex(self.endDateCmbBox.count() - var_StopDay_index)
308
272 self.getsubList()
309 self.endDateCmbBox.setCurrentIndex(self.endDateCmbBox.count() - stopIndex)
273
310
274 @pyqtSignature("int")
311 @pyqtSignature("int")
275 def on_endDateCmbBox_activated(self, index):
312 def on_endDateCmbBox_activated(self, index):
276 """
313 """
277 SELECCION DEL RANGO DE FECHAS-END DATE
314 SELECCION DEL RANGO DE FECHAS-END DATE
278 """
315 """
279 var_StartDay_index=self.starDateCmbBox.currentIndex()
316 startIndex=self.starDateCmbBox.currentIndex()
280 var_end_index = self.endDateCmbBox.count() - index
317 stopIndex = self.endDateCmbBox.count() - index
281 self.starDateCmbBox.clear()
318 self.starDateCmbBox.clear()
282 for i in self.variableList[:len(self.variableList) - var_end_index + 1]:
319 for i in self.dateList[:len(self.dateList) - stopIndex + 1]:
283 self.starDateCmbBox.addItem(i)
320 self.starDateCmbBox.addItem(i)
284 self.starDateCmbBox.setCurrentIndex(var_StartDay_index)
321 self.starDateCmbBox.setCurrentIndex(startIndex)
285 self.getsubList() #Se carga var_sublist[] con el rango de las fechas seleccionadas
286
322
287 @pyqtSignature("int")
323 @pyqtSignature("int")
288 def on_readModeCmBox_activated(self, p0):
324 def on_readModeCmBox_activated(self, p0):
289 """
325 """
290 SELECCION DEL MODO DE LECTURA ON=1, OFF=0
326 SELECCION DEL MODO DE LECTURA ON=1, OFF=0
291 """
327 """
292 if p0==0:
328 if p0==0:
293 self.online=0
329 self.online=0
294 elif p0==1:
330 elif p0==1:
295 self.online=1
331 self.online=1
296
332
297 #---------------PUSHBUTTON_DATA " OKBUTTON "_CONFIGURATION PROJECT--------------------------#
333 #---------------PUSHBUTTON_DATA " OKBUTTON "_CONFIGURATION PROJECT--------------------------#
298
334
299 @pyqtSignature("")
335 @pyqtSignature("")
300 def on_dataOkBtn_clicked(self):
336 def on_dataOkBtn_clicked(self):
301 """
337 """
302 AΓ±ade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml.
338 AΓ±ade al Obj XML de Projecto, name,datatype,date,time,readmode,wait,etc, crea el readUnitProcess del archivo xml.
303 Prepara la configuraciΓ³n del diΓ‘grama del Arbol del treeView numero 2
339 Prepara la configuraciΓ³n del diΓ‘grama del Arbol del treeView numero 2
304 """
340 """
305 print "En este nivel se pasa el tipo de dato con el que se trabaja,path,startDate,endDate,startTime,endTime,online"
341 print "DATOS DEL PROJECT PATH,DATE,TIME"
306
307 for i in self.__arbolDict:
308 if self.__arbolDict[i]==self.indexclick:
309
310
342
311 # self.model.clear()
343 # self.model.clear()
312 # self.parentItem = self.model.invisibleRootItem()
344 # self.parentItem = self.model.invisibleRootItem()
313 # self.__arbolDict[i]= QtGui.QStandardItem(QtCore.QString(name+" %0").arg(self.idp))
345 # self.__arbolDict[i]= QtGui.QStandardItem(QtCore.QString(name+" %0").arg(self.idp))
314 # self.parentItem.appendRow(self.__arbolDict[self.idp
346 # self.parentItem.appendRow(self.__arbolDict[self.idp
315 self.projectObj=self.__projObjDict[int(i)]
347
316 # print self.projectObj
348 # print self.projectObj
317 # print i
349 # print i
318 # print "get",self.__arbolDict.items()
350 # print "get",self.__arbolDict.items()
319 # print "keys",self.__arbolDict.keys()
351 # print "keys",self.__arbolDict.keys()
320 self.description="Think"
352
321 id=i
353 self.idp += 1
322 name=str(self.nameProjectTxt.text())
354 self.projectObj = Project()
323 desc=str(self.description)
355 print "self.projectObj",self.projectObj
324
356 self.__projObjDict[self.idp] = self.projectObj
325 self.projectObj.setup(id = id, name=name, description=desc)
357
326 print self.projectObj.id
358
359 self.description="Think"
360 id=self.idp
361 name=str(self.nameProjectTxt.text())
362 print "name",name
363 desc=str(self.description)
364
365 self.projectObj.setup(id = id, name=name, description=desc)
366 print "self.projectObj.id",self.projectObj.id
327 # print self.projectObj.name
367 # print self.projectObj.name
328 # print self.projectObj.description
368 # print self.projectObj.description
369
370 datatype=str(self.dataTypeCmbBox.currentText())
371 path=str(self.dataPathTxt.text())
372 online=int(self.online)
373 starDate=str(self.starDateCmbBox.currentText())
374 endDate=str(self.endDateCmbBox.currentText())
375
376
377 self.readUnitConfObj = self.projectObj.addReadUnit(datatype=datatype,
378 path=path,
379 startDate=starDate,
380 endDate=endDate,
381 startTime='06:10:00',
382 endTime='23:59:59',
383 online=online)
384
385 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
394 self.model_2=treeModel()
395 self.model_2.setParams(name =self.projectObj.name,
396 directorio =path,
397 workspace ="C:\\WorkspaceGUI",
398 remode =str(self.readModeCmBox.currentText()),
399 dataformat =datatype,
400 date =str(starDate)+"-"+str(endDate),
401 initTime = str(reloj1.hour()) +":"+str(reloj1.minute())+":"+ str(reloj1.second()),
402 endTime = str(reloj2.hour()) +":"+str(reloj2.minute())+":"+ str(reloj2.second()),
403 timezone ="Local" ,
404 Summary ="test de prueba")
329
405
330 datatype=str(self.dataTypeCmbBox.currentText())
406 self.model_2.arbol()
331 path=str(self.dataPathTxt.text())
407 self.treeView_2.setModel(self.model_2)
332 online=int(self.online)
408 self.treeView_2.expandAll()
333 starDate=str(self.starDateCmbBox.currentText())
334 endDate=str(self.endDateCmbBox.currentText())
335
336
337 self.readUnitConfObj = self.projectObj.addReadUnit(datatype=datatype,
338 path=path,
339 startDate=starDate,
340 endDate=endDate,
341 startTime='06:10:00',
342 endTime='23:59:59',
343 online=online)
344
345 self.readUnitConfObjList.append(self.readUnitConfObj)
346 print "self.readUnitConfObj.getId",self.readUnitConfObj.getId(),datatype,path,starDate,endDate,online
347
348 self.model_2=treeModel()
349 self.model_2.setParams(name=self.projectObj.name+str(self.projectObj.id),
350 directorio=path,
351 workspace="C:\\WorkspaceGUI",
352 remode=str(self.readModeCmBox.currentText()),
353 dataformat=datatype,
354 date=str(starDate)+"-"+str(endDate),
355 initTime='06:10:00',
356 endTime='23:59:59',
357 timezone="Local" ,
358 Summary="test de prueba")
359 self.model_2.arbol()
360 self.treeView_2.setModel(self.model_2)
361 self.treeView_2.expandAll()
362
409
363
410 self.parentItem = self.model.invisibleRootItem()
364
411 #self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name).arg(self.idp))
412 self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name).arg(self.idp))
413
414 print self.__arbolDict[self.idp]
415 self.parentItem.appendRow(self.__arbolDict[self.idp])
416 self.parentItem=self.__arbolDict[self.idp]
417 self.tabProject.setEnabled(False)
418
419
420
421
365 #-----------------PUSHBUTTON_ADD_PROCESSING UNIT PROJECT------------------#
422 #-----------------PUSHBUTTON_ADD_PROCESSING UNIT PROJECT------------------#
366 @pyqtSignature("")
423 @pyqtSignature("")
367 def on_addUnitProces_clicked(self):
424 def on_addUnitProces_clicked(self):
368 """
425 """
369 CREAR PROCESSING UNI ,ANADE UNA UNIDAD DE PROCESAMIENTO, LLAMA AL MÉTODO addUP QUE CONTIENE LAS OPERACION DE CREACION DE UNIDADES DE PROCESAMIENTO
426 CREAR PROCESSING UNI ,ANADE UNA UNIDAD DE PROCESAMIENTO, LLAMA AL MÉTODO addUP QUE CONTIENE LAS OPERACION DE CREACION DE UNIDADES DE PROCESAMIENTO
370 Llama al metodo addUP.
427 Llama al metodo addUP.
371 """
428 """
372 # print "En este nivel se adiciona una rama de procesamiento, y se le concatena con el id"
429 # print "En este nivel se adiciona una rama de procesamiento, y se le concatena con el id"
373 self.addUP()
430 self.addUP()
374
431
375
432
376
433 #----------------------------BASICO-----------------------------------#
377
378 #-----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------#
379
380 @pyqtSignature("int")
381 def on_selecChannelopVolCEB_stateChanged(self, p0):
382 """
383 Check Box habilita operaciones de SelecciοΏ½n de Canales
384 """
385 if p0==2:
386 self.numberChannelopVol.setEnabled(True)
387 upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
388 opObj10=upProcessSelect.addOperation(name='selectChannels')
389 print opObj10.id
390 self.operObjList.append(opObj10)
391 print " Ingresa seleccion de Canales"
392 if p0==0:
393 print " deshabilitado"
394
395 @pyqtSignature("int")
396 def on_selecHeighopVolCEB_stateChanged(self, p0):
397 """
398 Check Box habilita operaciones de SelecciοΏ½n de Alturas
399 """
400 if p0==2:
401 self.lineHeighProfileTxtopVol.setEnabled(True)
402 upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
403 opObj10=upProcessSelect.addOperation(name='selectHeights')
404 print opObj10.id
405 self.operObjList.append(opObj10)
406 print " Select Type of Profile"
407 if p0==0:
408 print " deshabilitado"
409
410
411 @pyqtSignature("int")
412 def on_profileSelecopVolCEB_stateChanged(self, p0):
413 """
414 Check Box habilita ingreso del rango de Perfiles
415 """
416 if p0==2:
417 self.lineProfileSelecopVolCEB.setEnabled(True)
418 upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
419 opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other')
420 print opObj10.id
421 self.operObjList.append(opObj10)
422 print " Select Type of Profile"
423 if p0==0:
424 print " deshabilitado"
425
426
427 @pyqtSignature("int")
428 def on_coherentIntegrationCEB_stateChanged(self, p0):
429 """
430 Check Box habilita ingresode del numero de Integraciones a realizar
431 """
432 if p0==2:
433 self.numberIntegration.setEnabled(True)
434 upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
435 opObj10=upProcessSelect.addOperation(name='CohInt', optype='other')
436 print opObj10.id
437 self.operObjList.append(opObj10)
438 print "Choose number of Cohint"
439 if p0==0:
440 print " deshabilitado"
441 self.numberChannelopVol.setEnabled(False)
442
443 #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------#
444
445 @pyqtSignature("")
446 def on_dataopVolOkBtn_clicked(self):
447 """
448 BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AοΏ½ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
449 PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
450 """
451 if self.selecChannelopVolCEB.isChecked():
452 for i in self.operObjList:
453 if i.name=='selectChannels':
454 value=self.numberChannelopVol.text()
455 i.addParameter(name='channelList', value=value, format='intlist')
456
457
458 print "channel"
459
460 if self.selecHeighopVolCEB.isChecked():
461 for i in self.operObjList:
462 if i.name=='selectHeights' :
463 value=self.lineHeighProfileTxtopVol.text()
464 valueList=value.split(',')
465 i.addParameter(name='minHei', value=valueList[0], format='float')
466 i.addParameter(name='maxHei', value=valueList[1], format='float')
467
468 print "height"
469
470
471 if self.selecHeighopVolCEB.isChecked():
472 for i in self.operObjList:
473 if i.name=='ProfileSelector' :
474 value=self.lineProfileSelecopVolCEB.text()
475 i.addParameter(name='ProfileSelector', value=value, format='intlist')
476
477
478
479 if self.coherentIntegrationCEB.isChecked():
480 for i in self.operObjList:
481 if i.name=='CohInt':
482 value=self.numberIntegration.text()
483 i.addParameter(name='n', value=value, format='int')
484
485
486 #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------#
487
488 @pyqtSignature("int")
489 def on_nFFTPointOpSpecCEB_stateChanged(self, p0):
490 """
491 Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento .
492 """
493 if p0==2:
494 self.valuenFFTPointOpSpec.setEnabled(True)
495 print " nFFTPoint"
496 if p0==0:
497 print " deshabilitado"
498
499 #------------------PUSH_BUTTON_SPECTRA_OK------------------------------------#
500
501 @pyqtSignature("")
502 def on_dataopSpecOkBtn_clicked(self):
503 """
504 AοΏ½ade al archivo de configuraciοΏ½n el parοΏ½metros nFFTPoints a la UP.
505 """
506 print "AοΏ½adimos operaciones Spectra,nchannels,value,format"
507 if self.nFFTPointOpSpecCEB.isChecked():
508 upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
509 value=self.valuenFFTPointOpSpec.text()
510 upProcessSelect.addParameter(name='nFFTPoints',value=value,format='int')
511 #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------#
512
513 @pyqtSignature("int")
514 def on_SpectraPlotGraphCEB_stateChanged(self, p0):
515 """
516 Habilita la opcion de Ploteo Spectra Plot
517 """
518 if p0==2:
519 upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
520 opObj10=upProcessSelect.addOperation(name='SpectraPlot',optype='other')
521 print opObj10.id
522 self.operObjList.append(opObj10)
523
524 if p0==0:
525 print " deshabilitado"
526
527 @pyqtSignature("int")
528 def on_CrossSpectraPlotGraphceb_stateChanged(self, p0):
529 """
530 Habilita la opciοΏ½n de Ploteo CrossSpectra
531 """
532 if p0==2:
533 upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
534 opObj10=upProcessSelect.addOperation(name='CrossSpectraPlot',optype='other')
535 print opObj10.id
536 self.operObjList.append(opObj10)
537 if p0==0:
538 print " deshabilitado"
539
540 @pyqtSignature("int")
541 def on_RTIPlotGraphCEB_stateChanged(self, p0):
542 """
543 Habilita la opciοΏ½n de Plote RTIPlot
544 """
545 if p0==2:
546 upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
547 opObj10=upProcessSelect.addOperation(name='RTIPlot',optype='other')
548 print opObj10.id
549 self.operObjList.append(opObj10)
550 if p0==0:
551 print " deshabilitado"
552
553 #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------#
554 @pyqtSignature("")
555 def on_dataGraphSpecOkBtn_clicked(self):
556 """
557 HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES.
558 """
559 print "Graficar Spec op"
560 if self.SpectraPlotGraphCEB.isChecked():
561 for i in self.operObjList:
562 if i.name=='SpectraPlot':
563 i.addParameter(name='idfigure', value='1', format='int')
564 i.addParameter(name='wintitle', value='SpectraPlot0', format='str')
565 i.addParameter(name='zmin', value='40', format='int')
566 i.addParameter(name='zmax', value='90', format='int')
567 i.addParameter(name='showprofile', value='1', format='int')
568
569 if self.CrossSpectraPlotGraphceb.isChecked():
570 for i in self.operObjList:
571 if i.name=='CrossSpectraPlot' :
572 i.addParameter(name='idfigure', value='2', format='int')
573 i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str')
574 i.addParameter(name='zmin', value='40', format='int')
575 i.addParameter(name='zmax', value='90', format='int')
576
577 if self.RTIPlotGraphCEB.isChecked():
578 for i in self.operObjList:
579 if i.name=='RTIPlot':
580 i.addParameter(name='n', value='2', format='int')
581 i.addParameter(name='overlapping', value='1', format='int')
582
583
584 #----------------------------BASICO-----------------------------------#
585
434
586 def getNumberofProject(self):
435 def getNumberofProject(self):
587 # for i in self.proObjList:
436 # for i in self.proObjList:
588 # print i
437 # print i
589 return self.proObjList
438 return self.proObjList
590 # for i in self.proObjList:
439 # for i in self.proObjList:
591 # print i
440 # print i
592
441
593 def setParam(self):
442 def setParam(self):
594
443
595 self.tabWidgetProject.setEnabled(False)
444 self.tabWidgetProject.setEnabled(False)
445 self.tabVoltage.setEnabled(False)
446 self.tabSpectra.setEnabled(False)
447 self.tabCorrelation.setEnabled(False)
596 self.dataPathTxt.setText('C:\data')
448 self.dataPathTxt.setText('C:\data')
597 self.nameProjectTxt.setText("Test")
449 self.nameProjectTxt.setText("Test")
598 self.numberChannelopVol.setEnabled(False)
450 self.numberChannelopVol.setEnabled(False)
599 self.lineHeighProfileTxtopVol.setEnabled(False)
451 self.lineHeighProfileTxtopVol.setEnabled(False)
600 self.numberIntegration.setEnabled(False)
452 self.numberIntegration.setEnabled(False)
601 self.valuenFFTPointOpSpec.setEnabled(False)
453 self.valuenFFTPointOpSpec.setEnabled(False)
602 self.lineProfileSelecopVolCEB.setEnabled(False)
454 self.lineProfileSelecopVolCEB.setEnabled(False)
603
455
604 def clickFunctiontree(self,index):
456 def clickFunctiontree(self,index):
605 self.indexclick= index.model().itemFromIndex(index)
457 self.indexclick= index.model().itemFromIndex(index)
606 print self.indexclick
458 print "OPCION CLICK"
607 return self.indexclick
459 print "ArbolDict",self.indexclick
460 print "name:",self.indexclick.text()
461 #print self.tabWidgetProject.currentIndex()
462
463 #return self.indexclick
464 for i in self.__arbolDict:
465 if self.__arbolDict[i]==self.indexclick:
466 print "INDEXCLICK=ARBOLDICT",i
467 if self.__projObjDict.has_key(i)==True:
468 self.tabWidgetProject.setCurrentWidget(self.tabProject)
469
470 if self.indexclick.text()=='Voltage':
471 self.tabVoltage.setEnabled(True)
472 self.tabWidgetProject.setCurrentWidget(self.tabVoltage)
473
474 if self.indexclick.text()=='Spectra':
475 self.tabSpectra.setEnabled(True)
476 self.tabWidgetProject.setCurrentWidget(self.tabSpectra)
477
478 if self.indexclick.text()=='Correlation':
479 self.tabCorrelation.setEnabled(True)
480 self.tabWidgetProject.setCurrentWidget(self.tabCorrelation)
481
482
608 # self.indexclick= index.model().itemFromIndex(index).text()
483 # self.indexclick= index.model().itemFromIndex(index).text()
609 # return self.indexclick
484 # return self.indexclick
610 # print self.indexclick()
485 # print self.indexclick()
611 # print index.model().itemFromIndex(index)
486 # print index.model().itemFromIndex(index)
612 # print self.indexclick
487 # print self.indexclick
613 # NumofPro=self.indexclick[8:10]
488 # NumofPro=self.indexclick[8:10]
614 # self.valuep=NumofPro
489 # self.valuep=NumofPro
615 # #print self.valuep
490 # #print self.valuep
616 # NameofPro=self.indexclick[0:7]
491 # NameofPro=self.indexclick[0:7]
617 # self.namepTree=NameofPro
492 # self.namepTree=NameofPro
618 # print self.namepTree
493 # print self.namepTree
619
494
620 def addProject(self):
495 def addProject(self):
621 self.tabWidgetProject.setEnabled(True)
496 self.tabWidgetProject.setEnabled(True)
622 print "En este nivel se debe crear el proyecto,id,nombre,desc"
497 self.tabWidgetProject.setCurrentWidget(self.tabProject)
498 self.tabProject.setEnabled(True)
499 #self.tabVoltage.setEnabled(False)
500 print "HABILITA WIDGET"
623 #+++++++++++++++++++Creacion del Objeto Controller-XML+++++++++++++#
501 #+++++++++++++++++++Creacion del Objeto Controller-XML+++++++++++++#
624
502
625 self.idp += 1
503 # self.idp += 1
626 self.projectObj = Project()
504 # self.projectObj = Project()
627 print self.projectObj
505 # print self.projectObj
628 self.__projObjDict[self.idp] = self.projectObj
506 # self.__projObjDict[self.idp] = self.projectObj
629
507 #
630 #++++++++++++++++++CreaciΓ³n del Arbol++++++++++++++++++++#
508 # #++++++++++++++++++CreaciΓ³n del Arbol++++++++++++++++++++#
631
509 #
632 name='Test'
510 # name='Test'
633 self.parentItem = self.model.invisibleRootItem()
511 #
634 self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name+" %0").arg(self.idp))
512 # self.parentItem = self.model.invisibleRootItem()
635 print "Nombre del projecto es :",self.__arbolDict[self.idp].setAccessibleText('HOLA')
513 # self.__arbolDict[self.idp] = QtGui.QStandardItem(QtCore.QString(name).arg(self.idp))
636 print self.__arbolDict[self.idp]
514 #
637 self.parentItem.appendRow(self.__arbolDict[self.idp])
515 # print "Nombre del projecto es :",self.__arbolDict[self.idp].setAccessibleText('HOLA')
638 self.parentItem=self.__arbolDict[self.idp]
516 # print self.__arbolDict[self.idp]
517 # self.parentItem.appendRow(self.__arbolDict[self.idp])
518 # self.parentItem=self.__arbolDict[self.idp]
639
519
640 print "Porfavor ingrese los parΓ‘metros de configuracion del Proyecto"
641
520
642 def existDir(self, var_dir):
521 def existDir(self, var_dir):
643 """
522 """
644 METODO PARA VERIFICAR SI LA RUTA EXISTE-VAR_DIR
523 METODO PARA VERIFICAR SI LA RUTA EXISTE-VAR_DIR
645 VARIABLE DIRECCION
524 VARIABLE DIRECCION
646 """
525 """
647 if os.path.isdir(var_dir):
526 if os.path.isdir(var_dir):
648 return True
527 return True
649 else:
528 else:
650 self.textEdit.append("Incorrect path:" + str(var_dir))
529 self.textEdit.append("Incorrect path:" + str(var_dir))
651 return False
530 return False
652
531
532 def searchData(self, path, ext, expLabel='', walk=1):
533
534 dateList = []
535 fileList = []
536
537 if walk == 0:
538 files = os.listdir(path)
539 for thisFile in files:
540 if not os.path.isfile(thisFile):
541 continue
542 thisExt = os.path.splitext(thisFile)[-1]
543
544 if thisExt != ext:
545 continue
546
547 fileList.append(file)
548
549 for thisFile in fileList:
550
551 if not isRadarFile(thisFile):
552 continue
553
554 year = int(thisFile[1:5])
555 doy = int(thisFile[5:8])
556
557 date = datetime.date(year,1,1) + datetime.timedelta(doy-1)
558 dateformat = date.strftime("%Y/%m/%d")
559
560 if dateformat not in dateList:
561 dateList.append(dateformat)
562
563 if walk == 1:
564
565 dirList = os.listdir(path)
566 dirList.sort()
567
568 dateList = []
569
570 for thisDir in dirList:
571
572 if not isRadarPath(thisDir):
573 continue
574
575 doypath = os.path.join(path, thisDir, expLabel)
576
577 files = os.listdir(doypath)
578 fileList = []
579
580 for thisFile in files:
581
582 if os.path.splitext(thisFile)[-1] != ext:
583 continue
584
585 if not isRadarFile(thisFile):
586 continue
587
588 fileList.append(thisFile)
589 break
590
591 if fileList == []:
592 continue
593
594 year = int(thisDir[1:5])
595 doy = int(thisDir[5:8])
596
597 date = datetime.date(year,1,1) + datetime.timedelta(doy-1)
598 dateformat = date.strftime("%Y/%m/%d")
599 dateList.append(dateformat)
600
601 return dateList
602
653 def loadDays(self):
603 def loadDays(self):
654 """
604 """
655 METODO PARA CARGAR LOS DIAS
605 METODO PARA CARGAR LOS DIAS
656 """
606 """
657 self.variableList=[]
607 ext = self.datatype
608 path = str(self.dataPathTxt.text())
609
658 self.starDateCmbBox.clear()
610 self.starDateCmbBox.clear()
659 self.endDateCmbBox.clear()
611 self.endDateCmbBox.clear()
660
612
661 Dirlist = os.listdir(self.dataPath)
613 dateList = self.searchData(path, ext=ext)
662 Dirlist.sort()
614 #Se cargan las listas para seleccionar StartDay y StopDay (QComboBox)
615 self.dateList = dateList
663
616
664 for a in range(0, len(Dirlist)):
617 for thisDate in dateList:
665 fname= Dirlist[a]
618 self.starDateCmbBox.addItem(thisDate)
666 Doy=fname[5:8]
619 self.endDateCmbBox.addItem(thisDate)
667 fname = fname[1:5]
620
668 print fname
621 self.endDateCmbBox.setCurrentIndex(self.starDateCmbBox.count()-1)
669 fecha=Doy2Date(int(fname),int(Doy))
622 self.dataOkBtn.setEnabled(True)
670 fechaList=fecha.change2date()
623
671 #print fechaList[0]
624
672 Dirlist[a]=fname+"/"+str(fechaList[0])+"/"+str(fechaList[1])
625
673 #+"-"+ fechaList[0]+"-"+fechaList[1]
626 def HourChanged(self):
674
627 #self.hour = self.HourScrollBar.value()
675 #---------------AQUI TIENE QUE SER MODIFICADO--------#
628 self.set_time()
676
629
677 #Se cargan las listas para seleccionar StartDay y StopDay (QComboBox)
630 def MinChanged(self):
678 for i in range(0, (len(Dirlist))):
631 #self.min = self.MinScrollBar.value()
679 self.variableList.append(Dirlist[i])
632 self.set_time()
633
634 def SecChanged(self):
635 #self.sec = self.SecScrollBar.value()
636 self.set_time()
637
638 def set_time(self):
639 self.time.setHMS(self.hour, self.min, self.sec)
640 self.startTimeEdit.setTime(self.time)
680
641
681 for i in self.variableList:
642 self.timeEdit_2.setTime(self.time)
682 self.starDateCmbBox.addItem(i)
683 self.endDateCmbBox.addItem(i)
684 self.endDateCmbBox.setCurrentIndex(self.starDateCmbBox.count()-1)
685
686 self.getsubList()
687 self.dataOkBtn.setEnabled(True)
688
643
689 def getsubList(self):
690 """
691 OBTIENE EL RANDO DE LAS FECHAS SELECCIONADAS
692 """
693 self.subList=[]
694 for i in self.variableList[self.starDateCmbBox.currentIndex():self.starDateCmbBox.currentIndex() + self.endDateCmbBox.currentIndex()+1]:
695 self.subList.append(i)
696
644
697 def addUP(self):
645 def addUP(self):
698
646
699 self.configUP=UnitProcess(self)
647 self.configUP=UnitProcess(self)
648
700 for i in self.__arbolDict:
649 for i in self.__arbolDict:
701 if self.__arbolDict[i]==self.indexclick:
650 if self.__arbolDict[i]==self.indexclick:
651 print "INDEXCLICK=ARBOLDICT",i
702 if self.__projObjDict.has_key(i)==True:
652 if self.__projObjDict.has_key(i)==True:
703 self.projectObj=self.__projObjDict[int(i)]
653 self.projectObj=self.__projObjDict[int(i)]
704 print self.projectObj.id
654 print "self.projectObj.id",self.projectObj.id
655 self.configUP.dataTypeProject=str(self.dataTypeCmbBox.currentText())
705 self.configUP.getfromWindowList.append(self.projectObj)
656 self.configUP.getfromWindowList.append(self.projectObj)
706
657
707
708 for i in self.projectObj.procUnitConfObjDict:
658 for i in self.projectObj.procUnitConfObjDict:
709 if self.projectObj.procUnitConfObjDict[i].getElementName()=='ProcUnit':
659 if self.projectObj.procUnitConfObjDict[i].getElementName()=='ProcUnit':
710 self.upObj=self.projectObj.procUnitConfObjDict[i]
660 self.upObj=self.projectObj.procUnitConfObjDict[i]
711 self.configUP.getfromWindowList.append(self.upObj)
661 self.configUP.getfromWindowList.append(self.upObj)
712
662 else:
713
663 self.upObj=self.__upObjDict[i]
664 print "self.upObj.id",self.upObj.id
665 self.configUP.getfromWindowList.append(self.upObj)
666
667
714
668
715 self.configUP.loadTotalList()
669 self.configUP.loadTotalList()
716 self.configUP.show()
670 self.configUP.show()
717 #self.configUP.unitPsavebut.clicked.connect(self.reciveUPparameters)
671 #self.configUP.unitPsavebut.clicked.connect(self.reciveUPparameters)
718 self.configUP.closed.connect(self.createUP)
672 self.configUP.closed.connect(self.createUP)
719
673
720
674
721
675
722 def createUP(self):
676 def createUP(self):
723
677
724 print "En este nivel se adiciona una rama de procesamiento, y se le concatena con el id"
678 print "ADICION DE BRANCH Y ID"
725
679
726 if not self.configUP.create:
680 if not self.configUP.create:
727 return
681 return
728
682
729 self.uporProObjRecover=self.configUP.getFromWindow
683 self.uporProObjRecover=self.configUP.getFromWindow
730
684
731 self.upType = self.configUP.typeofUP
685 self.upType = self.configUP.typeofUP
732 for i in self.__arbolDict:
686 for i in self.__arbolDict:
687 print self.__arbolDict[i],"VALORES DEL DIC"
733 if self.__arbolDict[i]==self.indexclick:
688 if self.__arbolDict[i]==self.indexclick:
734 self.projectObj=self.__projObjDict[int(i)]
689 if self.__projObjDict.has_key(i)==True:
690 # print "self.__projObjDict[int(i)]" ,__projObjDict[int(i)]
691 self.projectObj=self.__projObjDict[int(i)]
692 print self.__projObjDict[int(i)]
693
694 if self.__upObjDict.has_key(i)==True:
695 print "Entro al else"
696 print self.__upObjDict.items()
697 self.upObj=self.__upObjDict[i]
698 getIdProject=self.upObj.id[0]
699 print getIdProject
700 self.projectObj=self.__projObjDict[int(getIdProject)]
735
701
736 datatype=str(self.upType)
702 datatype=str(self.upType)
737 uporprojectObj=self.uporProObjRecover
703 uporprojectObj=self.uporProObjRecover
738
704
739 if uporprojectObj.getElementName()=='ProcUnit':
705 if uporprojectObj.getElementName()=='ProcUnit':
740 inputId=uporprojectObj.getId()
706 inputId=uporprojectObj.getId()
741 else:
707 else:
742 inputId=self.readUnitConfObjList[uporprojectObj.id-1].getId()
708 inputId=self.readUnitConfObjList[uporprojectObj.id-1].getId()
743
709
744 print 'uporprojectObj.id','inputId', uporprojectObj.id,inputId
710 print 'uporprojectObj.id:',uporprojectObj.id,'inputId:',inputId
745 self.procUnitConfObj1 = self.projectObj.addProcUnit(datatype=datatype, inputId=inputId)
711 self.procUnitConfObj1 = self.projectObj.addProcUnit(datatype=datatype, inputId=inputId)
746 self.__upObjDict[self.procUnitConfObj1.id]= self.procUnitConfObj1
712 self.__upObjDict[self.procUnitConfObj1.id]= self.procUnitConfObj1
747
713 print "PRIMERA UP_VEAMOS",self.__upObjDict.items()
748 self.parentItem=self.__arbolDict[uporprojectObj.id]
714 self.parentItem=self.__arbolDict[uporprojectObj.id]
749 #print "i","self.__arbolDict[i]",i ,self.__arbolDict[i]
715 #print "i","self.__arbolDict[i]",i ,self.__arbolDict[i]
750 self.numbertree=int(self.procUnitConfObj1.getId())-1
716 self.numbertree=int(self.procUnitConfObj1.getId())-1
751 self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype +"%1 ").arg(self.numbertree))
717 print self.procUnitConfObj1.id," ID DE LA UNIDAD DE PROCESAMIENTO "
718 #self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype+"%1").arg(self.numbertree))
719 self.__arbolDict[self.procUnitConfObj1.id]=QtGui.QStandardItem(QtCore.QString(datatype).arg(self.numbertree))
752 self.parentItem.appendRow(self.__arbolDict[self.procUnitConfObj1.id])
720 self.parentItem.appendRow(self.__arbolDict[self.procUnitConfObj1.id])
753 self.parentItem=self.__arbolDict[self.procUnitConfObj1.id]
721 self.parentItem=self.__arbolDict[self.procUnitConfObj1.id]
754 # self.loadUp()
722 # self.loadUp()
755 self.treeView.expandAll()
723 self.treeView.expandAll()
756
724
757 def resetopVolt(self):
725 def resetopVolt(self):
758 self.selecChannelopVolCEB.setChecked(False)
726 self.selecChannelopVolCEB.setChecked(False)
759 self.selecHeighopVolCEB.setChecked(False)
727 self.selecHeighopVolCEB.setChecked(False)
760 self.coherentIntegrationCEB.setChecked(False)
728 self.coherentIntegrationCEB.setChecked(False)
761 self.profileSelecopVolCEB.setChecked(False)
729 self.profileSelecopVolCEB.setChecked(False)
762 #self.selecChannelopVolCEB.setEnabled(False)
730 #self.selecChannelopVolCEB.setEnabled(False)
763 self.lineHeighProfileTxtopVol.clear()
731 self.lineHeighProfileTxtopVol.clear()
764 self.lineProfileSelecopVolCEB.clear()
732 self.lineProfileSelecopVolCEB.clear()
765 self.numberChannelopVol.clear()
733 self.numberChannelopVol.clear()
766 self.numberIntegration.clear()
734 self.numberIntegration.clear()
767
735
768
736
769 def resetopSpec(self):
737 def resetopSpec(self):
770 self.nFFTPointOpSpecCEB.setChecked(False)
738 self.nFFTPointOpSpecCEB.setChecked(False)
771
739
772 self.valuenFFTPointOpSpec.clear()
740 self.valuenFFTPointOpSpec.clear()
773
741
774 def resetgraphSpec(self):
742 def resetgraphSpec(self):
775 self.SpectraPlotGraphCEB.setChecked(False)
743 self.SpectraPlotGraphCEB.setChecked(False)
776 self.CrossSpectraPlotGraphceb.setChecked(False)
744 self.CrossSpectraPlotGraphceb.setChecked(False)
777 self.RTIPlotGraphCEB.setChecked(False)
745 self.RTIPlotGraphCEB.setChecked(False)
778
746
779
747
780 def saveProject(self):
748 def saveProject(self):
781 print "entro"
749 print "entro"
782 #filename="C:\WorkspaceGUI\config1.xml"
750 #filename="C:\WorkspaceGUI\config1.xml"
783 for i in self.__arbolDict:
751 for i in self.__arbolDict:
784 if self.__arbolDict[i]==self.indexclick:
752 if self.__arbolDict[i]==self.indexclick:
785 self.projectObj=self.__projObjDict[int(i)]
753 self.projectObj=self.__projObjDict[int(i)]
786 print "Encontre project"
754 print "Encontre project"
787 filename="C:\WorkspaceGUI\config"+str(self.projectObj.id)+".xml"
755 filename="C:\WorkspaceGUI\config"+str(self.projectObj.id)+".xml"
788 print "Escribo Project"
756 print "Escribo Project"
789 self.projectObj.writeXml(filename)
757 self.projectObj.writeXml(filename)
790
758
791
759
792 class UnitProcess(QMainWindow, Ui_UnitProcess):
760 class UnitProcess(QMainWindow, Ui_UnitProcess):
793 """
761 """
794 Class documentation goes here.
762 Class documentation goes here.
795 """
763 """
796 closed=pyqtSignal()
764 closed=pyqtSignal()
797 create= False
765 create= False
798 def __init__(self, parent = None):
766 def __init__(self, parent = None):
799 """
767 """
800 Constructor
768 Constructor
801 """
769 """
802 QMainWindow.__init__(self, parent)
770 QMainWindow.__init__(self, parent)
803 self.setupUi(self)
771 self.setupUi(self)
804 self.getFromWindow=None
772 self.getFromWindow=None
805 self.getfromWindowList=[]
773 self.getfromWindowList=[]
774 self.dataTypeProject=None
806
775
807 self.listUP=None
776 self.listUP=None
808
777
809 @pyqtSignature("")
778 @pyqtSignature("")
810 def on_unitPokbut_clicked(self):
779 def on_unitPokbut_clicked(self):
811 """
780 """
812 Slot documentation goes here.
781 Slot documentation goes here.
813 """
782 """
814 self.create =True
783 self.create =True
815 self.getFromWindow=self.getfromWindowList[int(self.comboInputBox.currentIndex())]
784 self.getFromWindow=self.getfromWindowList[int(self.comboInputBox.currentIndex())]
816 #self.nameofUP= str(self.nameUptxt.text())
785 #self.nameofUP= str(self.nameUptxt.text())
817 self.typeofUP= str(self.comboTypeBox.currentText())
786 self.typeofUP= str(self.comboTypeBox.currentText())
818 self.close()
787 self.close()
819
788
820
789
821 @pyqtSignature("")
790 @pyqtSignature("")
822 def on_unitPcancelbut_clicked(self):
791 def on_unitPcancelbut_clicked(self):
823 """
792 """
824 Slot documentation goes here.
793 Slot documentation goes here.
825 """
794 """
826 # TODO: not implemented yet
795 # TODO: not implemented yet
827 #raise NotImplementedError
796 #raise NotImplementedError
828 self.create=False
797 self.create=False
829 self.close()
798 self.close()
830
799
831 def loadTotalList(self):
800 def loadTotalList(self):
832 self.comboInputBox.clear()
801 self.comboInputBox.clear()
833 for i in self.getfromWindowList:
802 for i in self.getfromWindowList:
834
803
835 name=i.getElementName()
804 name=i.getElementName()
836 if name=='Project':
805 if name=='Project':
837 id= i.id
806 id= i.id
838 name=i.name
807 name=i.name
808 if self.dataTypeProject=='Spectra':
809 self.comboTypeBox.clear()
810 self.comboTypeBox.addItem("Spectra")
811 self.comboTypeBox.addItem("Correlation")
812
839 if name=='ProcUnit':
813 if name=='ProcUnit':
840 id=int(i.id)-1
814 id=int(i.id)-1
841 name=i.datatype
815 name=i.datatype
816 if name == 'Voltage':
817 self.comboTypeBox.clear()
818 self.comboTypeBox.addItem("Spectra")
819 self.comboTypeBox.addItem("Correlation")
820 if name == 'Spectra':
821 self.comboTypeBox.clear()
822 self.comboTypeBox.addItem("Spectra")
823 self.comboTypeBox.addItem("Correlation")
824
842
825
826 #self.comboInputBox.addItem(str(name))
843 self.comboInputBox.addItem(str(name)+str(id))
827 self.comboInputBox.addItem(str(name)+str(id))
844
828
845 def closeEvent(self, event):
829 def closeEvent(self, event):
846 self.closed.emit()
830 self.closed.emit()
847 event.accept()
831 event.accept()
848
832
849
833
850
834
851
852
853
854
835
855
836
856
837 #-----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------#
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877 # -----------------VENTANA CONFIGURACION DE VOLTAGE---------------------------#
878 #
838 #
879 # @pyqtSignature("int")
839 # @pyqtSignature("int")
880 # def on_selecChannelopVolCEB_stateChanged(self, p0):
840 # def on_selecChannelopVolCEB_stateChanged(self, p0):
881 # """
841 # """
882 # Check Box habilita operaciones de SelecciοΏ½n de Canales
842 # Check Box habilita operaciones de SelecciοΏ½n de Canales
883 # """
843 # """
884 # if p0==2:
844 # if p0==2:
885 # self.numberChannelopVol.setEnabled(True)
845 # self.numberChannelopVol.setEnabled(True)
886 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
846 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
887 # opObj10=upProcessSelect.addOperation(name='selectChannels')
847 # opObj10=upProcessSelect.addOperation(name='selectChannels')
888 # print opObj10.id
848 # print opObj10.id
889 # self.operObjList.append(opObj10)
849 # self.operObjList.append(opObj10)
890 # print " Ingresa seleccion de Canales"
850 # print " Ingresa seleccion de Canales"
891 # if p0==0:
851 # if p0==0:
892 # print " deshabilitado"
852 # print " deshabilitado"
893 #
853 #
894 # @pyqtSignature("int")
854 # @pyqtSignature("int")
895 # def on_selecHeighopVolCEB_stateChanged(self, p0):
855 # def on_selecHeighopVolCEB_stateChanged(self, p0):
896 # """
856 # """
897 # Check Box habilita operaciones de SelecciοΏ½n de Alturas
857 # Check Box habilita operaciones de SelecciοΏ½n de Alturas
898 # """
858 # """
899 # if p0==2:
859 # if p0==2:
900 # self.lineHeighProfileTxtopVol.setEnabled(True)
860 # self.lineHeighProfileTxtopVol.setEnabled(True)
901 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
861 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
902 # opObj10=upProcessSelect.addOperation(name='selectHeights')
862 # opObj10=upProcessSelect.addOperation(name='selectHeights')
903 # print opObj10.id
863 # print opObj10.id
904 # self.operObjList.append(opObj10)
864 # self.operObjList.append(opObj10)
905 # print " Select Type of Profile"
865 # print " Select Type of Profile"
906 # if p0==0:
866 # if p0==0:
907 # print " deshabilitado"
867 # print " deshabilitado"
908 #
868 #
909 #
869 #
910 # @pyqtSignature("int")
870 # @pyqtSignature("int")
911 # def on_profileSelecopVolCEB_stateChanged(self, p0):
871 # def on_profileSelecopVolCEB_stateChanged(self, p0):
912 # """
872 # """
913 # Check Box habilita ingreso del rango de Perfiles
873 # Check Box habilita ingreso del rango de Perfiles
914 # """
874 # """
915 # if p0==2:
875 # if p0==2:
916 # self.lineProfileSelecopVolCEB.setEnabled(True)
876 # self.lineProfileSelecopVolCEB.setEnabled(True)
917 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
877 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
918 # opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other')
878 # opObj10=upProcessSelect.addOperation(name='ProfileSelector', optype='other')
919 # print opObj10.id
879 # print opObj10.id
920 # self.operObjList.append(opObj10)
880 # self.operObjList.append(opObj10)
921 # print " Select Type of Profile"
881 # print " Select Type of Profile"
922 # if p0==0:
882 # if p0==0:
923 # print " deshabilitado"
883 # print " deshabilitado"
924 #
884 #
925 #
885 #
926 # @pyqtSignature("int")
886 # @pyqtSignature("int")
927 # def on_coherentIntegrationCEB_stateChanged(self, p0):
887 # def on_coherentIntegrationCEB_stateChanged(self, p0):
928 # """
888 # """
929 # Check Box habilita ingresode del numero de Integraciones a realizar
889 # Check Box habilita ingresode del numero de Integraciones a realizar
930 # """
890 # """
931 # if p0==2:
891 # if p0==2:
932 # self.numberIntegration.setEnabled(True)
892 # self.numberIntegration.setEnabled(True)
933 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
893 # upProcessSelect=self.upObjVolList[int(self.addOpUpselec.currentIndex())]
934 # opObj10=upProcessSelect.addOperation(name='CohInt', optype='other')
894 # opObj10=upProcessSelect.addOperation(name='CohInt', optype='other')
935 # print opObj10.id
895 # print opObj10.id
936 # self.operObjList.append(opObj10)
896 # self.operObjList.append(opObj10)
937 # print "Choose number of Cohint"
897 # print "Choose number of Cohint"
938 # if p0==0:
898 # if p0==0:
939 # print " deshabilitado"
899 # print " deshabilitado"
940 # self.numberChannelopVol.setEnabled(False)
900 # self.numberChannelopVol.setEnabled(False)
941 #
901 #
942 # #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------#
902 # #-----------------------PUSHBUTTON_ACCEPT_OPERATION----------------------------#
943 #
903 #
944 # @pyqtSignature("")
904 # @pyqtSignature("")
945 # def on_dataopVolOkBtn_clicked(self):
905 # def on_dataopVolOkBtn_clicked(self):
946 # """
906 # """
947 # BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AοΏ½ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
907 # BUSCA EN LA LISTA DE OPERACIONES DEL TIPO VOLTAJE Y LES AοΏ½ADE EL PARAMETRO ADECUADO ESPERANDO LA ACEPTACION DEL USUARIO
948 # PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
908 # PARA AGREGARLO AL ARCHIVO DE CONFIGURACION XML
949 # """
909 # """
950 # if self.selecChannelopVolCEB.isChecked():
910 # if self.selecChannelopVolCEB.isChecked():
951 # for i in self.operObjList:
911 # for i in self.operObjList:
952 # if i.name=='selectChannels':
912 # if i.name=='selectChannels':
953 # value=self.numberChannelopVol.text()
913 # value=self.numberChannelopVol.text()
954 # i.addParameter(name='channelList', value=value, format='intlist')
914 # i.addParameter(name='channelList', value=value, format='intlist')
955 #
915 #
956 #
916 #
957 # print "channel"
917 # print "channel"
958 #
918 #
959 # if self.selecHeighopVolCEB.isChecked():
919 # if self.selecHeighopVolCEB.isChecked():
960 # for i in self.operObjList:
920 # for i in self.operObjList:
961 # if i.name=='selectHeights' :
921 # if i.name=='selectHeights' :
962 # value=self.lineHeighProfileTxtopVol.text()
922 # value=self.lineHeighProfileTxtopVol.text()
963 # valueList=value.split(',')
923 # valueList=value.split(',')
964 # i.addParameter(name='minHei', value=valueList[0], format='float')
924 # i.addParameter(name='minHei', value=valueList[0], format='float')
965 # i.addParameter(name='maxHei', value=valueList[1], format='float')
925 # i.addParameter(name='maxHei', value=valueList[1], format='float')
966 #
926 #
967 # print "height"
927 # print "height"
968 #
928 #
969 #
929 #
970 # if self.selecHeighopVolCEB.isChecked():
930 # if self.selecHeighopVolCEB.isChecked():
971 # for i in self.operObjList:
931 # for i in self.operObjList:
972 # if i.name=='ProfileSelector' :
932 # if i.name=='ProfileSelector' :
973 # value=self.lineProfileSelecopVolCEB.text()
933 # value=self.lineProfileSelecopVolCEB.text()
974 # i.addParameter(name='ProfileSelector', value=value, format='intlist')
934 # i.addParameter(name='ProfileSelector', value=value, format='intlist')
975 #
935 #
976 #
936 #
977 #
937 #
978 # if self.coherentIntegrationCEB.isChecked():
938 # if self.coherentIntegrationCEB.isChecked():
979 # for i in self.operObjList:
939 # for i in self.operObjList:
980 # if i.name=='CohInt':
940 # if i.name=='CohInt':
981 # value=self.numberIntegration.text()
941 # value=self.numberIntegration.text()
982 # i.addParameter(name='n', value=value, format='int')
942 # i.addParameter(name='n', value=value, format='int')
983 #
943 #
984 #
944 #
985 # #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------#
945 # #-------------------------VENTANA DE CONFIGURACION SPECTRA------------------------#
986 #
946 #
987 # @pyqtSignature("int")
947 # @pyqtSignature("int")
988 # def on_nFFTPointOpSpecCEB_stateChanged(self, p0):
948 # def on_nFFTPointOpSpecCEB_stateChanged(self, p0):
989 # """
949 # """
990 # Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento .
950 # Habilita la opcion de aοΏ½adir el parοΏ½metro nFFTPoints a la Unidad de Procesamiento .
991 # """
951 # """
992 # if p0==2:
952 # if p0==2:
993 # self.valuenFFTPointOpSpec.setEnabled(True)
953 # self.valuenFFTPointOpSpec.setEnabled(True)
994 # print " nFFTPoint"
954 # print " nFFTPoint"
995 # if p0==0:
955 # if p0==0:
996 # print " deshabilitado"
956 # print " deshabilitado"
997 #
957 #
998 # #------------------PUSH_BUTTON_SPECTRA_OK------------------------------------#
958 # #------------------PUSH_BUTTON_SPECTRA_OK------------------------------------#
999 #
959 #
1000 # @pyqtSignature("")
960 # @pyqtSignature("")
1001 # def on_dataopSpecOkBtn_clicked(self):
961 # def on_dataopSpecOkBtn_clicked(self):
1002 # """
962 # """
1003 # AοΏ½ade al archivo de configuraciοΏ½n el parοΏ½metros nFFTPoints a la UP.
963 # AοΏ½ade al archivo de configuraciοΏ½n el parοΏ½metros nFFTPoints a la UP.
1004 # """
964 # """
1005 # print "AοΏ½adimos operaciones Spectra,nchannels,value,format"
965 # print "AοΏ½adimos operaciones Spectra,nchannels,value,format"
1006 # if self.nFFTPointOpSpecCEB.isChecked():
966 # if self.nFFTPointOpSpecCEB.isChecked():
1007 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
967 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
1008 # value=self.valuenFFTPointOpSpec.text()
968 # value=self.valuenFFTPointOpSpec.text()
1009 # upProcessSelect.addParameter(name='nFFTPoints',value=value,format='int')
969 # upProcessSelect.addParameter(name='nFFTPoints',value=value,format='int')
1010 # #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------#
970 # #---------------------VENTANA DE CONFIGURACION GRAPH SPECTRA------------------#
1011 #
971 #
1012 # @pyqtSignature("int")
972 # @pyqtSignature("int")
1013 # def on_SpectraPlotGraphCEB_stateChanged(self, p0):
973 # def on_SpectraPlotGraphCEB_stateChanged(self, p0):
1014 # """
974 # """
1015 # Habilita la opcion de Ploteo Spectra Plot
975 # Habilita la opcion de Ploteo Spectra Plot
1016 # """
976 # """
1017 # if p0==2:
977 # if p0==2:
1018 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
978 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
1019 # opObj10=upProcessSelect.addOperation(name='SpectraPlot',optype='other')
979 # opObj10=upProcessSelect.addOperation(name='SpectraPlot',optype='other')
1020 # print opObj10.id
980 # print opObj10.id
1021 # self.operObjList.append(opObj10)
981 # self.operObjList.append(opObj10)
1022 #
982 #
1023 # if p0==0:
983 # if p0==0:
1024 # print " deshabilitado"
984 # print " deshabilitado"
1025 #
985 #
1026 # @pyqtSignature("int")
986 # @pyqtSignature("int")
1027 # def on_CrossSpectraPlotGraphceb_stateChanged(self, p0):
987 # def on_CrossSpectraPlotGraphceb_stateChanged(self, p0):
1028 # """
988 # """
1029 # Habilita la opciοΏ½n de Ploteo CrossSpectra
989 # Habilita la opciοΏ½n de Ploteo CrossSpectra
1030 # """
990 # """
1031 # if p0==2:
991 # if p0==2:
1032 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
992 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
1033 # opObj10=upProcessSelect.addOperation(name='CrossSpectraPlot',optype='other')
993 # opObj10=upProcessSelect.addOperation(name='CrossSpectraPlot',optype='other')
1034 # print opObj10.id
994 # print opObj10.id
1035 # self.operObjList.append(opObj10)
995 # self.operObjList.append(opObj10)
1036 # if p0==0:
996 # if p0==0:
1037 # print " deshabilitado"
997 # print " deshabilitado"
1038 #
998 #
1039 # @pyqtSignature("int")
999 # @pyqtSignature("int")
1040 # def on_RTIPlotGraphCEB_stateChanged(self, p0):
1000 # def on_RTIPlotGraphCEB_stateChanged(self, p0):
1041 # """
1001 # """
1042 # Habilita la opciοΏ½n de Plote RTIPlot
1002 # Habilita la opciοΏ½n de Plote RTIPlot
1043 # """
1003 # """
1044 # if p0==2:
1004 # if p0==2:
1045 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
1005 # upProcessSelect=self.upobjSpecList[int(self.addOpSpecUpselec.currentIndex())]
1046 # opObj10=upProcessSelect.addOperation(name='RTIPlot',optype='other')
1006 # opObj10=upProcessSelect.addOperation(name='RTIPlot',optype='other')
1047 # print opObj10.id
1007 # print opObj10.id
1048 # self.operObjList.append(opObj10)
1008 # self.operObjList.append(opObj10)
1049 # if p0==0:
1009 # if p0==0:
1050 # print " deshabilitado"
1010 # print " deshabilitado"
1051 #
1011 #
1052 # #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------#
1012 # #------------------PUSH_BUTTON_SPECTRA_GRAPH_OK-----------------------------#
1053 # @pyqtSignature("")
1013 # @pyqtSignature("")
1054 # def on_dataGraphSpecOkBtn_clicked(self):
1014 # def on_dataGraphSpecOkBtn_clicked(self):
1055 # """
1015 # """
1056 # HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES.
1016 # HABILITAR DE ACUERDO A LOS CHECKBOX QUE TIPO DE PLOTEOS SE VAN A REALIZAR MUESTRA Y GRABA LAS IMAGENES.
1057 # """
1017 # """
1058 # print "Graficar Spec op"
1018 # print "Graficar Spec op"
1059 # if self.SpectraPlotGraphCEB.isChecked():
1019 # if self.SpectraPlotGraphCEB.isChecked():
1060 # for i in self.operObjList:
1020 # for i in self.operObjList:
1061 # if i.name=='SpectraPlot':
1021 # if i.name=='SpectraPlot':
1062 # i.addParameter(name='idfigure', value='1', format='int')
1022 # i.addParameter(name='idfigure', value='1', format='int')
1063 # i.addParameter(name='wintitle', value='SpectraPlot0', format='str')
1023 # i.addParameter(name='wintitle', value='SpectraPlot0', format='str')
1064 # i.addParameter(name='zmin', value='40', format='int')
1024 # i.addParameter(name='zmin', value='40', format='int')
1065 # i.addParameter(name='zmax', value='90', format='int')
1025 # i.addParameter(name='zmax', value='90', format='int')
1066 # i.addParameter(name='showprofile', value='1', format='int')
1026 # i.addParameter(name='showprofile', value='1', format='int')
1067 #
1027 #
1068 # if self.CrossSpectraPlotGraphceb.isChecked():
1028 # if self.CrossSpectraPlotGraphceb.isChecked():
1069 # for i in self.operObjList:
1029 # for i in self.operObjList:
1070 # if i.name=='CrossSpectraPlot' :
1030 # if i.name=='CrossSpectraPlot' :
1071 # i.addParameter(name='idfigure', value='2', format='int')
1031 # i.addParameter(name='idfigure', value='2', format='int')
1072 # i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str')
1032 # i.addParameter(name='wintitle', value='CrossSpectraPlot', format='str')
1073 # i.addParameter(name='zmin', value='40', format='int')
1033 # i.addParameter(name='zmin', value='40', format='int')
1074 # i.addParameter(name='zmax', value='90', format='int')
1034 # i.addParameter(name='zmax', value='90', format='int')
1075 #
1035 #
1076 # if self.RTIPlotGraphCEB.isChecked():
1036 # if self.RTIPlotGraphCEB.isChecked():
1077 # for i in self.operObjList:
1037 # for i in self.operObjList:
1078 # if i.name=='RTIPlot':
1038 # if i.name=='RTIPlot':
1079 # i.addParameter(name='n', value='2', format='int')
1039 # i.addParameter(name='n', value='2', format='int')
1080 # i.addParameter(name='overlapping', value='1', format='int')
1040 # i.addParameter(name='overlapping', value='1', format='int')
1081 #
1041 #
1082 #
1042 #
1083 #
1043
1084
1044 No newline at end of file
1085 #--------------------------------------VENTANA DE CONFIGURACION DE LA UP-----------------------# No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now