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