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