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