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