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