@@ -12,8 +12,8 | |||||
12 | """ |
|
12 | """ | |
13 | Se usa para inicializar ciertos parametros para pruebas |
|
13 | Se usa para inicializar ciertos parametros para pruebas | |
14 | """ |
|
14 | """ | |
15 |
self.txtDpath.setText('/home/ricardoar/optional/STORAGE/EW_DRIFTS |
|
15 | self.txtDpath.setText('/home/ricardoar/optional/STORAGE/EW_DRIFTS') | |
16 |
self.txtRpath.setText('/home/ricardoar/optional/prueba1_jro_backup_manager |
|
16 | self.txtRpath.setText('/home/ricardoar/optional/prueba1_jro_backup_manager') | |
17 | self.txtElabel.setText('EW_DRIFTS_pruebas') |
|
17 | self.txtElabel.setText('EW_DRIFTS_pruebas') | |
18 | self.lstDcapacity.setCurrentIndex(4) |
|
18 | self.lstDcapacity.setCurrentIndex(4) | |
19 | self.txtDcapacity.setValue(250.0) |
|
19 | self.txtDcapacity.setValue(250.0) |
@@ -72,6 +72,7 | |||||
72 | def write(self, txt): |
|
72 | def write(self, txt): | |
73 | self.txtInfo.append(str(txt)) |
|
73 | self.txtInfo.append(str(txt)) | |
74 |
|
74 | |||
|
75 | #----------------------------------------------------- Obtencion de las ruta de los datos --------------------------------------------------------------- | |||
75 |
|
76 | |||
76 | @pyqtSignature("") |
|
77 | @pyqtSignature("") | |
77 | def on_btnDpath_clicked(self): |
|
78 | def on_btnDpath_clicked(self): | |
@@ -80,28 +81,30 | |||||
80 | """ |
|
81 | """ | |
81 | self.var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) |
|
82 | self.var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) | |
82 | self.txtDpath.setText(self.var_Dpath) |
|
83 | self.txtDpath.setText(self.var_Dpath) | |
83 | self.on_txtDpath_editingFinished() #llamada a funcion |
|
84 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) | |
84 |
|
85 | functions.load_days(self) | ||
85 |
|
86 | |||
86 | @pyqtSignature("") |
|
87 | ||
87 | def on_btnRpath_clicked(self): |
|
|||
88 | """ |
|
|||
89 | Permite seleccionar graficamente el direcorio del proyecto |
|
|||
90 | """ |
|
|||
91 | self.var_Rpath = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) |
|
|||
92 | self.txtRpath.setText(self.var_Rpath) |
|
|||
93 | self.on_txtRpath_editingFinished() #llamada a funcion |
|
|||
94 |
|
||||
95 |
|
||||
96 | @pyqtSignature("") |
|
88 | @pyqtSignature("") | |
97 | def on_txtDpath_editingFinished(self): |
|
89 | def on_txtDpath_editingFinished(self): | |
98 | """ |
|
90 | """ | |
99 | Permite buscar los archivos de extension seleccionada en la ruta de de datos |
|
91 | Carga la ruta editada y verifica que sea correcta y carga la lista de dias | |
100 | y cargar los valores para el rango de tiempo a ser grabado |
|
|||
101 | """ |
|
92 | """ | |
102 | self.var_Dpath=self.txtDpath.text() #Se carga la variable con la ruta recien editada |
|
93 | self.var_Dpath=self.txtDpath.text() #Se carga la variable con la ruta recien editada | |
103 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) |
|
94 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) | |
104 | functions.load_days(self) |
|
95 | functions.load_days(self) | |
|
96 | ||||
|
97 | ||||
|
98 | #----------------------------------------------------- Obtencion de las ruta del proyecto --------------------------------------------------------------- | |||
|
99 | ||||
|
100 | @pyqtSignature("") | |||
|
101 | def on_btnRpath_clicked(self): | |||
|
102 | """ | |||
|
103 | Permite seleccionar graficamente el direcorio del proyecto | |||
|
104 | """ | |||
|
105 | self.var_Rpath = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) | |||
|
106 | self.txtRpath.setText(self.var_Rpath) | |||
|
107 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) | |||
105 |
|
108 | |||
106 |
|
109 | |||
107 | @pyqtSignature("") |
|
110 | @pyqtSignature("") | |
@@ -111,8 +114,10 | |||||
111 | """ |
|
114 | """ | |
112 | self.var_Rpath=self.txtRpath.text() #Se carga la variable con la ruta recien editada |
|
115 | self.var_Rpath=self.txtRpath.text() #Se carga la variable con la ruta recien editada | |
113 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) |
|
116 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) | |
114 |
|
117 | |||
115 |
|
118 | |||
|
119 | #----------------------------------------------------- Tipo de datos --------------------------------------------------------------- | |||
|
120 | ||||
116 | @pyqtSignature("int") |
|
121 | @pyqtSignature("int") | |
117 | def on_lstDtype_activated(self, index): |
|
122 | def on_lstDtype_activated(self, index): | |
118 | """ |
|
123 | """ | |
@@ -120,40 +125,37 | |||||
120 | """ |
|
125 | """ | |
121 | self.txtDtype.setReadOnly(True) |
|
126 | self.txtDtype.setReadOnly(True) | |
122 | if index == 0: |
|
127 | if index == 0: | |
123 | var_type='r' |
|
128 | self.var_Dtype ='r' | |
124 | elif index == 1: |
|
129 | elif index == 1: | |
125 | var_type='pdata' |
|
130 | self.var_Dtype ='pdata' | |
126 | elif index == 2: |
|
131 | elif index == 2: | |
127 | var_type='sswma' |
|
132 | self.var_Dtype ='sswma' | |
128 | else : |
|
133 | else : | |
129 | var_type='' |
|
134 | self.var_Dtype ='' | |
130 | self.txtDtype.setReadOnly(False) |
|
135 | self.txtDtype.setReadOnly(False) | |
131 |
|
136 | |||
132 | self.txtDtype.setText(var_type) |
|
137 | self.txtDtype.setText(self.var_Dtype) | |
133 | self.on_txtDtype_editingFinished() |
|
138 | functions.load_days(self) #llamada a funcion | |
134 |
|
139 | |||
135 |
|
||||
136 | @pyqtSignature("") |
|
140 | @pyqtSignature("") | |
137 | def on_txtDtype_editingFinished(self): |
|
141 | def on_txtDtype_editingFinished(self): | |
138 | self.var_Dtype=self.txtDtype.text() |
|
142 | self.var_Dtype=self.txtDtype.text() | |
139 | functions.load_days(self) #llamada a funcion |
|
143 | functions.load_days(self) #llamada a funcion | |
140 |
|
144 | |||
141 |
|
145 | |||
|
146 | #----------------------------------------------------- Etiqueta --------------------------------------------------------------- | |||
|
147 | ||||
142 | @pyqtSignature("") |
|
148 | @pyqtSignature("") | |
143 | def on_txtElabel_editingFinished(self): |
|
149 | def on_txtElabel_editingFinished(self): | |
144 | self.var_Elabel = self.txtElabel.text() |
|
150 | self.var_Elabel = self.txtElabel.text() | |
145 |
|
151 | |||
146 |
|
152 | #----------------------------------------------------- Numero de copias --------------------------------------------------------------- | ||
147 | @pyqtSignature("") |
|
153 | @pyqtSignature("") | |
148 | def on_txtCopys_editingFinished(self): |
|
154 | def on_txtCopys_editingFinished(self): | |
149 | self.var_Copys = self.txtCopys.value() |
|
155 | self.var_Copys = self.txtCopys.value() | |
150 |
|
156 | |||
151 |
|
157 | #----------------------------------------------------- Seleccion del rango de fechas --------------------------------------------------------------- | ||
152 | @pyqtSignature("") |
|
158 | ||
153 | def on_txtDcapacity_editingFinished(self): |
|
|||
154 | self.var_Dcapacity = self.txtDcapacity.value() |
|
|||
155 |
|
||||
156 |
|
||||
157 | @pyqtSignature("int") #CLOSED |
|
159 | @pyqtSignature("int") #CLOSED | |
158 | def on_lstStartDay_activated(self, index): |
|
160 | def on_lstStartDay_activated(self, index): | |
159 | """ |
|
161 | """ | |
@@ -185,8 +187,15 | |||||
185 | self.lstStartDay.setCurrentIndex(var_StartDay_index) |
|
187 | self.lstStartDay.setCurrentIndex(var_StartDay_index) | |
186 |
|
188 | |||
187 | functions.get_sub_list(self) |
|
189 | functions.get_sub_list(self) | |
188 |
|
190 | |||
189 |
|
191 | |||
|
192 | #----------------------------------------------------- Capacidad del dispositivo de grabacion --------------------------------------------------------------- | |||
|
193 | ||||
|
194 | @pyqtSignature("") | |||
|
195 | def on_txtDcapacity_editingFinished(self): | |||
|
196 | self.var_Dcapacity = self.txtDcapacity.value() | |||
|
197 | ||||
|
198 | ||||
190 | @pyqtSignature("int") #CLOSED |
|
199 | @pyqtSignature("int") #CLOSED | |
191 | def on_lstDcapacity_activated(self, index): |
|
200 | def on_lstDcapacity_activated(self, index): | |
192 | """ |
|
201 | """ | |
@@ -210,11 +219,17 | |||||
210 |
|
219 | |||
211 | self.var_Dcapacity = self.txtDcapacity.value() |
|
220 | self.var_Dcapacity = self.txtDcapacity.value() | |
212 |
|
221 | |||
|
222 | ||||
|
223 | #============================================================================== | |||
|
224 | # Botones para la generacion de los archivos de configuracion y el proceso de grabacion | |||
|
225 | #============================================================================== | |||
|
226 | ||||
|
227 | #----------------------------------------------------- Generacion de la configuracion usando los parametros --------------------------------------------------------------- | |||
213 |
|
228 | |||
214 | @pyqtSignature("") |
|
229 | @pyqtSignature("") | |
215 | def on_btnGbkp_clicked(self): |
|
230 | def on_btnGbkp_clicked(self): | |
216 | """ |
|
231 | """ | |
217 | Cuando se presiona el boton btnGbkp |
|
232 | Generacion de archivos de configuracion usando los parametros | |
218 | """ |
|
233 | """ | |
219 |
|
234 | |||
220 | if functions.validate_parameters(self) == False: |
|
235 | if functions.validate_parameters(self) == False: | |
@@ -231,8 +246,11 | |||||
231 | functions.make_files_print(self) # Se crean los archivos .print |
|
246 | functions.make_files_print(self) # Se crean los archivos .print | |
232 | functions2.make_parameters_conf(self) # se crea el archivo parameters.conf |
|
247 | functions2.make_parameters_conf(self) # se crea el archivo parameters.conf | |
233 |
|
248 | |||
234 |
#Se |
|
249 | #Se bloquean los parametros de configuracion | |
235 | functions2.enabled_items1(True, self) |
|
250 | functions2.enabled_items1(True, self) | |
|
251 | ||||
|
252 | ||||
|
253 | #----------------------------------------------------- Permite reiniciar la configuracion --------------------------------------------------------------- | |||
236 |
|
254 | |||
237 | @pyqtSignature("") |
|
255 | @pyqtSignature("") | |
238 | def on_btnRestart_clicked(self): |
|
256 | def on_btnRestart_clicked(self): | |
@@ -242,6 +260,8 | |||||
242 | functions2.enabled_items1(False, self) |
|
260 | functions2.enabled_items1(False, self) | |
243 | os.remove("parameters.conf") |
|
261 | os.remove("parameters.conf") | |
244 |
|
262 | |||
|
263 | ||||
|
264 | #----------------------------------------------------- Iniciar proceso de grabacion --------------------------------------------------------------- | |||
245 |
|
265 | |||
246 | @pyqtSignature("") |
|
266 | @pyqtSignature("") | |
247 | def on_btnStartburn_clicked(self): |
|
267 | def on_btnStartburn_clicked(self): | |
@@ -294,6 +314,8 | |||||
294 | ####self.txtInfo.append(str(p.pid)) |
|
314 | ####self.txtInfo.append(str(p.pid)) | |
295 |
|
315 | |||
296 |
|
316 | |||
|
317 | #----------------------------------------------------- Detener proceso de grabacion --------------------------------------------------------------- | |||
|
318 | ||||
297 | @pyqtSignature("") |
|
319 | @pyqtSignature("") | |
298 | def on_btnStopburn_clicked(self): |
|
320 | def on_btnStopburn_clicked(self): | |
299 | """ |
|
321 | """ | |
@@ -302,7 +324,10 | |||||
302 | self.btnRestart.setEnabled(True) |
|
324 | self.btnRestart.setEnabled(True) | |
303 | self.btnStartburn.setEnabled(True) |
|
325 | self.btnStartburn.setEnabled(True) | |
304 | self.btnStopburn.setEnabled(False) |
|
326 | self.btnStopburn.setEnabled(False) | |
305 |
|
327 | |||
|
328 | ||||
|
329 | #----------------------------------------------------- Testeo de las unidades de grabacion --------------------------------------------------------------- | |||
|
330 | ||||
306 | @pyqtSignature("") |
|
331 | @pyqtSignature("") | |
307 | def on_btnTdevA_clicked(self): |
|
332 | def on_btnTdevA_clicked(self): | |
308 | var_dev = str(self.txtDeviceA.text()) |
|
333 | var_dev = str(self.txtDeviceA.text()) |
General Comments 0
You need to be logged in to leave comments.
Login now