@@ -1,772 +1,786 | |||
|
1 | 1 | # -*- coding: utf-8 -*- No newline at end of file |
|
2 | 2 | No newline at end of file |
|
3 | 3 | """ No newline at end of file |
|
4 | 4 | Module implementing MainWindow. No newline at end of file |
|
5 | 5 | """ No newline at end of file |
|
6 | 6 | No newline at end of file |
|
7 | 7 | from PyQt4.QtGui import QMainWindow No newline at end of file |
|
8 | 8 | from PyQt4.QtCore import pyqtSignature No newline at end of file |
|
9 | 9 | from PyQt4 import QtCore No newline at end of file |
|
10 | 10 | from Ui_MainWindow import Ui_MainWindow No newline at end of file |
|
11 | 11 | from Ui_Parameters import Ui_Parameters No newline at end of file |
|
12 | 12 | from Ui_About import Ui_About No newline at end of file |
|
13 | 13 | from PyQt4 import QtGui No newline at end of file |
|
14 | 14 | from subprocess import * No newline at end of file |
|
15 | 15 | import sys No newline at end of file |
|
16 | 16 | import os No newline at end of file |
|
17 | 17 | #import subprocess No newline at end of file |
|
18 | 18 | import time No newline at end of file |
|
19 | 19 | import commands No newline at end of file |
|
20 | 20 | from functions import functions No newline at end of file |
|
21 | 21 | from functions import functions2 No newline at end of file |
|
22 | 22 | No newline at end of file |
|
23 | 23 | class MainWindow(QMainWindow, Ui_MainWindow): No newline at end of file |
|
24 | 24 | """ No newline at end of file |
|
25 | 25 | Class documentation goes here. No newline at end of file |
|
26 | 26 | """ No newline at end of file |
|
27 | 27 | No newline at end of file |
|
28 | 28 | def __init__(self, parent = None): No newline at end of file |
|
29 | 29 | QMainWindow.__init__(self, parent) No newline at end of file |
|
30 | 30 | self.setupUi(self) No newline at end of file |
|
31 | 31 | self.setupUi2() No newline at end of file |
|
32 | 32 | No newline at end of file |
|
33 | 33 | def setupUi2(self): No newline at end of file |
|
34 | 34 | No newline at end of file |
|
35 | 35 | self.txtInfo.append("cambio 1") No newline at end of file |
|
36 | 36 | No newline at end of file |
|
37 | 37 | self.allTrue = False No newline at end of file |
|
38 | 38 | No newline at end of file |
|
39 | 39 | if self.allTrue == True: No newline at end of file |
|
40 | 40 | self.var_real_principal = True No newline at end of file |
|
41 | 41 | self.var_real_detect_devices = True No newline at end of file |
|
42 | 42 | self.var_real_iso = True No newline at end of file |
|
43 | 43 | self.var_real_burn = True No newline at end of file |
|
44 | 44 | self.var_real_check = True No newline at end of file |
|
45 | 45 | self.var_real_eject = True No newline at end of file |
|
46 | 46 | self.var_real_manual_check = True No newline at end of file |
|
47 | 47 | self.var_real_show_cmd = True No newline at end of file |
|
48 | 48 | No newline at end of file |
|
49 | 49 | else: No newline at end of file |
|
50 | 50 | self.var_real_principal = False No newline at end of file |
|
51 | 51 | self.var_real_detect_devices = False No newline at end of file |
|
52 | 52 | self.var_real_iso = False No newline at end of file |
|
53 | 53 | self.var_real_burn = False No newline at end of file |
|
54 | 54 | self.var_real_check = False No newline at end of file |
|
55 | 55 | self.var_real_eject = False No newline at end of file |
|
56 | 56 | self.var_real_manual_check = True No newline at end of file |
|
57 | 57 | self.var_real_show_cmd = True No newline at end of file |
|
58 | 58 | No newline at end of file |
|
59 | 59 | if self.var_real_detect_devices == True: No newline at end of file |
|
60 | 60 | # Reconocimiento de los dispositivos de grabacion No newline at end of file |
|
61 | 61 | functions2.detect_devices(self) No newline at end of file |
|
62 | 62 | else: No newline at end of file |
|
63 | 63 | functions2.set_devices_test(self) No newline at end of file |
|
64 | 64 | No newline at end of file |
|
65 | 65 | #Inicialiazacion de variables No newline at end of file |
|
66 | 66 | self.var_Discs = 0 #Numero de discos del proyecto No newline at end of file |
|
67 | 67 | self.var_Copys = 0 #Numero de copias No newline at end of file |
|
68 | 68 | self.var_disc_n = 0 # disco actual No newline at end of file |
|
69 | 69 | self.var_copy_n = 0 # copia actual No newline at end of file |
|
70 | 70 | self.var_burned_discs = 0 #numero de discos ya grabados No newline at end of file |
|
71 | 71 | No newline at end of file |
|
72 | 72 | self.bool_first_iso = False No newline at end of file |
|
73 | 73 | self.var_step = 0 # numero de paso en el proceso No newline at end of file |
|
74 | 74 | self.bool_state_burning = False #si es True se puede grabar No newline at end of file |
|
75 | 75 | self.blank_discs = False # Si es true significa que se acaban de ingresar discos en blanco No newline at end of file |
|
76 | 76 | No newline at end of file |
|
77 | 77 | self.var_list=[] # Lista de DOYs No newline at end of file |
|
78 | 78 | self.var_sublist=[] # Sub-lista de DOYs seleccionados No newline at end of file |
|
79 | 79 | self.var_devices=[] #Lista de dispositivos seleccionados No newline at end of file |
|
80 | 80 | No newline at end of file |
|
81 | 81 | #Revisa si existe el archivo de confirguracion y lo carga No newline at end of file |
|
82 | 82 | if os.path.isfile("parameters.conf"): No newline at end of file |
|
83 | 83 | functions2.get_parameters_conf(self) No newline at end of file |
|
84 | 84 | self.bool_first_iso = True No newline at end of file |
|
85 | 85 | self.txtInfo.append("Parameters were loaded from configuration file") No newline at end of file |
|
86 | 86 | self.txtInfo.append("Total number of discs for recording: "+str(self.var_Discs * self.var_Copys)) No newline at end of file |
|
87 | 87 | No newline at end of file |
|
88 | 88 | elif self.var_real_principal == False: No newline at end of file |
|
89 | 89 | functions2.set_parameters_test(self) #Establece ciertos parametros, para pruebas No newline at end of file |
|
90 | 90 | No newline at end of file |
|
91 | 91 | functions2.set_vars(self) #Carga las variables de la clase con los parametros seleccionados No newline at end of file |
|
92 | 92 | No newline at end of file |
|
93 | 93 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) No newline at end of file |
|
94 | 94 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) No newline at end of file |
|
95 | 95 | functions.load_days(self) No newline at end of file |
|
96 | 96 | No newline at end of file |
|
97 | 97 | if os.path.isfile("parameters.conf"): No newline at end of file |
|
98 | 98 | functions2.enabled_items1(True, self) #Se bloquean los parametros de configuracion No newline at end of file |
|
99 | 99 | No newline at end of file |
|
100 | 100 | if os.path.isfile("burning.conf"): No newline at end of file |
|
101 | 101 | functions2.get_burning_conf(self) No newline at end of file |
|
102 | 102 | self.txtInfo.append("Current disc: "+str(self.var_disc_n)) No newline at end of file |
|
103 | 103 | self.txtInfo.append("Current copy: "+str(self.var_copy_n)) No newline at end of file |
|
104 | 104 | self.txtInfo.append("Burned discs: "+str(self.var_burned_discs)) No newline at end of file |
|
105 | 105 | self.btnStartburn.setText("Continue") No newline at end of file |
|
106 | 106 | self.actionChange_Parameters.setEnabled(False) No newline at end of file |
|
107 | 107 | No newline at end of file |
|
108 | 108 | self.connect(self.actionChange_Parameters, QtCore.SIGNAL("triggered()"), self.changeParameters) No newline at end of file |
|
109 | 109 | self.connect(self.actionAbout, QtCore.SIGNAL("triggered()"), self.about) No newline at end of file |
|
110 | 110 | No newline at end of file |
|
111 | 111 | self.process_iso = QtCore.QProcess() No newline at end of file |
|
112 | 112 | self.connect(self.process_iso, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput_iso) No newline at end of file |
|
113 | 113 | self.connect(self.process_iso, QtCore.SIGNAL('readyReadStandardError()'), self.readError_iso) No newline at end of file |
|
114 | 114 | self.connect(self.process_iso, QtCore.SIGNAL('finished(int,QProcess::ExitStatus)'), self.finished_iso) No newline at end of file |
|
115 | 115 | No newline at end of file |
|
116 | 116 | self.process_burn = QtCore.QProcess() No newline at end of file |
|
117 | 117 | self.connect(self.process_burn, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput_burn) No newline at end of file |
|
118 | 118 | self.connect(self.process_burn, QtCore.SIGNAL('readyReadStandardError()'), self.readError_burn) No newline at end of file |
|
119 | 119 | self.connect(self.process_burn, QtCore.SIGNAL('finished(int,QProcess::ExitStatus)'), self.finished_burn) No newline at end of file |
|
120 | 120 | No newline at end of file |
|
121 | 121 | self.process_check = QtCore.QProcess() No newline at end of file |
|
122 | 122 | self.connect(self.process_check, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput_check) No newline at end of file |
|
123 | 123 | self.connect(self.process_check, QtCore.SIGNAL('readyReadStandardError()'), self.readError_check) No newline at end of file |
|
124 | 124 | self.connect(self.process_check, QtCore.SIGNAL('finished(int,QProcess::ExitStatus)'), self.finished_check) No newline at end of file |
|
125 | 125 | No newline at end of file |
|
126 | 126 | self.process_manual_check = QtCore.QProcess() No newline at end of file |
|
127 | 127 | self.connect(self.process_manual_check, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput_manual_check) No newline at end of file |
|
128 | 128 | self.connect(self.process_manual_check, QtCore.SIGNAL('readyReadStandardError()'), self.readError_manual_check) No newline at end of file |
|
129 | 129 | self.connect(self.process_manual_check, QtCore.SIGNAL('finished(int,QProcess::ExitStatus)'), self.finished_manual_check) No newline at end of file |
|
130 | 130 | No newline at end of file |
|
131 | 131 | def changeParameters(self): No newline at end of file |
|
132 | 132 | dlg=QtGui.QDialog() No newline at end of file |
|
133 | 133 | dlgui=Ui_Parameters() No newline at end of file |
|
134 | 134 | dlgui.setupUi(dlg) No newline at end of file |
|
135 | 135 | if (dlg.exec_() == QtGui.QDialog.Accepted): No newline at end of file |
|
136 | 136 | if dlgui.txtDisc.value() > self.var_Discs or dlgui.txtCopy.value() > dlgui.txtNcopys.value(): No newline at end of file |
|
137 | 137 | self.txtInfo.append("Wrong parameters") No newline at end of file |
|
138 | 138 | else: No newline at end of file |
|
139 | 139 | self.var_Copys = dlgui.txtNcopys.value() No newline at end of file |
|
140 | 140 | self.var_disc_n = dlgui.txtDisc.value() No newline at end of file |
|
141 | 141 | self.var_copy_n = dlgui.txtCopy.value() No newline at end of file |
|
142 | 142 | self.txtInfo.append("Changed parameters") No newline at end of file |
|
143 | 143 | self.var_burned_discs = ( ( (self.var_disc_n - 1) * self.var_Copys) + self.var_copy_n -1 ) No newline at end of file |
|
144 | 144 | self.bool_first_iso = True No newline at end of file |
|
145 | 145 | self.txtInfo.append("Current disc: "+str(self.var_disc_n)) No newline at end of file |
|
146 | 146 | self.txtInfo.append("Current copy: "+str(self.var_copy_n)) No newline at end of file |
|
147 | 147 | self.txtInfo.append("Nro Copys: "+str(self.var_Copys)) No newline at end of file |
|
148 | 148 | functions2.make_parameters_conf(self) No newline at end of file |
|
149 | 149 | self.txtCopys.setValue(self.var_Copys) #Actualizo mananualmente el valor Copys No newline at end of file |
|
150 | 150 | No newline at end of file |
|
151 | 151 | No newline at end of file |
|
152 | 152 | No newline at end of file |
|
153 | 153 | def about(self): No newline at end of file |
|
154 | 154 | dlg_about=QtGui.QDialog() No newline at end of file |
|
155 | 155 | dlgui_about=Ui_About() No newline at end of file |
|
156 | 156 | dlgui_about.setupUi(dlg_about) No newline at end of file |
|
157 | 157 | dlg_about.exec_() No newline at end of file |
|
158 | 158 | No newline at end of file |
|
159 | 159 | No newline at end of file |
|
160 | 160 | #============================================================================== No newline at end of file |
|
161 | 161 | # Manejo de los eventos No newline at end of file |
|
162 | 162 | #============================================================================== No newline at end of file |
|
163 | 163 | No newline at end of file |
|
164 | 164 | #----------------------------------------------------- Obtencion de la ruta de los datos --------------------------------------------------------------- No newline at end of file |
|
165 | 165 | No newline at end of file |
|
166 | 166 | @pyqtSignature("") No newline at end of file |
|
167 | 167 | def on_btnDpath_clicked(self): No newline at end of file |
|
168 | 168 | """ No newline at end of file |
|
169 | 169 | Permite seleccionar graficamente el direcorio de los datos a grabar No newline at end of file |
|
170 | 170 | """ No newline at end of file |
|
171 | 171 | self.var_Dpath= str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) No newline at end of file |
|
172 | 172 | self.txtDpath.setText(self.var_Dpath) No newline at end of file |
|
173 | 173 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) No newline at end of file |
|
174 | 174 | functions.load_days(self) No newline at end of file |
|
175 | 175 | No newline at end of file |
|
176 | 176 | No newline at end of file |
|
177 | 177 | @pyqtSignature("") No newline at end of file |
|
178 | 178 | def on_txtDpath_editingFinished(self): No newline at end of file |
|
179 | 179 | """ No newline at end of file |
|
180 | 180 | Carga la ruta editada y verifica que sea correcta y carga la lista de dias No newline at end of file |
|
181 | 181 | """ No newline at end of file |
|
182 | 182 | self.var_Dpath=str(self.txtDpath.text()) #Se carga la variable con la ruta recien editada No newline at end of file |
|
183 | 183 | self.statusDpath = functions.dir_exists(self.var_Dpath, self) No newline at end of file |
|
184 | 184 | functions.load_days(self) No newline at end of file |
|
185 | 185 | No newline at end of file |
|
186 | 186 | No newline at end of file |
|
187 | 187 | #----------------------------------------------------- Obtencion de las ruta del proyecto --------------------------------------------------------------- No newline at end of file |
|
188 | 188 | No newline at end of file |
|
189 | 189 | @pyqtSignature("") No newline at end of file |
|
190 | 190 | def on_btnRpath_clicked(self): No newline at end of file |
|
191 | 191 | """ No newline at end of file |
|
192 | 192 | Permite seleccionar graficamente el direcorio del proyecto No newline at end of file |
|
193 | 193 | """ No newline at end of file |
|
194 | 194 | self.var_Rpath = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) No newline at end of file |
|
195 | 195 | self.txtRpath.setText(self.var_Rpath) No newline at end of file |
|
196 | 196 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) No newline at end of file |
|
197 | 197 | No newline at end of file |
|
198 | 198 | No newline at end of file |
|
199 | 199 | @pyqtSignature("") No newline at end of file |
|
200 | 200 | def on_txtRpath_editingFinished(self): No newline at end of file |
|
201 | 201 | """ No newline at end of file |
|
202 | 202 | Valida la ruta del proyecto No newline at end of file |
|
203 | 203 | """ No newline at end of file |
|
204 | 204 | self.var_Rpath = str(self.txtRpath.text()) #Se carga la variable con la ruta recien editada No newline at end of file |
|
205 | 205 | self.statusRpath = functions.dir_exists(self.var_Rpath, self) No newline at end of file |
|
206 | 206 | No newline at end of file |
|
207 | 207 | No newline at end of file |
|
208 | 208 | #----------------------------------------------------- Tipo de datos --------------------------------------------------------------- No newline at end of file |
|
209 | 209 | No newline at end of file |
|
210 | 210 | @pyqtSignature("int") No newline at end of file |
|
211 | 211 | def on_lstDtype_activated(self, index): No newline at end of file |
|
212 | 212 | """ No newline at end of file |
|
213 | 213 | Permite elegir entre los tipos de archivos No newline at end of file |
|
214 | 214 | """ No newline at end of file |
|
215 | 215 | self.txtDtype.setReadOnly(True) No newline at end of file |
|
216 | 216 | if index == 0: No newline at end of file |
|
217 | 217 | self.var_Dtype ='r' No newline at end of file |
|
218 | 218 | elif index == 1: No newline at end of file |
|
219 | 219 | self.var_Dtype ='pdata' No newline at end of file |
|
220 | 220 | elif index == 2: No newline at end of file |
|
221 | 221 | self.var_Dtype ='sswma' No newline at end of file |
|
222 | 222 | else : No newline at end of file |
|
223 | 223 | self.var_Dtype ='' No newline at end of file |
|
224 | 224 | self.txtDtype.setReadOnly(False) No newline at end of file |
|
225 | 225 | No newline at end of file |
|
226 | 226 | self.txtDtype.setText(self.var_Dtype) No newline at end of file |
|
227 | 227 | functions.load_days(self) #llamada a funcion No newline at end of file |
|
228 | 228 | No newline at end of file |
|
229 | 229 | @pyqtSignature("") No newline at end of file |
|
230 | 230 | def on_txtDtype_editingFinished(self): No newline at end of file |
|
231 | 231 | self.var_Dtype=str(self.txtDtype.text()) No newline at end of file |
|
232 | 232 | functions.load_days(self) #llamada a funcion No newline at end of file |
|
233 | 233 | No newline at end of file |
|
234 | 234 | No newline at end of file |
|
235 | 235 | #----------------------------------------------------- Etiqueta --------------------------------------------------------------- No newline at end of file |
|
236 | 236 | No newline at end of file |
|
237 | 237 | @pyqtSignature("") No newline at end of file |
|
238 | 238 | def on_txtElabel_editingFinished(self): No newline at end of file |
|
239 | 239 | self.var_Elabel = str(self.txtElabel.text()) No newline at end of file |
|
240 | 240 | No newline at end of file |
|
241 | 241 | #----------------------------------------------------- Numero de copias --------------------------------------------------------------- No newline at end of file |
|
242 | 242 | @pyqtSignature("") No newline at end of file |
|
243 | 243 | def on_txtCopys_editingFinished(self): No newline at end of file |
|
244 | 244 | self.var_Copys = self.txtCopys.value() No newline at end of file |
|
245 | 245 | No newline at end of file |
|
246 | 246 | #----------------------------------------------------- Seleccion del rango de fechas --------------------------------------------------------------- No newline at end of file |
|
247 | 247 | No newline at end of file |
|
248 | 248 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
249 | 249 | def on_lstStartDay_activated(self, index): No newline at end of file |
|
250 | 250 | """ No newline at end of file |
|
251 | 251 | Cambia la lista de opciones en lstStopDay No newline at end of file |
|
252 | 252 | """ No newline at end of file |
|
253 | 253 | var_StopDay_index=self.lstStopDay.count() - self.lstStopDay.currentIndex() No newline at end of file |
|
254 | 254 | self.lstStopDay.clear() No newline at end of file |
|
255 | 255 | No newline at end of file |
|
256 | 256 | for i in self.var_list[index:]: No newline at end of file |
|
257 | 257 | self.lstStopDay.addItem(i) No newline at end of file |
|
258 | 258 | No newline at end of file |
|
259 | 259 | self.lstStopDay.setCurrentIndex(self.lstStopDay.count() - var_StopDay_index) No newline at end of file |
|
260 | 260 | No newline at end of file |
|
261 | 261 | functions.get_sub_list(self) No newline at end of file |
|
262 | 262 | No newline at end of file |
|
263 | 263 | No newline at end of file |
|
264 | 264 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
265 | 265 | def on_lstStopDay_activated(self, index): No newline at end of file |
|
266 | 266 | """ No newline at end of file |
|
267 | 267 | Cambia la lista de opciones en lstStartDay No newline at end of file |
|
268 | 268 | """ No newline at end of file |
|
269 | 269 | var_StartDay_index=self.lstStartDay.currentIndex() No newline at end of file |
|
270 | 270 | var_end_index = self.lstStopDay.count() - index No newline at end of file |
|
271 | 271 | self.lstStartDay.clear() No newline at end of file |
|
272 | 272 | No newline at end of file |
|
273 | 273 | for i in self.var_list[:len(self.var_list) - var_end_index + 1]: No newline at end of file |
|
274 | 274 | self.lstStartDay.addItem(i) No newline at end of file |
|
275 | 275 | No newline at end of file |
|
276 | 276 | self.lstStartDay.setCurrentIndex(var_StartDay_index) No newline at end of file |
|
277 | 277 | No newline at end of file |
|
278 | 278 | functions.get_sub_list(self) No newline at end of file |
|
279 | 279 | No newline at end of file |
|
280 | 280 | No newline at end of file |
|
281 | 281 | #----------------------------------------------------- Capacidad del dispositivo de grabacion --------------------------------------------------------------- No newline at end of file |
|
282 | 282 | No newline at end of file |
|
283 | 283 | @pyqtSignature("") No newline at end of file |
|
284 | 284 | def on_txtDcapacity_editingFinished(self): No newline at end of file |
|
285 | 285 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file |
|
286 | 286 | No newline at end of file |
|
287 | 287 | No newline at end of file |
|
288 | 288 | @pyqtSignature("int") #CLOSED No newline at end of file |
|
289 | 289 | def on_lstDcapacity_activated(self, index): No newline at end of file |
|
290 | 290 | """ No newline at end of file |
|
291 | 291 | Permite elegir el tamaΓ±o del disco No newline at end of file |
|
292 | 292 | """ No newline at end of file |
|
293 | 293 | if index == 0: No newline at end of file |
|
294 | 294 | var_size=25.0 No newline at end of file |
|
295 | 295 | elif index == 1: No newline at end of file |
|
296 | 296 | var_size=8.5 No newline at end of file |
|
297 | 297 | elif index == 2: No newline at end of file |
|
298 | 298 | var_size=4.7 No newline at end of file |
|
299 | 299 | elif index == 3: No newline at end of file |
|
300 | 300 | var_size=0.7 No newline at end of file |
|
301 | 301 | No newline at end of file |
|
302 | 302 | if index != 4: No newline at end of file |
|
303 | 303 | self.txtDcapacity.setValue(var_size*10**9/1024**2) No newline at end of file |
|
304 | 304 | self.txtDcapacity.setReadOnly(True) No newline at end of file |
|
305 | 305 | else: No newline at end of file |
|
306 | 306 | self.txtDcapacity.setValue(100.0) No newline at end of file |
|
307 | 307 | self.txtDcapacity.setReadOnly(False) No newline at end of file |
|
308 | 308 | No newline at end of file |
|
309 | 309 | self.var_lstDcapacity = self.lstDcapacity.currentIndex() No newline at end of file |
|
310 | 310 | self.var_Dcapacity = self.txtDcapacity.value() No newline at end of file |
|
311 | 311 | No newline at end of file |
|
312 | 312 | #----------------------------------------------------- Testeo de las unidades de grabacion --------------------------------------------------------------- No newline at end of file |
|
313 | 313 | No newline at end of file |
|
314 | 314 | @pyqtSignature("") No newline at end of file |
|
315 | 315 | def on_btnTdevA_clicked(self): No newline at end of file |
|
316 | 316 | var_dev = str(self.txtDeviceA.text()) No newline at end of file |
|
317 | 317 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
318 | 318 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
319 | 319 | No newline at end of file |
|
320 | 320 | @pyqtSignature("") No newline at end of file |
|
321 | 321 | def on_btnTdevB_clicked(self): No newline at end of file |
|
322 | 322 | var_dev = str(self.txtDeviceB.text()) No newline at end of file |
|
323 | 323 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
324 | 324 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
325 | 325 | No newline at end of file |
|
326 | 326 | @pyqtSignature("") No newline at end of file |
|
327 | 327 | def on_btnTdevC_clicked(self): No newline at end of file |
|
328 | 328 | var_dev = str(self.txtDeviceC.text()) No newline at end of file |
|
329 | 329 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
330 | 330 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
331 | 331 | No newline at end of file |
|
332 | 332 | @pyqtSignature("") No newline at end of file |
|
333 | 333 | def on_btnTdevD_clicked(self): No newline at end of file |
|
334 | 334 | var_dev = str(self.txtDeviceD.text()) No newline at end of file |
|
335 | 335 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev No newline at end of file |
|
336 | 336 | commands.getstatusoutput(var_cmd) No newline at end of file |
|
337 | 337 | No newline at end of file |
|
338 | 338 | No newline at end of file |
|
339 | 339 | #============================================================================== No newline at end of file |
|
340 | 340 | # Botones para la generacion de los archivos de configuracion No newline at end of file |
|
341 | 341 | #============================================================================== No newline at end of file |
|
342 | 342 | No newline at end of file |
|
343 | 343 | #----------------------------------------------------- Generacion de la configuracion usando los parametros --------------------------------------------------------------- No newline at end of file |
|
344 | 344 | No newline at end of file |
|
345 | 345 | @pyqtSignature("") No newline at end of file |
|
346 | 346 | def on_btnGbkp_clicked(self): No newline at end of file |
|
347 | 347 | """ No newline at end of file |
|
348 | 348 | Generacion de archivos de configuracion usando los parametros No newline at end of file |
|
349 | 349 | """ No newline at end of file |
|
350 | 350 | No newline at end of file |
|
351 | 351 | if functions.validate_parameters(self) == False: No newline at end of file |
|
352 | 352 | return No newline at end of file |
|
353 | 353 | No newline at end of file |
|
354 | 354 | #Crea las carpetas en la ruta del proyecto y verifica que se crearon correctamente No newline at end of file |
|
355 | 355 | list_dirs=['gpath','iso','ppath', 'tmpdata'] No newline at end of file |
|
356 | 356 | bool_make_dirs = functions.make_dirs(list_dirs, self) No newline at end of file |
|
357 | 357 | if bool_make_dirs == False: No newline at end of file |
|
358 | 358 | return No newline at end of file |
|
359 | 359 | No newline at end of file |
|
360 | 360 | var_files_list = functions.list_files(self) #Se obtiene la lista de archivos a grabar No newline at end of file |
|
361 | 361 | No newline at end of file |
|
362 | 362 | self.var_Discs = functions.make_files_dat(var_files_list, self) #Se crean los archivos .dat No newline at end of file |
|
363 | 363 | No newline at end of file |
|
364 | 364 | functions.make_files_print(self) # Se crean los archivos .print No newline at end of file |
|
365 | 365 | No newline at end of file |
|
366 | 366 | functions2.make_parameters_conf(self) # se crea el archivo parameters.conf No newline at end of file |
|
367 | 367 | No newline at end of file |
|
368 | 368 | self.txtInfo.append("Total number of discs for recording: "+str(self.var_Discs * self.var_Copys)) No newline at end of file |
|
369 | 369 | No newline at end of file |
|
370 | 370 | #Se bloquean los parametros de configuracion No newline at end of file |
|
371 | 371 | functions2.enabled_items1(True, self) No newline at end of file |
|
372 | 372 | self.var_disc_n = 1 No newline at end of file |
|
373 | 373 | self.var_copy_n = 1 No newline at end of file |
|
374 | 374 | self.bool_first_iso = True No newline at end of file |
|
375 | 375 | self.var_burned_discs = 0 #numero de discos grabados No newline at end of file |
|
376 | 376 | No newline at end of file |
|
377 | 377 | No newline at end of file |
|
378 | 378 | #----------------------------------------------------- Permite reiniciar la configuracion --------------------------------------------------------------- No newline at end of file |
|
379 | 379 | No newline at end of file |
|
380 | 380 | @pyqtSignature("") No newline at end of file |
|
381 | 381 | def on_btnRestart_clicked(self): No newline at end of file |
|
382 | 382 | """ No newline at end of file |
|
383 | 383 | Permite que se puedan cambiar los parametros No newline at end of file |
|
384 | 384 | """ No newline at end of file |
|
385 | 385 | if os.path.isfile("parameters.conf"): No newline at end of file |
|
386 | 386 | os.remove("parameters.conf") No newline at end of file |
|
387 | 387 | if os.path.isfile("burning.conf"): No newline at end of file |
|
388 | 388 | os.remove("burning.conf") No newline at end of file |
|
389 | 389 | No newline at end of file |
|
390 | 390 | functions2.enabled_items1(False, self) No newline at end of file |
|
391 | 391 | self.btnStartburn.setText("Start Burn") No newline at end of file |
|
392 | 392 | self.txtInfo.clear() No newline at end of file |
|
393 | 393 | No newline at end of file |
|
394 | 394 | No newline at end of file |
|
395 | 395 | No newline at end of file |
|
396 | 396 | #============================================================================== No newline at end of file |
|
397 | 397 | # Acciones de los procesos No newline at end of file |
|
398 | 398 | #============================================================================== No newline at end of file |
|
399 | 399 | No newline at end of file |
|
400 | 400 | #------------------------------------------------ Funciones del proceso de creacion del iso ------------------------------------------------------ No newline at end of file |
|
401 | 401 | No newline at end of file |
|
402 | 402 | def readOuput_iso(self): No newline at end of file |
|
403 | 403 | self.txtProgress.setText("stdout iso: " + QtCore.QString(self.process_iso.readAllStandardOutput())) No newline at end of file |
|
404 | 404 | No newline at end of file |
|
405 | 405 | def readError_iso(self): No newline at end of file |
|
406 | 406 | self.txtProgress.setText("stderr iso: " + QtCore.QString(self.process_iso.readAllStandardError())) No newline at end of file |
|
407 | 407 | No newline at end of file |
|
408 | 408 | def finished_iso(self): No newline at end of file |
|
409 | 409 | self.txtProgress.clear() No newline at end of file |
|
410 | 410 | No newline at end of file |
|
411 | 411 | if not(self.bool_state_burning): No newline at end of file |
|
412 | 412 | return No newline at end of file |
|
413 | 413 | No newline at end of file |
|
414 | 414 | if self.process_iso.exitCode() == 0: No newline at end of file |
|
415 | 415 | self.txtInfo.append("------Iso file: "+functions.i2s(self.var_disc_n)+" created successfully\n") No newline at end of file |
|
416 | 416 | self.var_step = 1 No newline at end of file |
|
417 | 417 | self.function_burn() No newline at end of file |
|
418 | 418 | No newline at end of file |
|
419 | 419 | else: No newline at end of file |
|
420 | 420 | self.txtInfo.append("#####Error creating iso file "+functions.i2s(self.var_disc_n) No newline at end of file |
|
421 | 421 | +" , code "+QtCore.QString(self.process_iso.exitCode())) No newline at end of file |
|
422 | 422 | self.txtInfo.append("Please check the data") No newline at end of file |
|
423 | 423 | self.txtInfo.append("FATAL ERROR") No newline at end of file |
|
424 | 424 | No newline at end of file |
|
425 | 425 | #----------------------------------------------------- Funciones del proceso de grabado --------------------------------------------------------------- No newline at end of file |
|
426 | 426 | No newline at end of file |
|
427 | 427 | def readOuput_burn(self): No newline at end of file |
|
428 | 428 | self.txtProgress.setText("stdout burn: " + QtCore.QString(self.process_burn.readAllStandardOutput())) No newline at end of file |
|
429 | 429 | No newline at end of file |
|
430 | 430 | def readError_burn(self): No newline at end of file |
|
431 | 431 | self.txtProgress.setText("stderr burn: " + QtCore.QString(self.process_burn.readAllStandardError())) No newline at end of file |
|
432 | 432 | No newline at end of file |
|
433 | 433 | def finished_burn(self): No newline at end of file |
|
434 | 434 | self.txtProgress.clear() No newline at end of file |
|
435 | 435 | No newline at end of file |
|
436 | 436 | #Si se paro el proceso manualmente se termina No newline at end of file |
|
437 | 437 | if not(self.bool_state_burning): No newline at end of file |
|
438 | 438 | return No newline at end of file |
|
439 | 439 | No newline at end of file |
|
440 | 440 | if self.process_burn.exitCode() == 0: No newline at end of file |
|
441 | 441 | self.txtInfo.append("-----Complete recording, disc: "+str(self.var_disc_n)+" copy: "+str(self.var_copy_n)) No newline at end of file |
|
442 | 442 | functions2.update_message(1, "COMPLETED", self) No newline at end of file |
|
443 | 443 | self.var_step = 2 No newline at end of file |
|
444 | 444 | self.function_check() No newline at end of file |
|
445 | 445 | No newline at end of file |
|
446 | 446 | else: No newline at end of file |
|
447 | 447 | self.txtInfo.append("#######Error recording, disc: "+functions.i2s(self.var_disc_n)+" copy: " No newline at end of file |
|
448 | 448 | +functions.i2s(self.var_copy_n)+", code "+QtCore.QString(self.process_burn.exitCode())) No newline at end of file |
|
449 | 449 | functions2.update_message(1, "ERROR", self) No newline at end of file |
|
450 | 450 | No newline at end of file |
|
451 | 451 | functions.is_last_disc_and_copy(self) No newline at end of file |
|
452 | 452 | No newline at end of file |
|
453 | 453 | No newline at end of file |
|
454 | 454 | #----------------------------------------------------- Funciones del proceso de verificacion --------------------------------------------------------------- No newline at end of file |
|
455 | 455 | No newline at end of file |
|
456 | 456 | def readOuput_check(self): No newline at end of file |
|
457 | 457 | self.txtProgress.setText("stdout check: " + QtCore.QString(self.process_check.readAllStandardOutput())) No newline at end of file |
|
458 | 458 | No newline at end of file |
|
459 | 459 | def readError_check(self): No newline at end of file |
|
460 | 460 | self.txtProgress.setText("stderr check: " + QtCore.QString(self.process_check.readAllStandardError())) No newline at end of file |
|
461 | 461 | No newline at end of file |
|
462 | 462 | def finished_check(self): No newline at end of file |
|
463 | 463 | self.txtProgress.clear() No newline at end of file |
|
464 | 464 | No newline at end of file |
|
465 | 465 | if not(self.bool_state_burning): No newline at end of file |
|
466 | 466 | return No newline at end of file |
|
467 | 467 | No newline at end of file |
|
468 | 468 | if self.process_check.exitCode() == 0: No newline at end of file |
|
469 | 469 | self.txtInfo.append("--------Complete checking, disc: "+str(self.var_disc_n)+" copy: "+str(self.var_copy_n)) No newline at end of file |
|
470 | 470 | functions2.update_message(2, "CHECKED", self) No newline at end of file |
|
471 | 471 | No newline at end of file |
|
472 | 472 | else: No newline at end of file |
|
473 | 473 | self.txtInfo.append("#######Error checking, disc: "+functions.i2s(self.var_disc_n)+" copy: " No newline at end of file |
|
474 | 474 | +functions.i2s(self.var_copy_n)+", code "+QtCore.QString(self.process_check.exitCode())) No newline at end of file |
|
475 | 475 | functions2.update_message(2, "ERROR", self) No newline at end of file |
|
476 | 476 | No newline at end of file |
|
477 | 477 | #borrar el contenido de tmpdata No newline at end of file |
|
478 | 478 | var_tmpdata=self.var_Rpath+"/tmpdata" No newline at end of file |
|
479 | 479 | No newline at end of file |
|
480 | 480 | bool_return = functions.remove_dir(var_tmpdata, self) No newline at end of file |
|
481 | 481 | if not(bool_return): No newline at end of file |
|
482 | 482 | self.txtInfo.append("Error deleting directory: "+var_tmpdata) No newline at end of file |
|
483 | 483 | self.bool_state_burning = False No newline at end of file |
|
484 | 484 | return No newline at end of file |
|
485 | 485 | No newline at end of file |
|
486 | 486 | bool_return = functions.make_dir(var_tmpdata, self) No newline at end of file |
|
487 | 487 | if not(bool_return): No newline at end of file |
|
488 | 488 | self.txtInfo.append("Error creating directory:"+ var_tmpdata) No newline at end of file |
|
489 | 489 | self.bool_state_burning = False No newline at end of file |
|
490 | 490 | return No newline at end of file |
|
491 | 491 | No newline at end of file |
|
492 | 492 | functions.is_last_disc_and_copy(self) No newline at end of file |
|
493 | 493 | No newline at end of file |
|
494 | 494 | #----------------------------------------------------- Funciones del proceso de verificacion manual --------------------------------------------------------------- No newline at end of file |
|
495 | 495 | No newline at end of file |
|
496 | 496 | def readOuput_manual_check(self): No newline at end of file |
|
497 | 497 | self.txtProgress.setText("stdout check: " + QtCore.QString(self.process_manual_check.readAllStandardOutput())) No newline at end of file |
|
498 | 498 | No newline at end of file |
|
499 | 499 | def readError_manual_check(self): No newline at end of file |
|
500 | 500 | self.txtProgress.setText("stderr check: " + QtCore.QString(self.process_manual_check.readAllStandardError())) No newline at end of file |
|
501 | 501 | No newline at end of file |
|
502 | 502 | def finished_manual_check(self): No newline at end of file |
|
503 | 503 | self.txtProgress.clear() No newline at end of file |
|
504 | 504 | No newline at end of file |
|
505 | 505 | if not(self.bool_state_manual_check): No newline at end of file |
|
506 | 506 | return No newline at end of file |
|
507 | 507 | No newline at end of file |
|
508 | 508 | if self.process_manual_check.exitCode() == 0: No newline at end of file |
|
509 | 509 | self.txtInfo.append("--------Complete checking, disc: "+str(self.var_n_check_dirs + 1)) No newline at end of file |
|
510 | 510 | functions2.update_message(2, "CHECKED", self, index=self.var_n_check_dirs) No newline at end of file |
|
511 | 511 | No newline at end of file |
|
512 | 512 | else: No newline at end of file |
|
513 | 513 | self.txtInfo.append("#######Error checking, disc: "+str(self.var_n_check_dirs + 1) No newline at end of file |
|
514 | 514 | +", code "+QtCore.QString(self.process_manual_check.exitCode())) No newline at end of file |
|
515 | 515 | functions2.update_message(2, "ERROR", self, index=self.var_n_check_dirs) No newline at end of file |
|
516 | 516 | No newline at end of file |
|
517 | 517 | #borrar el contenido de tmpdata No newline at end of file |
|
518 | 518 | var_tmpdata=self.var_TDpath+"/tmpdata" No newline at end of file |
|
519 | 519 | No newline at end of file |
|
520 | 520 | bool_return = functions.remove_dir(var_tmpdata, self) No newline at end of file |
|
521 | 521 | if not(bool_return): No newline at end of file |
|
522 | 522 | self.txtInfo.append("Error deleting directory: "+var_tmpdata) |
|
523 | No newline at end of file | |
|
523 | self.bool_state_burning = False | |
|
No newline at end of file | ||
|
524 | No newline at end of file | |
|
524 | return | |
|
No newline at end of file | ||
|
525 | ||
|
No newline at end of file | ||
|
526 | No newline at end of file | |
|
527 | 525 | No newline at end of file |
|
528 | 526 | self.var_n_check_dirs +=1 No newline at end of file |
|
529 | 527 | No newline at end of file |
|
530 | 528 | if self.var_n_check_dirs >= len(self.list_check_dirs) : No newline at end of file |
|
531 | 529 | self.bool_state_manual_check = False No newline at end of file |
|
532 | 530 | self.function_manual_check_final() No newline at end of file |
|
533 | 531 | return No newline at end of file |
|
534 | 532 |
|
|
535 | 533 | No newline at end of file |
|
536 | 534 | self.function_manual_check() No newline at end of file |
|
537 | 535 | No newline at end of file |
|
538 | 536 | No newline at end of file |
|
539 | 537 | #============================================================================== No newline at end of file |
|
540 | 538 | # Botones para el proceso de grabacion No newline at end of file |
|
541 | 539 | #============================================================================== No newline at end of file |
|
542 | 540 | No newline at end of file |
|
543 | 541 | #----------------------------------------------------- Iniciar proceso de grabacion --------------------------------------------------------------- No newline at end of file |
|
544 | 542 | No newline at end of file |
|
545 | 543 | @pyqtSignature("") No newline at end of file |
|
546 | 544 | def on_btnStartburn_clicked(self): No newline at end of file |
|
547 | 545 | """ No newline at end of file |
|
548 | 546 | Se inicia el proceso de grabacion No newline at end of file |
|
549 | 547 | """ No newline at end of file |
|
550 | 548 | #Verifica que exista algun dispositivo de grabacion seleccionado No newline at end of file |
|
551 | 549 | if not(functions2.selected_devices(self)): No newline at end of file |
|
552 | 550 | self.txtInfo.append("There is no recording device selected") No newline at end of file |
|
553 | 551 | return No newline at end of file |
|
554 | 552 | No newline at end of file |
|
555 | 553 | # #Lista los dispositivos de grabacion a usar No newline at end of file |
|
556 | 554 | # for dev in self.var_devices: No newline at end of file |
|
557 | 555 | # self.txtInfo.append("recording device :"+dev) No newline at end of file |
|
558 | 556 | No newline at end of file |
|
559 | 557 | self.bool_state_burning = True No newline at end of file |
|
560 | 558 | functions2.enabled_items2(True, self) No newline at end of file |
|
561 | 559 | No newline at end of file |
|
562 | 560 | if self.bool_first_iso == True: No newline at end of file |
|
563 | 561 | self.txtInfo.append("BUTTON: on_btnStartburn_clicked") No newline at end of file |
|
564 | 562 |
self. |
|
565 | 563 | self.function_eject() No newline at end of file |
|
566 | 564 | return No newline at end of file |
|
567 | 565 | No newline at end of file |
|
568 | 566 | if self.var_step == 0: No newline at end of file |
|
569 | 567 |
|
|
570 | 568 |
|
|
571 | 569 | No newline at end of file |
|
572 | 570 | if self.var_step == 1: No newline at end of file |
|
573 | 571 |
|
|
574 | 572 |
|
|
575 | 573 | No newline at end of file |
|
576 | 574 | #----------------------------------------------------- Funcion para el grabado --------------------------------------------------------------- No newline at end of file |
|
577 | 575 | No newline at end of file |
|
578 | 576 | def function_iso(self): No newline at end of file |
|
579 | 577 | #Creacion del archivo.iso para la grabacion No newline at end of file |
|
580 | 578 | if self.var_step == 0: No newline at end of file |
|
581 | 579 |
self.txtInfo.append(" |
|
582 | 580 | self.txtInfo.append("------Creating iso file number: "+str(self.var_disc_n)) No newline at end of file |
|
583 | 581 | No newline at end of file |
|
584 | 582 | var_cmd = functions.cmd_iso(self) No newline at end of file |
|
585 | 583 | No newline at end of file |
|
586 | 584 | if self.var_real_show_cmd == True: No newline at end of file |
|
587 | 585 | self.txtInfo.append("CMD: "+var_cmd) No newline at end of file |
|
588 | 586 | No newline at end of file |
|
589 | 587 | if self.var_real_iso == False: No newline at end of file |
|
590 | 588 |
|
|
591 | 589 | var_cmd="echo 'function_iso'" No newline at end of file |
|
592 | 590 | No newline at end of file |
|
593 | 591 | self.process_iso.start(var_cmd) No newline at end of file |
|
594 | 592 | No newline at end of file |
|
595 | 593 | def function_burn(self): No newline at end of file |
|
596 | 594 | #Grabacion de los DVDs No newline at end of file |
|
597 | 595 | No newline at end of file |
|
598 | 596 | if self.var_step == 1: No newline at end of file |
|
599 | 597 | self.txtInfo.append("------Recording disc: "+str(self.var_disc_n)+", copy:"+str(self.var_copy_n)) No newline at end of file |
|
600 | 598 | functions2.update_message(1, "BURNING", self) No newline at end of file |
|
601 | 599 | No newline at end of file |
|
602 | 600 | var_cmd = functions.cmd_burn(self) No newline at end of file |
|
603 | 601 | No newline at end of file |
|
604 | 602 | if self.var_real_show_cmd == True: No newline at end of file |
|
605 | 603 | self.txtInfo.append("CMD: "+var_cmd) No newline at end of file |
|
606 | 604 | No newline at end of file |
|
607 | 605 | if self.var_real_burn == False: No newline at end of file |
|
608 | 606 |
|
|
609 | 607 | var_cmd="echo 'function_burn'" No newline at end of file |
|
610 | 608 | No newline at end of file |
|
611 | 609 | self.process_burn.start(var_cmd) No newline at end of file |
|
612 | 610 | No newline at end of file |
|
613 | 611 | def function_check(self): No newline at end of file |
|
614 | 612 | #Verificacion de los discos No newline at end of file |
|
615 | 613 | if self.var_step == 2: No newline at end of file |
|
616 | 614 | self.txtInfo.append("-----------checking disc:"+str(self.var_disc_n)+", copy:"+str(self.var_copy_n)) No newline at end of file |
|
617 | 615 | No newline at end of file |
|
618 | 616 | functions2.eject_one_device(self) No newline at end of file |
|
619 | 617 | functions2.eject_t_one_device(self) No newline at end of file |
|
620 | 618 | self.txtInfo.append("Waiting ...") No newline at end of file |
|
621 | 619 |
|
|
622 | 620 | No newline at end of file |
|
623 | 621 | functions2.update_message(2, "CHECKING", self) No newline at end of file |
|
624 | 622 | No newline at end of file |
|
625 | 623 |
|
|
626 | 624 | var_cmd = functions.cmd_check(dev_sr, self) No newline at end of file |
|
627 | 625 | No newline at end of file |
|
628 | 626 | if self.var_real_show_cmd == True: No newline at end of file |
|
629 | 627 | self.txtInfo.append("CMD: "+var_cmd) No newline at end of file |
|
630 | 628 | No newline at end of file |
|
631 | 629 | if self.var_real_check == False: No newline at end of file |
|
632 | 630 |
|
|
633 | 631 | var_cmd="echo 'function_check'" No newline at end of file |
|
634 | 632 | No newline at end of file |
|
635 | 633 | self.process_check.start(var_cmd) No newline at end of file |
|
636 | 634 | No newline at end of file |
|
637 | 635 | #OK No newline at end of file |
|
638 | 636 | def function_eject(self): No newline at end of file |
|
639 | 637 |
self.txtInfo.append(" |
|
640 | 638 | self.txtInfo.append("Please insert blank discs") No newline at end of file |
|
641 | 639 | No newline at end of file |
|
642 | 640 | if self.var_real_eject == True: No newline at end of file |
|
643 | 641 | functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion No newline at end of file |
|
644 | 642 | else: No newline at end of file |
|
645 | 643 | self.txtInfo.append("**functions2.eject_devices") No newline at end of file |
|
646 | 644 | No newline at end of file |
|
647 | 645 |
self.btnStartburn.set |
|
648 | 646 | self.btnStartburn.setEnabled(True) No newline at end of file |
|
649 | 647 | No newline at end of file |
|
650 | 648 |
|
|
651 | 649 |
self. |
|
652 | 650 | self.var_step = 0 No newline at end of file |
|
653 | 651 | No newline at end of file |
|
654 | 652 |
|
|
655 | 653 | self.var_step = 0 No newline at end of file |
|
656 | 654 |
|
|
657 | 655 | else: No newline at end of file |
|
658 | 656 | self.var_step = 1 No newline at end of file |
|
659 | 657 | No newline at end of file |
|
660 | 658 | def function_final(self): No newline at end of file |
|
661 | 659 | self.txtInfo.append("Recording process is complete") No newline at end of file |
|
662 | 660 |
|
|
663 | 661 | os.remove("parameters.conf") No newline at end of file |
|
664 | 662 |
|
|
665 | 663 | os.remove("burning.conf") No newline at end of file |
|
664 | functions2.eject_devices(self) # Expulsa las bandejas de los dispostivos de grabacion | |
|
No newline at end of file | ||
|
665 | ||
|
No newline at end of file | ||
|
666 | No newline at end of file | |
|
666 | 667 | No newline at end of file |
|
667 | 668 | No newline at end of file |
|
668 | 669 | No newline at end of file |
|
669 | 670 | #----------------------------------------------------- Detener proceso de grabacion --------------------------------------------------------------- No newline at end of file |
|
670 | 671 | No newline at end of file |
|
671 | 672 | @pyqtSignature("") No newline at end of file |
|
672 | 673 | def on_btnStopburn_clicked(self): No newline at end of file |
|
673 | 674 | """ No newline at end of file |
|
674 | 675 | Slot documentation goes here. No newline at end of file |
|
675 | 676 | """ No newline at end of file |
|
676 | 677 | self.bool_state_burning = False No newline at end of file |
|
677 | 678 | No newline at end of file |
|
678 | 679 | if self.var_step == 0: No newline at end of file |
|
679 | 680 | self.process_iso.terminate() #Termina el proceso, si puede No newline at end of file |
|
680 | 681 | # self.process_iso.kill() #Mata el proceso, no es la forma adecuada, solo usar si terminate() no funciona No newline at end of file |
|
681 | 682 | elif self.var_step == 1: No newline at end of file |
|
682 | 683 | self.process_burn.terminate() No newline at end of file |
|
683 | 684 | elif self.var_step == 2: No newline at end of file |
|
684 | 685 | self.process_check.terminate() No newline at end of file |
|
685 | 686 | No newline at end of file |
|
686 | 687 | self.txtInfo.append("Stopped recording") No newline at end of file |
|
687 | 688 | functions2.enabled_items2(False, self) No newline at end of file |
|
688 | 689 | self.bool_first_iso = True No newline at end of file |
|
689 | 690 | No newline at end of file |
|
690 | 691 | No newline at end of file |
|
691 | 692 | No newline at end of file |
|
692 | 693 | #============================================================================== No newline at end of file |
|
693 | 694 | # Proceso verificacion manual No newline at end of file |
|
694 | 695 | #============================================================================== No newline at end of file |
|
695 | 696 | No newline at end of file |
|
696 | 697 | No newline at end of file |
|
697 | 698 | #----------------------------------------------------- Proceso de verificaion manual --------------------------------------------------------------- No newline at end of file |
|
698 | 699 | No newline at end of file |
|
699 | 700 | No newline at end of file |
|
700 | 701 | @pyqtSignature("") No newline at end of file |
|
701 | 702 | def on_btnTDpath_clicked(self): No newline at end of file |
|
702 | 703 | """ No newline at end of file |
|
703 | 704 | Slot documentation goes here. No newline at end of file |
|
704 | 705 | """ No newline at end of file |
|
705 | 706 | self.var_TDpath= str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) No newline at end of file |
|
706 | 707 |
self. |
|
707 | 708 | self.statusTDpath = functions.dir_exists(self.var_TDpath, self) No newline at end of file |
|
708 | 709 | if self.statusTDpath: No newline at end of file |
|
709 | 710 | self.btnCHstart.setEnabled(True) No newline at end of file |
|
710 | 711 | No newline at end of file |
|
711 | 712 | No newline at end of file |
|
712 | 713 | @pyqtSignature("") No newline at end of file |
|
713 | 714 | def on_btnCHstart_clicked(self): No newline at end of file |
|
714 | 715 | """ No newline at end of file |
|
715 | 716 | Slot documentation goes here. No newline at end of file |
|
716 | 717 |
|
|
718 | if self.btnCHstart.text() == "STOP": | |
|
No newline at end of file | ||
|
719 | self.btnCHstart.setText("START") #Cambio el texto del boton | |
|
No newline at end of file | ||
|
720 | self.bool_state_manual_check = False | |
|
No newline at end of file | ||
|
721 | self.process_manual_check.terminate() | |
|
No newline at end of file | ||
|
722 | ||
|
No newline at end of file | ||
|
723 | #borrar el contenido de tmpdata | |
|
No newline at end of file | ||
|
724 | var_tmpdata=self.var_TDpath+"/tmpdata" | |
|
No newline at end of file | ||
|
725 | bool_return = functions.remove_dir(var_tmpdata, self) | |
|
No newline at end of file | ||
|
726 | if not(bool_return): | |
|
No newline at end of file | ||
|
727 | self.txtInfo.append("Error deleting directory: "+var_tmpdata) | |
|
No newline at end of file | ||
|
728 | ||
|
No newline at end of file | ||
|
729 | return | |
|
No newline at end of file | ||
|
730 | ||
|
No newline at end of file | ||
|
731 | ||
|
No newline at end of file | ||
|
732 | list_dirs = functions2.mounted_devices() No newline at end of file | |
|
717 | 733 | list_dirs = functions2.mounted_devices() No newline at end of file |
|
718 | 734 | if list_dirs == "FATAL ERROR": No newline at end of file |
|
719 | 735 | self.txtInfo.append("ERROR") No newline at end of file |
|
720 | 736 |
|
|
721 | 737 | No newline at end of file |
|
722 | 738 | for i in list_dirs: No newline at end of file |
|
723 | 739 | self.txtInfo.append(i) No newline at end of file |
|
724 | 740 | No newline at end of file |
|
725 | 741 | self.list_check_dirs = list_dirs #contiene los directorios donde estan montados los discos a verificar No newline at end of file |
|
726 | 742 |
self. |
|
727 | 743 | self.bool_state_manual_check = True No newline at end of file |
|
728 | 744 | No newline at end of file |
|
729 | 745 | self.btnTDpath.setEnabled(False) #Deshabilito el boton que permite cambiar la ruta de verificacion No newline at end of file |
|
730 | 746 | self.btnCHstart.setText("STOP") #Cambio el texto del boton |
|
No newline at end of file | ||
|
731 | self.txtInfo.append(self.btnCHstart.text()) No newline at end of file | |
|
732 | 747 | No newline at end of file |
|
733 | 748 | self.function_manual_check() No newline at end of file |
|
734 | 749 | No newline at end of file |
|
735 | 750 | No newline at end of file |
|
736 | 751 | def function_manual_check(self): No newline at end of file |
|
737 | 752 | No newline at end of file |
|
738 | 753 | #Verificacion de los discos No newline at end of file |
|
739 | 754 | if self.bool_state_manual_check == True: No newline at end of file |
|
740 | 755 | No newline at end of file |
|
741 | 756 | self.txtInfo.append("-----------manually checking disc: "+str(self.var_n_check_dirs + 1) No newline at end of file |
|
742 | 757 | +" directory: "+self.list_check_dirs[self.var_n_check_dirs]) No newline at end of file |
|
743 | 758 | No newline at end of file |
|
744 | 759 | functions2.update_message(2, "CHECKING", self, index=self.var_n_check_dirs) No newline at end of file |
|
745 | 760 | No newline at end of file |
|
746 | 761 | #Crea la carpeta tmpdata dentro de la ruta elegida No newline at end of file |
|
747 | 762 | var_tmpdata=self.var_TDpath+"/tmpdata" No newline at end of file |
|
748 | 763 | bool_return = functions.make_dir(var_tmpdata, self) No newline at end of file |
|
749 | 764 | if not(bool_return): No newline at end of file |
|
750 | 765 | self.txtInfo.append("Error creating directory:"+ var_tmpdata) No newline at end of file |
|
751 | 766 |
|
|
752 | 767 | return No newline at end of file |
|
753 | 768 | No newline at end of file |
|
754 | 769 | var_data_dir = self.list_check_dirs[self.var_n_check_dirs] #Carpeta donde esta montado el disco actual No newline at end of file |
|
755 | 770 | No newline at end of file |
|
756 | 771 | var_cmd = functions.cmd_manual_check(var_data_dir, var_tmpdata) No newline at end of file |
|
757 | 772 | No newline at end of file |
|
758 | 773 | if self.var_real_show_cmd == True: No newline at end of file |
|
759 | 774 | self.txtInfo.append("CMD: "+var_cmd) No newline at end of file |
|
760 | 775 | No newline at end of file |
|
761 | 776 | if self.var_real_manual_check == False: No newline at end of file |
|
762 | 777 |
|
|
763 | 778 | var_cmd="echo 'function_manual_check'" No newline at end of file |
|
764 | 779 | No newline at end of file |
|
765 | 780 | self.process_manual_check.start(var_cmd) No newline at end of file |
|
766 | 781 | No newline at end of file |
|
767 | 782 | No newline at end of file |
|
768 | 783 | def function_manual_check_final(self): No newline at end of file |
|
769 | 784 | self.txtInfo.append("Manual check process is complete") No newline at end of file |
|
770 | 785 | self.btnCHstart.setText("START") #Cambio el texto del boton |
|
786 | No newline at end of file | |
|
771 | ||
|
No newline at end of file | ||
|
772 | No newline at end of file |
General Comments 0
You need to be logged in to leave comments.
Login now