##// END OF EJS Templates
funciones ok, botones ok...
ralonso -
r46:47
parent child
Show More
@@ -1,100 +1,213
1 1 # -*- coding: utf-8 -*-
2 2
3 3 #class BKmanager:
4 4 # def __init__(self):
5 5
6 6 from subprocess import *
7 7 import sys
8 8 import os
9 9 import subprocess
10 10 import commands
11 11
12 12
13 13 #Entero a cadena agregando ceros delante
14 14 def i2s(var_n, var_length=4):
15 15 var_n2=str(var_n)
16 16 while len(var_n2) < var_length:
17 17 var_n2 = "0"+var_n2
18 18 return var_n2
19 19
20 20
21 21 #Crea directorios en la ruta indicada
22 def make_dirs(var_path, list_dirs, self):
23 var_cmd="mkdir -p "+str(var_path)
22 def make_dirs(list_dirs, self):
23 var_cmd="mkdir -p "+str(self.var_Rpath)
24 24 for var_dir in list_dirs:
25 25 var_output=commands.getstatusoutput(var_cmd+'/'+var_dir)[0]
26 print var_cmd+'/'+var_dir
27 26 if var_output != 0:
28 27 self.txtInfo.append("Error al crear el directorio "+var_dir+", output_error:" + str(var_output))
29 return
30 else:
31 self.txtInfo.append('Carpetas creadas correctamente')
28 return False
29 self.txtInfo.append('Carpetas creadas correctamente')
30 return True
32 31
33 32
34 33 #Se verifica que la ruta exista y sea un directorio
35 34 def dir_exists(var_dir, self):
36 35 var_cmd="test -d "+str(var_dir)
37 36 var_output=commands.getstatusoutput(var_cmd)[0]
38 37 if var_output != 0:
39 38 self.txtInfo.append("Ruta no valida, output_error:" + str(var_output))
40 39 return False
41 40 else:
42 41 self.txtInfo.append("Ruta valida, sin error:" + str(var_dir))
43 42 return True
44 43
45 44
46 45 #Se buscan los archivos del tipo especificado
47 46 def load_days(self):
48 47
49 48 self.var_list=[]
50 49 self.lstStartDay.clear()
51 50 self.lstStopDay.clear()
52 51
53 52 if self.statusDpath == False:
54 53 self.btnGbkp.setEnabled(False)
55 54 return
56 55
57 56 var_cmd="find " + str(self.var_Dpath) + " -name *."+ str(self.var_Dtype) +" | awk -F/ '{print substr($NF,2,7)}' | sort| uniq"
58 57 output=commands.getstatusoutput(var_cmd)[1]
59 58
60 59 #Si no se encuentra ningun archivo
61 60 if len(output) == 0:
62 61 self.txtInfo.append("No se encontraron archivos")
63 62 self.btnGbkp.setEnabled(False)
64 63 return
65 64
66 65 #Se cargan las listas para seleccionar StartDay y StopDay (QComboBox)
67 66 for i in range(0, (len(output)+1)/8):
68 67 self.var_list.append(output[8*i:8*(i+1)-1])
69 68
70 69 for i in self.var_list:
71 70 self.lstStartDay.addItem(i)
72 71 self.lstStopDay.addItem(i)
73 72 self.lstStopDay.setCurrentIndex(self.lstStartDay.count()-1)
74 73
74 get_sub_list(self)
75 75 self.btnGbkp.setEnabled(True)
76 76
77 77
78 78 #Verifica que los parametros
79 79 def validate_parameters(self):
80 80 #Verifica que las rutas sean validas
81 81 if self.statusRpath == False:
82 82 self.txtInfo.append("Ruta de proyecto no valida")
83 83 return False
84 84
85 85 #Verifica la etiqueta
86 86 if len(self.var_Elabel) == 0:
87 87 self.txtInfo.append("Debe ingresar el nombre de la etiqueta")
88 88 return False
89 89
90 90 return True
91 91
92 92
93 #Obtiene el rango de las fechas seleccionadas
93 94 def get_sub_list(self):
94 95 self.var_sublist=[]
95 96 for i in self.var_list[self.lstStartDay.currentIndex():self.lstStartDay.currentIndex() + self.lstStopDay.currentIndex()+1]:
96 97 self.var_sublist.append(i)
97 98 if len(self.var_sublist) == 0:
98 99 self.txtInfo.append("No existen archivos encontrados")
99 100
100 101
102 #Busca los archivos con los parametros de busqueda
103 def list_files(self):
104 var_files_list=[]
105 for var_doy in self.var_sublist:
106 var_cmd="find " + str(self.var_Dpath) + " -name ?"+var_doy+"???."+ str(self.var_Dtype) + " |sort"
107 var_output=commands.getstatusoutput(var_cmd)[1]
108 for var_file in var_output.split():
109 var_files_list.append(var_file) #Almacena cada archivo en la lista
110 return var_files_list
111
112
113 #Genera la lista de archivos .dat que contienen los archivos a grabar en cada DVD
114 def make_files_dat(var_files_list, self):
115 var_Rpath_ppath=self.var_Rpath+"/ppath" #Ruta de los archivos a grabar
116 var_n=1 #Numero del DVD actual
117 var_tmp=0 #Se usa para acumular el tamaΓ±o de los archivos de la lista
118 var_files_list_2=[] #Se usa para almacenar la lista de archivos agrbar en cada DVD
119
120 for i in var_files_list: #Se asignan en i los archivos de la lista
121 self.txtInfo.append(i)
122 var_size_i=os.path.getsize(i)/1024+1 #tamaΓ±o en KB del archivo de la lista, se suma 1 KB para evitar problemas al momento de sumar
123 var_tmp += var_size_i #Se acumulan el tamaΓ±o de los archivos de la lista
124
125 #Si el tamaΓ±o acumulado es mayor que el de el DVD
126 if var_tmp > self.var_Dcapacity:
127 var_tmp -= var_size_i #se quita el tamaΓ±o sumado para mostrar el tamaΓ±o real
128 #se crea un archivo con numeral en el sufijo y extension .dat
129 var_file = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".dat","w")
130 #Se aΓ±ade la lista de archivos a grabar en el DVD al archivo .dat
131 for line in var_files_list_2:
132 var_tmp_path=(line.split(self.var_Dpath)[1]).split('/')
133 var_tmp_path2="/"
134 for l in range(0, len(var_tmp_path)-1):
135 var_tmp_path2=var_tmp_path2+str(var_tmp_path[l])+"/"
136 var_file.write(var_tmp_path2+'=')
137 var_file.write(line+'\n')
138 var_file.close()
139
140 var_tmp = var_size_i #Se asigna a la variable el tamaΓ±o del archivo actual
141 var_files_list_2=[] #Se reinicia la lista
142 var_n += 1
143 var_files_list_2.append(i)
144
145 #se crea un archivo con numeral en el sufijo y extension .dat
146 var_file = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".dat","w")
147 #Se aΓ±ade la lista de archivos a grabar en el DVD al archivo .dat
148 for line in var_files_list_2:
149 var_tmp_path=(line.split(self.var_Dpath)[1]).split('/')
150 var_tmp_path2="/"
151 for l in range(0, len(var_tmp_path)-1):
152 var_tmp_path2=var_tmp_path2+str(var_tmp_path[l])+"/"
153 var_file.write(var_tmp_path2+'=')
154 var_file.write(line+'\n')
155 var_file.close()
156
157 return var_n
158
159
160 #Genera los archivos .print con los cuales se creara los postscript
161 def make_files_print(self):
162
163 var_Rpath_ppath=self.var_Rpath+"/ppath" #Ruta de los archivos a grabar
164
165 # Se leen todos los archivos .dat creados para crear las etiquetas en los archivos .print
166 for var_n in range(1, self.var_n_discs + 1):
167 #se abren los archivos .dat en modo lectura
168 var_file = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".dat","r")
169 lines=var_file.readlines() # Se lee las lineas en el archivo y se almacenan en la lista
170 # Se crea el archivo .print
171 var_file_print = open(var_Rpath_ppath+"/"+self.var_Elabel+"_"+i2s(var_n)+".print","w")
172 var_file_print.write(self.var_Elabel+" "+i2s(var_n)+"/"+i2s(self.var_n_discs)+"\n")
173 var_file_print.write("Year Doy Folder Set Time range\n")
174
175 var_first_folder = lines[0].split('=')[0]
176 var_first_file = (lines[0].split('=')[1])[:-1]
177 var_date_first_file=commands.getstatusoutput("date -r "+var_first_file+" +'%T'")[1]
178
179 for j in range(1, len(lines)-1):
180 var_tmp_folder = lines[j].split('=')[0]
181 var_tmp_file = (lines[j].split('=')[1])[:-1]
182
183 # Si el subfolder superior o la fecha del archivo cambia se genera una nueva linea
184 if (var_tmp_folder != var_first_folder) or (var_tmp_file[0:-5] != var_first_file[0:-5]):
185 var_last_file = (lines[j-1].split('=')[1])[:-1]
186 var_date_last_file=commands.getstatusoutput("date -r "+var_last_file+" +'%T'")[1]
187 # Si el archivo se grabara directamente en la / del DVD y no en un /directorio/
188 # se usa la etiqueta para indicar la parte de la etiqueta donde va el subdirectorio
189 if var_first_folder == '/':
190 var_folder = self.var_Elabel
191 else:
192 var_folder = var_first_folder.split('/')[1]
193
194 var_file_print.write(var_first_file[-12:-8]+" "+var_first_file[-8:-5]+" "+var_folder +" "+var_first_file[-5:-2]+" "
195 +var_last_file[-5:-2]+" "+var_date_first_file+" "+var_date_last_file+"\n")
196
197 var_first_folder = lines[j].split('=')[0]
198 var_first_file = (lines[j].split('=')[1])[:-1]
199 var_date_first_file=commands.getstatusoutput("date -r "+var_first_file+" +'%T'")[1]
200
201 var_last_file = (lines[-1].split('=')[1])[:-1]
202 var_date_last_file=commands.getstatusoutput("date -r "+var_last_file+" +'%T'")[1]
203
204 if var_first_folder == '/':
205 var_folder = self.txtElabel.text()
206 else:
207 var_folder = var_first_folder.split('/')[1]
208
209 var_file_print.write(var_first_file[-12:-8]+" "+var_first_file[-8:-5]+" "+var_folder +" "+var_first_file[-5:-2]+" "
210 +var_last_file[-5:-2]+" "+var_date_first_file+" "+var_date_last_file+"\n")
211
212 var_file.close()
213 var_file_print.close()
@@ -1,65 +1,67
1 1 # -*- coding: utf-8 -*-
2 2
3 3
4 4 from subprocess import *
5 5 import sys
6 6 import os
7 7 import subprocess
8 8 import commands
9 9
10 10
11 11 def set_parameters(self):
12 12 """
13 13 Se usa para inicializar ciertos parametros para pruebas
14 14 """
15 15 #self.txtDpath.setText('/home/ricardoar/optional/STORAGE/Data/RAW_EXP/JASMET/')
16 16 #self.txtRpath.setText('/home/ricardoar/optional/STORAGE/prueba1_jro_backup_manager/')
17 17 self.txtDpath.setText('/home/ricardoar/optional/STORAGE/EW_DRIFTS/')
18 18 self.txtRpath.setText('/home/ricardoar/optional/prueba1_jro_backup_manager/')
19 19 self.txtElabel.setText('EW_DRIFTS')
20 20 self.statusDpath = True
21 21 self.statusRpath = True
22 self.var_n_files=0
22 self.lstDcapacity.setCurrentIndex(4)
23 self.txtDcapacity.setValue(100.0)
24 self.txtDcapacity.setReadOnly(False)
23 25
24 26
25 27 def detect_devices(self):
26 28 """
27 29 Deteccion de los dispositvos de grabacion
28 30 """
29 31 #var_cmd="wodim --devices | grep /dev/ | awk -F\' '{print $2}'" #Funciona en consola pero no en python ΒΏ?
30 32 var_cmd="wodim --devices | grep /dev/ | awk '{print $2}' | awk -F= '{print $2}'"
31 33 var_output = commands.getstatusoutput(var_cmd)
32 34 if var_output[0] != 0:
33 35 self.txtInfo.append("No se pudo encontrar los dispositivos de grabacion, output_error:" + str(var_output))
34 36 else:
35 37 self.txtInfo.append("dispositivos encontrados")
36 38 var_devices = var_output[1].split('\n')
37 39
38 40 var_tmp=[]
39 41 for i in range(0, 4):
40 42 if i < len(var_devices):
41 43 var_len = len(var_devices[i])
42 44 var_tmp.append(var_devices[i][1:var_len - 1])
43 45 else:
44 46 var_tmp.append('')
45 47
46 48 #Se escriben los dispostivos correspodientes, si existen
47 49 self.txtDeviceA.setText(str(var_tmp[0]))
48 50 self.txtDeviceB.setText(str(var_tmp[1]))
49 51 self.txtDeviceC.setText(str(var_tmp[2]))
50 52 self.txtDeviceD.setText(str(var_tmp[3]))
51 53 #Se desactivan los que no existen
52 54 if len(var_tmp[0]) == 0 :
53 55 self.chkDevA.setChecked(False)
54 56 self.chkDevA.setEnabled(False)
55 57 if len(var_tmp[1]) == 0 :
56 58 self.chkDevB.setChecked(False)
57 59 self.chkDevB.setEnabled(False)
58 60 if len(var_tmp[2]) == 0 :
59 61 self.chkDevC.setChecked(False)
60 62 self.chkDevC.setEnabled(False)
61 63 if len(var_tmp[3]) == 0 :
62 64 self.chkDevD.setChecked(False)
63 65 self.chkDevD.setEnabled(False)
64 66
65 67
@@ -1,162 +1,161
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <!DOCTYPE Project SYSTEM "Project-4.6.dtd">
3 3 <!-- eric4 project file for project jro_backup_manager -->
4 <!-- Saved: 2010-05-16, 23:51:59 -->
4 <!-- Saved: 2010-05-17, 12:04:38 -->
5 5 <!-- Copyright (C) 2010 , -->
6 6 <Project version="4.6">
7 7 <Language>en</Language>
8 8 <ProgLanguage mixed="0">Python</ProgLanguage>
9 9 <ProjectType>Qt4</ProjectType>
10 10 <Description></Description>
11 11 <Version>0.1</Version>
12 12 <Author></Author>
13 13 <Email></Email>
14 14 <Sources>
15 15 <Source>__init__.py</Source>
16 16 <Source>ui/Ui_MainWindow.py</Source>
17 17 <Source>ui/MainWindow.py</Source>
18 18 <Source>main.py</Source>
19 19 <Source>ui/__init__.py</Source>
20 20 <Source>functions/__init__.py</Source>
21 21 <Source>functions/functions.py</Source>
22 22 <Source>functions/functions2.py</Source>
23 23 <Source>functions/func_doc.py</Source>
24 24 </Sources>
25 25 <Forms>
26 26 <Form>ui/MainWindow.ui</Form>
27 27 </Forms>
28 28 <Translations>
29 29 </Translations>
30 30 <Resources>
31 31 </Resources>
32 32 <Interfaces>
33 33 </Interfaces>
34 34 <Others>
35 <Other>functions/doc_tmp.txt</Other>
36 35 </Others>
37 36 <MainScript>main.py</MainScript>
38 37 <Vcs>
39 38 <VcsType>Subversion</VcsType>
40 39 <VcsOptions>
41 40 <dict>
42 41 <key>
43 42 <string>add</string>
44 43 </key>
45 44 <value>
46 45 <list>
47 46 <string></string>
48 47 </list>
49 48 </value>
50 49 <key>
51 50 <string>checkout</string>
52 51 </key>
53 52 <value>
54 53 <list>
55 54 <string></string>
56 55 </list>
57 56 </value>
58 57 <key>
59 58 <string>commit</string>
60 59 </key>
61 60 <value>
62 61 <list>
63 62 <string></string>
64 63 </list>
65 64 </value>
66 65 <key>
67 66 <string>diff</string>
68 67 </key>
69 68 <value>
70 69 <list>
71 70 <string></string>
72 71 </list>
73 72 </value>
74 73 <key>
75 74 <string>export</string>
76 75 </key>
77 76 <value>
78 77 <list>
79 78 <string></string>
80 79 </list>
81 80 </value>
82 81 <key>
83 82 <string>global</string>
84 83 </key>
85 84 <value>
86 85 <list>
87 86 <string></string>
88 87 </list>
89 88 </value>
90 89 <key>
91 90 <string>history</string>
92 91 </key>
93 92 <value>
94 93 <list>
95 94 <string></string>
96 95 </list>
97 96 </value>
98 97 <key>
99 98 <string>log</string>
100 99 </key>
101 100 <value>
102 101 <list>
103 102 <string></string>
104 103 </list>
105 104 </value>
106 105 <key>
107 106 <string>remove</string>
108 107 </key>
109 108 <value>
110 109 <list>
111 110 <string></string>
112 111 </list>
113 112 </value>
114 113 <key>
115 114 <string>status</string>
116 115 </key>
117 116 <value>
118 117 <list>
119 118 <string></string>
120 119 </list>
121 120 </value>
122 121 <key>
123 122 <string>tag</string>
124 123 </key>
125 124 <value>
126 125 <list>
127 126 <string></string>
128 127 </list>
129 128 </value>
130 129 <key>
131 130 <string>update</string>
132 131 </key>
133 132 <value>
134 133 <list>
135 134 <string></string>
136 135 </list>
137 136 </value>
138 137 </dict>
139 138 </VcsOptions>
140 139 <VcsOtherData>
141 140 <dict>
142 141 <key>
143 142 <string>standardLayout</string>
144 143 </key>
145 144 <value>
146 145 <bool>True</bool>
147 146 </value>
148 147 </dict>
149 148 </VcsOtherData>
150 149 </Vcs>
151 150 <FiletypeAssociations>
152 151 <FiletypeAssociation pattern="*.ui" type="FORMS" />
153 152 <FiletypeAssociation pattern="*.idl" type="INTERFACES" />
154 153 <FiletypeAssociation pattern="*.qm" type="TRANSLATIONS" />
155 154 <FiletypeAssociation pattern="*.ptl" type="SOURCES" />
156 155 <FiletypeAssociation pattern="*.pyw" type="SOURCES" />
157 156 <FiletypeAssociation pattern="*.ui.h" type="FORMS" />
158 157 <FiletypeAssociation pattern="*.ts" type="TRANSLATIONS" />
159 158 <FiletypeAssociation pattern="*.py" type="SOURCES" />
160 159 <FiletypeAssociation pattern="*.qrc" type="RESOURCES" />
161 160 </FiletypeAssociations>
162 161 </Project> No newline at end of file
@@ -1,412 +1,316
1 1 # -*- coding: utf-8 -*-
2 2
3 3 """
4 4 Module implementing MainWindow.
5 5 """
6 6
7 7 from PyQt4.QtGui import QMainWindow
8 8 from PyQt4.QtCore import pyqtSignature
9 9 from Ui_MainWindow import Ui_MainWindow
10 10 from PyQt4 import QtGui
11 11 from subprocess import *
12 12 import sys
13 13 import os
14 14 import subprocess
15 15 import commands
16 16 from functions import functions
17 17 from functions import functions2
18 18
19 19 class MainWindow(QMainWindow, Ui_MainWindow):
20 20 """
21 21 Class documentation goes here.
22 22 """
23 23
24 24 def __init__(self, parent = None):
25 25 QMainWindow.__init__(self, parent)
26 26 self.setupUi(self)
27 27 self.setupUi2()
28 28 sys.stdout = self #redirige salida estandar
29 29
30 30 def setupUi2(self):
31 31
32 self.statusDpath = False
33 self.statusRpath = False
34
35 functions2.set_parameters(self) #Establece ciertos parametros, para pruebas
36
32 37 self.var_Dpath = self.txtDpath.text()
33 38 self.var_Rpath = self.txtRpath.text()
34 self.statusDpath = False
35 self.statusRpath = False
36
37 39 self.var_Dtype = self.txtDtype.text()
38 40 self.var_Elabel = self.txtElabel.text()
39 41 self.var_Copys = self.txtCopys.value()
40 42 self.var_Dcapacity = self.txtDcapacity.value() * 1024
41 43
42 self.var_n_files=0
44 self.var_n_discs=0
43 45 self.var_list=[]
44 46 self.var_sublist=[]
45
46 functions2.set_parameters(self) #Establece ciertos parametros, para pruebas
47
47 48 functions2.detect_devices(self) #busca los dispositivos de grabacion
48 49
49 50
50 51 def write(self, txt):
51 52 """
52 53 Escribe la salida estandar eb txtInfo
53 54 """
54 55 self.txtInfo.append(str(txt))
55 56
56 57
57 58 @pyqtSignature("")
58 59 def on_btnDpath_clicked(self):
59 60 """
60 61 Permite seleccionar graficamente el direcorio de los datos a grabar
61 62 """
62 63 self.var_Dpath= QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
63 64 self.txtDpath.setText(self.var_Dpath)
64 65 self.on_txtDpath_editingFinished() #llamada a funcion
65 66
66 67
67 68 @pyqtSignature("")
68 69 def on_btnRpath_clicked(self):
69 70 """
70 71 Permite seleccionar graficamente el direcorio del proyecto
71 72 """
72 73 self.var_Rpath = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)
73 74 self.txtRpath.setText(self.var_Rpath)
74 75 self.on_txtRpath_editingFinished() #llamada a funcion
75 76
76 77
77 78 @pyqtSignature("")
78 79 def on_txtDpath_editingFinished(self):
79 80 """
80 81 Permite buscar los archivos de extension seleccionada en la ruta de de datos
81 82 y cargar los valores para el rango de tiempo a ser grabado
82 83 """
83 84 self.var_Dpath=self.txtDpath.text() #Se carga la variable con la ruta recien editada
84 85 self.statusDpath = functions.dir_exists(self.var_Dpath, self)
85 86 functions.load_days(self)
86 87
87 88
88 89 @pyqtSignature("")
89 90 def on_txtRpath_editingFinished(self):
90 91 """
91 92 Valida la ruta del proyecto
92 93 """
93 94 self.var_Rpath=self.txtRpath.text() #Se carga la variable con la ruta recien editada
94 95 self.statusRpath = functions.dir_exists(self.var_Rpath, self)
95 96
96 97
97 98 @pyqtSignature("int")
98 99 def on_lstDtype_activated(self, index):
99 100 """
100 101 Permite elegir entre los tipos de archivos
101 102 """
102 103 if index == 0:
103 104 var_type='r'
104 105 elif index == 1:
105 106 var_type='pdata'
106 107 elif index == 2:
107 108 var_type='sswma'
108 109
109 110 if index != 3:
110 111 self.txtDtype.setText(var_type)
111 112 self.txtDtype.setReadOnly(True)
113 self.var_Dtype=self.txtDtype.text()
112 114 functions.load_days(self)
115
113 116 else:
114 117 self.txtDtype.setText('')
115 118 self.txtDtype.setReadOnly(False)
116 119
117 120
118 121 @pyqtSignature("")
119 122 def on_txtDtype_editingFinished(self):
120 123 self.var_Dtype=self.txtDtype.text()
121 124 functions.load_days(self) #llamada a funcion
122 125
123 126
124 127 @pyqtSignature("")
125 128 def on_txtElabel_editingFinished(self):
126 129 self.var_Elabel = self.txtElabel.text()
127 130
128 131
129 132 @pyqtSignature("")
130 133 def on_txtCopys_editingFinished(self):
131 134 self.var_Copys = self.txtCopys.value()
132 135
133 136
134 137 @pyqtSignature("")
135 138 def on_txtDcapacity_editingFinished(self):
136 self.var_Dcapacity = self.txtDcapacity.value() * 1024
139 self.var_Dcapacity = self.txtDcapacity.value() * 1024 #tamaΓ±o en KB
137 140
138 141
139 142 @pyqtSignature("int") #CLOSED
140 143 def on_lstStartDay_activated(self, index):
141 144 """
142 145 Cambia la lista de opciones en lstStopDay
143 146 """
144 147 var_StopDay_index=self.lstStopDay.count() - self.lstStopDay.currentIndex()
145 148 self.lstStopDay.clear()
146 149
147 150 for i in self.var_list[index:]:
148 151 self.lstStopDay.addItem(i)
149 152
150 153 self.lstStopDay.setCurrentIndex(self.lstStopDay.count() - var_StopDay_index)
151 154
152 155 functions.get_sub_list(self)
153 156
154 157
155 158 @pyqtSignature("int") #CLOSED
156 159 def on_lstStopDay_activated(self, index):
157 160 """
158 161 Cambia la lista de opciones en lstStartDay
159 162 """
160 163 var_StartDay_index=self.lstStartDay.currentIndex()
161 164 var_end_index = self.lstStopDay.count() - index
162 165 self.lstStartDay.clear()
163 166
164 167 for i in self.var_list[:len(self.var_list) - var_end_index + 1]:
165 168 self.lstStartDay.addItem(i)
166 169
167 170 self.lstStartDay.setCurrentIndex(var_StartDay_index)
168 171
169 172 functions.get_sub_list(self)
170 173
171 174
172 175 @pyqtSignature("int") #CLOSED
173 176 def on_lstDcapacity_activated(self, index):
174 177 """
175 178 Permite elegir el tamaΓ±o del disco
176 179 """
177 180 if index == 0:
178 181 var_size=25.0
179 182 elif index == 1:
180 183 var_size=8.5
181 184 elif index == 2:
182 185 var_size=4.7
183 186 elif index == 3:
184 187 var_size=0.7
185 188
186 189 if index != 4:
187 190 self.txtDcapacity.setValue(var_size*10**9/1024**2)
188 191 self.txtDcapacity.setReadOnly(True)
189 192 else:
190 193 self.txtDcapacity.setValue(100.0)
191 194 self.txtDcapacity.setReadOnly(False)
192
195
196 self.var_Dcapacity = self.txtDcapacity.value() * 1024 #tamaΓ±o en KB
197
193 198
194 199 @pyqtSignature("")
195 200 def on_btnGbkp_clicked(self):
196 201 """
197 202 Cuando se presiona el boton btnGbkp
198 203 """
199 204
200 205 if functions.validate_parameters(self) == False:
201 206 return
202 207
203 208 #Crea las carpetas en la ruta del proyecto y verifica que se crearon correctamente
204 list_dirs=['gpath', 'iso', 'ppath']
205 functions.make_dirs(self.var_Rpath, list_dirs, self)
206
207 #Cargando variables con los parametros
208 var_Rpath_ppath=self.var_Rpath+"/ppath" #Ruta de los archivos a grabar
209
210 #Busca los archivos con los parametros de busqueda
211 var_files_list=[]
212 for var_doy in var_sublist:
213 var_cmd="find " + str(self.var_Dpath) + " -name ?"+var_doy+"???."+ str(self.var_Dtype) + " |sort"
214 var_output=commands.getstatusoutput(var_cmd)[1]
215 for var_file in var_output.split():
216 var_files_list.append(var_file) #Almacena cada archivo en la lista
217
218 #
219 #Genera la lista de archivos .dat que contienen los archivos a grabar en cada DVD
220 #
221 var_n=0 #Numero del DVD actual
222 var_tmp=0 #Se usa para acumulanr el tamaΓ±o de los archivos de la lista
223 var_files_list_2=[] #Se usa para almacenar la lista de archivos agrbar en cada DVD
224
225 for i in var_files_list: #Se asignan en i los archivos de la lista
226 var_size_i=os.path.getsize(i)/1024+1 #tamaΓ±o en KB del archivo de la lista, se suma 1 KB para evitar problemas al momento de sumar
227 var_tmp += var_size_i #Se acumulan el tamaΓ±o de los archivos de la lista
228
229 #Si el tamaΓ±o acumulado es mayor que el de el DVD
230 if var_tmp > self.var_Dcapacity:
231 var_tmp -= var_size_i #se quita el tamaΓ±o sumado para mostrar el tamaΓ±o real
232 #se crea un archivo con numeral en el sufijo y extension .dat
233 var_file = open(var_Rpath_ppath+"/"+self.txtElabel.text()+"_"+functions.i2s(var_n)+".dat","w")
234 #Se aΓ±ade la lista de archivos a grabar en el DVD al archivo .dat
235 for line in var_files_list_2:
236 var_tmp_path=(line.split(self.var_Dpath)[1]).split('/')
237 var_tmp_path2="/"
238 for l in range(0, len(var_tmp_path)-1):
239 var_tmp_path2=var_tmp_path2+str(var_tmp_path[l])+"/"
240 var_file.write(var_tmp_path2+'=')
241 var_file.write(line+'\n')
242 var_file.close()
243
244 var_tmp = var_size_i #Se asigna a la variable el tamaΓ±o del archivo actual
245 var_files_list_2=[] #Se reinicia la lista
246 var_n += 1
247 var_files_list_2.append(i)
248
249 #se crea un archivo con numeral en el sufijo y extension .dat
250 var_file = open(var_Rpath_ppath+"/"+self.txtElabel.text()+"_"+functions.i2s(var_n)+".dat","w")
251 #Se aΓ±ade la lista de archivos a grabar en el DVD al archivo .dat
252 for line in var_files_list_2:
253 var_tmp_path=(line.split(self.var_Dpath)[1]).split('/')
254 var_tmp_path2="/"
255 for l in range(0, len(var_tmp_path)-1):
256 var_tmp_path2=var_tmp_path2+str(var_tmp_path[l])+"/"
257 var_file.write(var_tmp_path2+'=')
258 var_file.write(line+'\n')
259 var_file.close()
260
261 #
262 #Genera los archivos .print con los cuales se creara los postscript
263 #
264 self.var_n_files = var_n # Numero del ultimo archivo .dat creado
265 var_n = 0 # Se reinicia a cero y se usa para poder acceder a cada una de los archivos
266
267 # Se leen todos los archivos .dat creados para crear las etiquetas en los archivos .ps
268 for var_n in range(0, self.var_n_files+1):
269 print var_n
270
271 #se abren los archivos .dat en modo lectura
272 var_file = open(var_Rpath_ppath+"/"+self.txtElabel.text()+"_"+functions.i2s(var_n)+".dat","r")
273 lines=var_file.readlines() # Se lee las lineas en el archivo y se almacenan en la lista
274
275 # Se crea el archivo .print
276 var_file_print = open(var_Rpath_ppath+"/"+self.txtElabel.text()+"_"+functions.i2s(var_n)+".print","w")
277 var_file_print.write(self.txtElabel.text()+" "+functions.i2s(var_n)+"/"+str(self.var_n_files)+"\n")
278 var_file_print.write("Year Doy Folder Set Time range\n")
279
280 #Se crean los archivos .print con los cuales se crearan los archivos .ps
281 var_first_folder = lines[0].split('=')[0]
282 var_first_file = (lines[0].split('=')[1])[:-1]
283 var_date_first_file=commands.getstatusoutput("date -r "+var_first_file+" +'%T'")[1]
284
285 for j in range(1, len(lines)-1):
286 var_tmp_folder = lines[j].split('=')[0]
287 var_tmp_file = (lines[j].split('=')[1])[:-1]
288
289 # Si el subfolder superior o la fecha del archivo cambia se genera una nueva linea
290 if (var_tmp_folder != var_first_folder) or (var_tmp_file[0:-5] != var_first_file[0:-5]):
291
292 var_last_file = (lines[j-1].split('=')[1])[:-1]
293 var_date_last_file=commands.getstatusoutput("date -r "+var_last_file+" +'%T'")[1]
294 # Si el archivo se grabara directamente en la / del DVD y no en un /directorio/
295 # se usa la etiqueta para indicar la parte de la etiqueta donde va el subdirectorio
296 if var_first_folder == '/':
297 var_folder = self.txtElabel.text()
298 else:
299 var_folder = var_first_folder.split('/')[1]
300
301 var_file_print.write(var_first_file[-12:-8]+" "+var_first_file[-8:-5]+" "+var_folder +" "+var_first_file[-5:-2]+" "
302 +var_last_file[-5:-2]+" "+var_date_first_file+" "+var_date_last_file+"\n")
303
304 var_first_folder = lines[j].split('=')[0]
305 var_first_file = (lines[j].split('=')[1])[:-1]
306 var_date_first_file=commands.getstatusoutput("date -r "+var_first_file+" +'%T'")[1]
307
308 var_last_file = (lines[-1].split('=')[1])[:-1]
309 var_date_last_file=commands.getstatusoutput("date -r "+var_last_file+" +'%T'")[1]
310
311 if var_first_folder == '/':
312 var_folder = self.txtElabel.text()
313 else:
314 var_folder = var_first_folder.split('/')[1]
315
316 var_file_print.write(var_first_file[-12:-8]+" "+var_first_file[-8:-5]+" "+var_folder +" "+var_first_file[-5:-2]+" "
317 +var_last_file[-5:-2]+" "+var_date_first_file+" "+var_date_last_file+"\n")
318
319 var_file.close()
320 var_file_print.close()
321
209 list_dirs=['gpath','iso','ppath']
210 bool_make_dirs = functions.make_dirs(list_dirs, self)
211 if bool_make_dirs == False:
212 return
213
214 var_files_list = functions.list_files(self) #Se obtiene la lista de archivos a grabar
215 self.var_n_discs = functions.make_files_dat(var_files_list, self) #Se crean los archivos .dat
216
217 functions.make_files_print(self) # Se crean los archivos .print
322 218
323 219 #Se deshabilita el Tab Parameters y el boton btnGbkp
324 220 self.tabParameters.setEnabled(False)
325 221 self.lstDcapacity.setEnabled(False)
326 222 self.txtDcapacity.setEnabled(False)
327 223 self.btnGbkp.setEnabled(False)
328 224 self.btnRestart.setEnabled(True)
225 self.btnStartburn.setEnabled(True)
329 226
330 227
331 228 @pyqtSignature("")
332 229 def on_btnRestart_clicked(self):
333 230 """
334 Slot documentation goes here.
231 Permite que se puedan cambiar los parametros
335 232 """
336 233 self.tabParameters.setEnabled(True)
337 234 self.lstDcapacity.setEnabled(True)
338 235 self.txtDcapacity.setEnabled(True)
339 236 self.btnGbkp.setEnabled(True)
340 237 self.btnRestart.setEnabled(False)
238 self.btnStartburn.setEnabled(False)
341 239
342 240
343 241 @pyqtSignature("")
344 242 def on_btnStartburn_clicked(self):
345 243 """
346 244 Se inicia el proceso de grabacion
347 245 """
246 self.btnRestart.setEnabled(False)
247 self.btnStartburn.setEnabled(False)
248 self.btnStopburn.setEnabled(True)
249
250 return
251
348 252 sys.stdout = self
349 253 #sys.stderr = self
350 254 print "stdout_!!!"
351 255
352 256 #Inicializando variables
353 257 var_Rpath=self.txtRpath.text()
354 258 var_Rpath_ppath=var_Rpath+"/ppath"
355 259 var_Rpath_iso=var_Rpath+"/iso"
356 260 var_label=self.txtElabel.text()
357 261
358 262 # Se leen todos los archivos .dat creados para crear las etiquetas en los archivos .ps
359 for var_n in range(0, self.var_n_files+1):
263 for var_n in range(0, self.var_n_discs+1):
360 264 print var_n
361 265
362 266 file_iso=var_Rpath_iso+"/"+functions.i2s(var_n)+".iso"
363 267 file_dat=var_Rpath_ppath+"/"+self.txtElabel.text()+"_"+functions.i2s(var_n)+".dat"
364 268
365 269 var_cmd = 'genisoimage -hide-joliet-trans-tbl -joliet-long -r '
366 270 var_cmd += ' -A '+var_label+' -V '+var_label
367 271 var_cmd += ' -graft-points -path-list '+ file_dat+' -o '+file_iso
368 272 self.txtInfo.append(var_cmd)
369 273
370 274 var_output=commands.getstatusoutput(str(var_cmd))[0]
371 275 self.txtInfo.append(str(var_output))
372 276
373 277 #os.system(str(var_cmd))
374 278 #p = subprocess.Popen(str('ls /'), shell=True, stdout=self)
375 279 #os.waitpid(p.pid, 0)
376 280 ####self.txtInfo.append(str(p.pid))
377 281
378 282
379 283 @pyqtSignature("")
380 284 def on_btnStopburn_clicked(self):
381 285 """
382 286 Slot documentation goes here.
383 287 """
384 # TODO: not implemented yet
385 raise NotImplementedError
386
288 self.btnRestart.setEnabled(True)
289 self.btnStartburn.setEnabled(True)
290 self.btnStopburn.setEnabled(False)
387 291
388 292 @pyqtSignature("")
389 293 def on_btnTdevA_clicked(self):
390 294 var_dev = str(self.txtDeviceA.text())
391 295 var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev
392 296 commands.getstatusoutput(var_cmd)
393 297
394 298 @pyqtSignature("")
395 299 def on_btnTdevB_clicked(self):
396 300 var_dev = str(self.txtDeviceB.text())
397 301 var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev
398 302 commands.getstatusoutput(var_cmd)
399 303
400 304 @pyqtSignature("")
401 305 def on_btnTdevC_clicked(self):
402 306 var_dev = str(self.txtDeviceC.text())
403 307 var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev
404 308 commands.getstatusoutput(var_cmd)
405 309
406 310 @pyqtSignature("")
407 311 def on_btnTdevD_clicked(self):
408 312 var_dev = str(self.txtDeviceD.text())
409 313 var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev
410 314 commands.getstatusoutput(var_cmd)
411 315
412 316
@@ -1,967 +1,967
1 1 <?xml version="1.0" encoding="UTF-8"?>
2 2 <ui version="4.0">
3 3 <class>MainWindow</class>
4 4 <widget class="QMainWindow" name="MainWindow">
5 5 <property name="geometry">
6 6 <rect>
7 7 <x>0</x>
8 8 <y>0</y>
9 <width>754</width>
9 <width>806</width>
10 10 <height>737</height>
11 11 </rect>
12 12 </property>
13 13 <property name="windowTitle">
14 14 <string>JRO BACKUP MANAGER</string>
15 15 </property>
16 16 <widget class="QWidget" name="centralwidget">
17 17 <layout class="QVBoxLayout" name="verticalLayout">
18 18 <item>
19 19 <widget class="QTabWidget" name="tabWidget">
20 20 <property name="enabled">
21 21 <bool>true</bool>
22 22 </property>
23 23 <property name="sizePolicy">
24 24 <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
25 25 <horstretch>0</horstretch>
26 26 <verstretch>0</verstretch>
27 27 </sizepolicy>
28 28 </property>
29 29 <property name="currentIndex">
30 30 <number>0</number>
31 31 </property>
32 32 <widget class="QWidget" name="tabParameters">
33 33 <property name="enabled">
34 34 <bool>true</bool>
35 35 </property>
36 36 <attribute name="title">
37 37 <string>Parameters</string>
38 38 </attribute>
39 39 <layout class="QVBoxLayout" name="verticalLayout_2">
40 40 <item>
41 41 <layout class="QHBoxLayout" name="horizontalLayout">
42 42 <property name="sizeConstraint">
43 43 <enum>QLayout::SetDefaultConstraint</enum>
44 44 </property>
45 45 <item>
46 46 <widget class="QLineEdit" name="txtDpath">
47 47 <property name="sizePolicy">
48 48 <sizepolicy hsizetype="Preferred" vsizetype="Fixed">
49 49 <horstretch>0</horstretch>
50 50 <verstretch>0</verstretch>
51 51 </sizepolicy>
52 52 </property>
53 53 </widget>
54 54 </item>
55 55 <item>
56 56 <widget class="QPushButton" name="btnDpath">
57 57 <property name="sizePolicy">
58 58 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
59 59 <horstretch>0</horstretch>
60 60 <verstretch>0</verstretch>
61 61 </sizepolicy>
62 62 </property>
63 63 <property name="text">
64 64 <string>Data Path</string>
65 65 </property>
66 66 <property name="checkable">
67 67 <bool>false</bool>
68 68 </property>
69 69 </widget>
70 70 </item>
71 71 </layout>
72 72 </item>
73 73 <item>
74 74 <layout class="QHBoxLayout" name="horizontalLayout_3">
75 75 <item>
76 76 <widget class="QLineEdit" name="txtRpath"/>
77 77 </item>
78 78 <item>
79 79 <widget class="QPushButton" name="btnRpath">
80 80 <property name="text">
81 81 <string>Resource Path</string>
82 82 </property>
83 83 </widget>
84 84 </item>
85 85 </layout>
86 86 </item>
87 87 <item>
88 88 <widget class="QLabel" name="lblDtype">
89 89 <property name="text">
90 90 <string>Data Type</string>
91 91 </property>
92 92 </widget>
93 93 </item>
94 94 <item>
95 95 <layout class="QHBoxLayout" name="horizontalLayout_4">
96 96 <item>
97 97 <widget class="QComboBox" name="lstDtype">
98 98 <item>
99 99 <property name="text">
100 100 <string>Raw Data</string>
101 101 </property>
102 102 </item>
103 103 <item>
104 104 <property name="text">
105 105 <string>Process Data</string>
106 106 </property>
107 107 </item>
108 108 <item>
109 109 <property name="text">
110 110 <string>BLTR Data</string>
111 111 </property>
112 112 </item>
113 113 <item>
114 114 <property name="text">
115 115 <string>Other</string>
116 116 </property>
117 117 </item>
118 118 </widget>
119 119 </item>
120 120 <item>
121 121 <widget class="QLineEdit" name="txtDtype">
122 122 <property name="text">
123 123 <string>r</string>
124 124 </property>
125 125 <property name="readOnly">
126 126 <bool>true</bool>
127 127 </property>
128 128 </widget>
129 129 </item>
130 130 <item>
131 131 <widget class="QCheckBox" name="chkMST">
132 132 <property name="text">
133 133 <string>MST-ISR Data</string>
134 134 </property>
135 135 </widget>
136 136 </item>
137 137 </layout>
138 138 </item>
139 139 <item>
140 140 <layout class="QHBoxLayout" name="horizontalLayout_6">
141 141 <item>
142 142 <widget class="QLabel" name="lblElabel">
143 143 <property name="text">
144 144 <string>Exp. Label at device</string>
145 145 </property>
146 146 </widget>
147 147 </item>
148 148 <item>
149 149 <widget class="QLabel" name="lblCopys">
150 150 <property name="text">
151 151 <string>Copys</string>
152 152 </property>
153 153 </widget>
154 154 </item>
155 155 </layout>
156 156 </item>
157 157 <item>
158 158 <layout class="QHBoxLayout" name="horizontalLayout_5">
159 159 <item>
160 160 <widget class="QLineEdit" name="txtElabel"/>
161 161 </item>
162 162 <item>
163 163 <widget class="QSpinBox" name="txtCopys">
164 164 <property name="sizePolicy">
165 165 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
166 166 <horstretch>0</horstretch>
167 167 <verstretch>0</verstretch>
168 168 </sizepolicy>
169 169 </property>
170 170 </widget>
171 171 </item>
172 172 </layout>
173 173 </item>
174 174 <item>
175 175 <layout class="QHBoxLayout" name="horizontalLayout_7">
176 176 <item>
177 177 <widget class="QLabel" name="lblStartDay">
178 178 <property name="text">
179 179 <string>Start Day:</string>
180 180 </property>
181 181 </widget>
182 182 </item>
183 183 <item>
184 184 <widget class="QLabel" name="lblStopDay">
185 185 <property name="text">
186 186 <string>Stop Day:</string>
187 187 </property>
188 188 </widget>
189 189 </item>
190 190 </layout>
191 191 </item>
192 192 <item>
193 193 <layout class="QHBoxLayout" name="horizontalLayout_8">
194 194 <item>
195 195 <widget class="QComboBox" name="lstStartDay"/>
196 196 </item>
197 197 <item>
198 198 <widget class="QComboBox" name="lstStopDay"/>
199 199 </item>
200 200 </layout>
201 201 </item>
202 202 </layout>
203 203 </widget>
204 204 <widget class="QWidget" name="tabDconfig">
205 205 <property name="enabled">
206 206 <bool>true</bool>
207 207 </property>
208 208 <property name="sizePolicy">
209 209 <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
210 210 <horstretch>0</horstretch>
211 211 <verstretch>0</verstretch>
212 212 </sizepolicy>
213 213 </property>
214 214 <attribute name="title">
215 215 <string>Device Config.</string>
216 216 </attribute>
217 217 <layout class="QVBoxLayout" name="verticalLayout_3">
218 218 <item>
219 219 <layout class="QGridLayout" name="gridLayout">
220 220 <item row="0" column="0">
221 221 <layout class="QVBoxLayout" name="verticalLayout_15">
222 222 <item>
223 223 <widget class="QCheckBox" name="chkDevA">
224 224 <property name="text">
225 225 <string>Dev A</string>
226 226 </property>
227 227 <property name="checked">
228 228 <bool>true</bool>
229 229 </property>
230 230 </widget>
231 231 </item>
232 232 <item>
233 233 <widget class="QWidget" name="grpDevA" native="true">
234 234 <layout class="QVBoxLayout" name="verticalLayout_11">
235 235 <item>
236 236 <widget class="QLineEdit" name="txtDeviceA"/>
237 237 </item>
238 238 <item>
239 239 <widget class="QLineEdit" name="txtBspeedA">
240 240 <property name="text">
241 241 <string>16</string>
242 242 </property>
243 243 </widget>
244 244 </item>
245 245 <item>
246 246 <widget class="QLineEdit" name="txtBmodeA">
247 247 <property name="text">
248 248 <string>-sao</string>
249 249 </property>
250 250 </widget>
251 251 </item>
252 252 <item>
253 253 <widget class="QPushButton" name="btnTdevA">
254 254 <property name="text">
255 255 <string>Test DevA</string>
256 256 </property>
257 257 </widget>
258 258 </item>
259 259 </layout>
260 260 </widget>
261 261 </item>
262 262 </layout>
263 263 </item>
264 264 <item row="0" column="1">
265 265 <layout class="QVBoxLayout" name="verticalLayout_16">
266 266 <item>
267 267 <widget class="QCheckBox" name="chkDevB">
268 268 <property name="text">
269 269 <string>Dev B</string>
270 270 </property>
271 271 <property name="checked">
272 272 <bool>true</bool>
273 273 </property>
274 274 </widget>
275 275 </item>
276 276 <item>
277 277 <widget class="QWidget" name="grpDevB" native="true">
278 278 <layout class="QVBoxLayout" name="verticalLayout_12">
279 279 <item>
280 280 <widget class="QLineEdit" name="txtDeviceB"/>
281 281 </item>
282 282 <item>
283 283 <widget class="QLineEdit" name="txtBspeedB">
284 284 <property name="text">
285 285 <string>16</string>
286 286 </property>
287 287 </widget>
288 288 </item>
289 289 <item>
290 290 <widget class="QLineEdit" name="txtBmodeB">
291 291 <property name="text">
292 292 <string>-sao</string>
293 293 </property>
294 294 </widget>
295 295 </item>
296 296 <item>
297 297 <widget class="QPushButton" name="btnTdevB">
298 298 <property name="text">
299 299 <string>Test DevB</string>
300 300 </property>
301 301 </widget>
302 302 </item>
303 303 </layout>
304 304 </widget>
305 305 </item>
306 306 </layout>
307 307 </item>
308 308 <item row="0" column="2">
309 309 <layout class="QVBoxLayout" name="verticalLayout_17">
310 310 <item>
311 311 <widget class="QCheckBox" name="chkDevC">
312 312 <property name="text">
313 313 <string>Dev C</string>
314 314 </property>
315 315 <property name="checked">
316 316 <bool>true</bool>
317 317 </property>
318 318 </widget>
319 319 </item>
320 320 <item>
321 321 <widget class="QWidget" name="grpDevC" native="true">
322 322 <layout class="QVBoxLayout" name="verticalLayout_13">
323 323 <item>
324 324 <widget class="QLineEdit" name="txtDeviceC"/>
325 325 </item>
326 326 <item>
327 327 <widget class="QLineEdit" name="txtBspeedC">
328 328 <property name="text">
329 329 <string>16</string>
330 330 </property>
331 331 </widget>
332 332 </item>
333 333 <item>
334 334 <widget class="QLineEdit" name="txtBmodeC">
335 335 <property name="text">
336 336 <string>-sao</string>
337 337 </property>
338 338 </widget>
339 339 </item>
340 340 <item>
341 341 <widget class="QPushButton" name="btnTdevC">
342 342 <property name="text">
343 343 <string>Test DevC</string>
344 344 </property>
345 345 </widget>
346 346 </item>
347 347 </layout>
348 348 </widget>
349 349 </item>
350 350 </layout>
351 351 </item>
352 352 <item row="0" column="3">
353 353 <layout class="QVBoxLayout" name="verticalLayout_18">
354 354 <item>
355 355 <widget class="QCheckBox" name="chkDevD">
356 356 <property name="text">
357 357 <string>Dev D</string>
358 358 </property>
359 359 <property name="checked">
360 360 <bool>true</bool>
361 361 </property>
362 362 </widget>
363 363 </item>
364 364 <item>
365 365 <widget class="QWidget" name="grpDevD" native="true">
366 366 <layout class="QVBoxLayout" name="verticalLayout_14">
367 367 <item>
368 368 <widget class="QLineEdit" name="txtDeviceD"/>
369 369 </item>
370 370 <item>
371 371 <widget class="QLineEdit" name="txtBspeedD">
372 372 <property name="text">
373 373 <string>16</string>
374 374 </property>
375 375 </widget>
376 376 </item>
377 377 <item>
378 378 <widget class="QLineEdit" name="txtBmodeD">
379 379 <property name="text">
380 380 <string>-sao</string>
381 381 </property>
382 382 </widget>
383 383 </item>
384 384 <item>
385 385 <widget class="QPushButton" name="btnTdevD">
386 386 <property name="text">
387 387 <string>Test DevD</string>
388 388 </property>
389 389 </widget>
390 390 </item>
391 391 </layout>
392 392 </widget>
393 393 </item>
394 394 </layout>
395 395 </item>
396 396 <item row="0" column="4">
397 397 <layout class="QVBoxLayout" name="verticalLayout_19">
398 398 <item>
399 399 <widget class="QLabel" name="label_2">
400 400 <property name="text">
401 401 <string/>
402 402 </property>
403 403 </widget>
404 404 </item>
405 405 <item>
406 406 <widget class="QLabel" name="lblDevice">
407 407 <property name="text">
408 408 <string>Device</string>
409 409 </property>
410 410 </widget>
411 411 </item>
412 412 <item>
413 413 <widget class="QLabel" name="lblBspeed">
414 414 <property name="text">
415 415 <string>Burn Speed</string>
416 416 </property>
417 417 </widget>
418 418 </item>
419 419 <item>
420 420 <widget class="QLabel" name="lblBmode">
421 421 <property name="text">
422 422 <string>Burn Mode</string>
423 423 </property>
424 424 </widget>
425 425 </item>
426 426 <item>
427 427 <widget class="QLabel" name="label">
428 428 <property name="text">
429 429 <string/>
430 430 </property>
431 431 </widget>
432 432 </item>
433 433 </layout>
434 434 </item>
435 435 </layout>
436 436 </item>
437 437 <item>
438 438 <layout class="QHBoxLayout" name="horizontalLayout_9">
439 439 <property name="sizeConstraint">
440 440 <enum>QLayout::SetFixedSize</enum>
441 441 </property>
442 442 <item>
443 443 <widget class="QLabel" name="lblBprocess">
444 444 <property name="sizePolicy">
445 445 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
446 446 <horstretch>0</horstretch>
447 447 <verstretch>0</verstretch>
448 448 </sizepolicy>
449 449 </property>
450 450 <property name="text">
451 451 <string>Burning process</string>
452 452 </property>
453 453 </widget>
454 454 </item>
455 455 <item>
456 456 <widget class="QCheckBox" name="chkSimultaneously">
457 457 <property name="sizePolicy">
458 458 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
459 459 <horstretch>0</horstretch>
460 460 <verstretch>0</verstretch>
461 461 </sizepolicy>
462 462 </property>
463 463 <property name="text">
464 464 <string>Simultaneously</string>
465 465 </property>
466 466 </widget>
467 467 </item>
468 468 <item>
469 469 <widget class="QCheckBox" name="chkSequentially">
470 470 <property name="sizePolicy">
471 471 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
472 472 <horstretch>0</horstretch>
473 473 <verstretch>0</verstretch>
474 474 </sizepolicy>
475 475 </property>
476 476 <property name="text">
477 477 <string>Sequentially</string>
478 478 </property>
479 479 <property name="checked">
480 480 <bool>true</bool>
481 481 </property>
482 482 </widget>
483 483 </item>
484 484 </layout>
485 485 </item>
486 486 <item>
487 487 <layout class="QHBoxLayout" name="horizontalLayout_11">
488 488 <property name="spacing">
489 489 <number>6</number>
490 490 </property>
491 491 <property name="sizeConstraint">
492 492 <enum>QLayout::SetDefaultConstraint</enum>
493 493 </property>
494 494 <item>
495 495 <widget class="QLabel" name="lblDcapacity">
496 496 <property name="sizePolicy">
497 497 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
498 498 <horstretch>0</horstretch>
499 499 <verstretch>0</verstretch>
500 500 </sizepolicy>
501 501 </property>
502 502 <property name="text">
503 503 <string>Device Capacity (MB)</string>
504 504 </property>
505 505 </widget>
506 506 </item>
507 507 <item>
508 508 <widget class="QCheckBox" name="chkSalert">
509 509 <property name="sizePolicy">
510 510 <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
511 511 <horstretch>0</horstretch>
512 512 <verstretch>0</verstretch>
513 513 </sizepolicy>
514 514 </property>
515 515 <property name="text">
516 516 <string>Sound Alert</string>
517 517 </property>
518 518 </widget>
519 519 </item>
520 520 </layout>
521 521 </item>
522 522 <item>
523 523 <layout class="QHBoxLayout" name="horizontalLayout_10">
524 524 <property name="sizeConstraint">
525 525 <enum>QLayout::SetFixedSize</enum>
526 526 </property>
527 527 <item>
528 528 <widget class="QComboBox" name="lstDcapacity">
529 529 <property name="currentIndex">
530 530 <number>2</number>
531 531 </property>
532 532 <item>
533 533 <property name="text">
534 534 <string>BluRay [25.0 GB]</string>
535 535 </property>
536 536 </item>
537 537 <item>
538 538 <property name="text">
539 539 <string>DVD2 [8.5 GB]</string>
540 540 </property>
541 541 </item>
542 542 <item>
543 543 <property name="text">
544 544 <string>DVD1 [4.7 GB]</string>
545 545 </property>
546 546 </item>
547 547 <item>
548 548 <property name="text">
549 549 <string>CD [0.7 GB]</string>
550 550 </property>
551 551 </item>
552 552 <item>
553 553 <property name="text">
554 554 <string>Other [? GB]</string>
555 555 </property>
556 556 </item>
557 557 </widget>
558 558 </item>
559 559 <item>
560 560 <widget class="QDoubleSpinBox" name="txtDcapacity">
561 561 <property name="sizePolicy">
562 562 <sizepolicy hsizetype="Expanding" vsizetype="Fixed">
563 563 <horstretch>0</horstretch>
564 564 <verstretch>0</verstretch>
565 565 </sizepolicy>
566 566 </property>
567 567 <property name="readOnly">
568 568 <bool>true</bool>
569 569 </property>
570 570 <property name="minimum">
571 571 <double>100.000000000000000</double>
572 572 </property>
573 573 <property name="maximum">
574 574 <double>99999.990000000005239</double>
575 575 </property>
576 576 <property name="value">
577 577 <double>4482.270000000000437</double>
578 578 </property>
579 579 </widget>
580 580 </item>
581 581 <item>
582 582 <widget class="QCheckBox" name="chkPSgraphic">
583 583 <property name="text">
584 584 <string>PS Graphic</string>
585 585 </property>
586 586 </widget>
587 587 </item>
588 588 <item>
589 589 <widget class="QLineEdit" name="lineEdit_17"/>
590 590 </item>
591 591 </layout>
592 592 </item>
593 593 </layout>
594 594 </widget>
595 595 <widget class="QWidget" name="tabSburn">
596 596 <attribute name="title">
597 597 <string>Status Burn</string>
598 598 </attribute>
599 599 <layout class="QVBoxLayout" name="verticalLayout_4">
600 600 <item>
601 601 <widget class="QWidget" name="widget_2" native="true">
602 602 <property name="sizePolicy">
603 603 <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
604 604 <horstretch>0</horstretch>
605 605 <verstretch>0</verstretch>
606 606 </sizepolicy>
607 607 </property>
608 608 <property name="maximumSize">
609 609 <size>
610 610 <width>500</width>
611 611 <height>16777215</height>
612 612 </size>
613 613 </property>
614 614 <layout class="QGridLayout" name="gridLayout_2">
615 615 <item row="3" column="2">
616 616 <widget class="QLineEdit" name="txtSTATUSb"/>
617 617 </item>
618 618 <item row="5" column="1">
619 619 <widget class="QLineEdit" name="txtINFOa"/>
620 620 </item>
621 621 <item row="3" column="1">
622 622 <widget class="QLineEdit" name="txtSTATUSa"/>
623 623 </item>
624 624 <item row="5" column="2">
625 625 <widget class="QLineEdit" name="txtINFOb"/>
626 626 </item>
627 627 <item row="3" column="3">
628 628 <widget class="QLineEdit" name="txtSTATUSc"/>
629 629 </item>
630 630 <item row="3" column="4">
631 631 <widget class="QLineEdit" name="txtSTATUSd"/>
632 632 </item>
633 633 <item row="5" column="4">
634 634 <widget class="QLineEdit" name="txtINFOd"/>
635 635 </item>
636 636 <item row="6" column="1">
637 637 <widget class="QLineEdit" name="txtSETa"/>
638 638 </item>
639 639 <item row="6" column="2">
640 640 <widget class="QLineEdit" name="txtSETb"/>
641 641 </item>
642 642 <item row="6" column="3">
643 643 <widget class="QLineEdit" name="txtSETc"/>
644 644 </item>
645 645 <item row="6" column="4">
646 646 <widget class="QLineEdit" name="txtSETd"/>
647 647 </item>
648 648 <item row="3" column="0">
649 649 <widget class="QLabel" name="lblSTATUS">
650 650 <property name="text">
651 651 <string>STATUS</string>
652 652 </property>
653 653 </widget>
654 654 </item>
655 655 <item row="5" column="0">
656 656 <widget class="QLabel" name="lblINFO">
657 657 <property name="text">
658 658 <string>INFO</string>
659 659 </property>
660 660 </widget>
661 661 </item>
662 662 <item row="6" column="0">
663 663 <widget class="QLabel" name="lblSET">
664 664 <property name="text">
665 665 <string>SET</string>
666 666 </property>
667 667 </widget>
668 668 </item>
669 669 <item row="0" column="1">
670 670 <widget class="QLabel" name="lblDevA">
671 671 <property name="text">
672 672 <string>DEV A</string>
673 673 </property>
674 674 <property name="alignment">
675 675 <set>Qt::AlignCenter</set>
676 676 </property>
677 677 </widget>
678 678 </item>
679 679 <item row="0" column="2">
680 680 <widget class="QLabel" name="lblDevB">
681 681 <property name="text">
682 682 <string>DEV B</string>
683 683 </property>
684 684 <property name="alignment">
685 685 <set>Qt::AlignCenter</set>
686 686 </property>
687 687 </widget>
688 688 </item>
689 689 <item row="0" column="3">
690 690 <widget class="QLabel" name="lblDevC">
691 691 <property name="text">
692 692 <string>DEV C</string>
693 693 </property>
694 694 <property name="alignment">
695 695 <set>Qt::AlignCenter</set>
696 696 </property>
697 697 </widget>
698 698 </item>
699 699 <item row="0" column="4">
700 700 <widget class="QLabel" name="lblDevD">
701 701 <property name="text">
702 702 <string>DEV D</string>
703 703 </property>
704 704 <property name="alignment">
705 705 <set>Qt::AlignCenter</set>
706 706 </property>
707 707 </widget>
708 708 </item>
709 709 <item row="5" column="3">
710 710 <widget class="QLineEdit" name="txtINFOc"/>
711 711 </item>
712 712 </layout>
713 713 </widget>
714 714 </item>
715 715 <item>
716 716 <widget class="QTextEdit" name="txtSburn"/>
717 717 </item>
718 718 </layout>
719 719 </widget>
720 720 </widget>
721 721 </item>
722 722 <item>
723 723 <widget class="QTextEdit" name="txtInfo">
724 724 <property name="readOnly">
725 725 <bool>true</bool>
726 726 </property>
727 727 </widget>
728 728 </item>
729 729 <item>
730 730 <layout class="QHBoxLayout" name="horizontalLayout_2">
731 731 <property name="sizeConstraint">
732 732 <enum>QLayout::SetDefaultConstraint</enum>
733 733 </property>
734 734 <item>
735 735 <widget class="QPushButton" name="btnGbkp">
736 736 <property name="enabled">
737 737 <bool>false</bool>
738 738 </property>
739 739 <property name="text">
740 740 <string>Generate Bkp</string>
741 741 </property>
742 742 </widget>
743 743 </item>
744 744 <item>
745 745 <widget class="QPushButton" name="btnRestart">
746 746 <property name="enabled">
747 747 <bool>false</bool>
748 748 </property>
749 749 <property name="text">
750 750 <string>Restart</string>
751 751 </property>
752 752 </widget>
753 753 </item>
754 754 <item>
755 755 <widget class="QPushButton" name="btnStartburn">
756 756 <property name="enabled">
757 757 <bool>false</bool>
758 758 </property>
759 759 <property name="text">
760 760 <string>Start Burn</string>
761 761 </property>
762 762 </widget>
763 763 </item>
764 764 <item>
765 765 <widget class="QPushButton" name="btnStopburn">
766 766 <property name="enabled">
767 767 <bool>false</bool>
768 768 </property>
769 769 <property name="text">
770 770 <string>Stop Burn</string>
771 771 </property>
772 772 </widget>
773 773 </item>
774 774 </layout>
775 775 </item>
776 776 </layout>
777 777 </widget>
778 778 <widget class="QMenuBar" name="menubar">
779 779 <property name="geometry">
780 780 <rect>
781 781 <x>0</x>
782 782 <y>0</y>
783 <width>754</width>
784 <height>21</height>
783 <width>806</width>
784 <height>25</height>
785 785 </rect>
786 786 </property>
787 787 <widget class="QMenu" name="menuFile">
788 788 <property name="title">
789 789 <string>File</string>
790 790 </property>
791 791 <addaction name="actionSave_Config"/>
792 792 <addaction name="actionQuit"/>
793 793 </widget>
794 794 <widget class="QMenu" name="menuParameters">
795 795 <property name="title">
796 796 <string>Parameters</string>
797 797 </property>
798 798 <addaction name="actionChange_Parameters"/>
799 799 </widget>
800 800 <widget class="QMenu" name="menuHelp">
801 801 <property name="title">
802 802 <string>Help</string>
803 803 </property>
804 804 <addaction name="actionAbout"/>
805 805 </widget>
806 806 <addaction name="menuFile"/>
807 807 <addaction name="menuParameters"/>
808 808 <addaction name="menuHelp"/>
809 809 </widget>
810 810 <widget class="QStatusBar" name="statusbar"/>
811 811 <action name="actionChange_Parameters">
812 812 <property name="text">
813 813 <string>Change Parameters</string>
814 814 </property>
815 815 </action>
816 816 <action name="actionSave_Config">
817 817 <property name="text">
818 818 <string>Save Config</string>
819 819 </property>
820 820 </action>
821 821 <action name="actionQuit">
822 822 <property name="text">
823 823 <string>Quit</string>
824 824 </property>
825 825 </action>
826 826 <action name="actionAbout">
827 827 <property name="text">
828 828 <string>About</string>
829 829 </property>
830 830 </action>
831 831 </widget>
832 832 <tabstops>
833 833 <tabstop>txtDpath</tabstop>
834 834 <tabstop>btnDpath</tabstop>
835 835 <tabstop>txtRpath</tabstop>
836 836 <tabstop>btnRpath</tabstop>
837 837 <tabstop>lstDtype</tabstop>
838 838 <tabstop>txtDtype</tabstop>
839 839 <tabstop>chkMST</tabstop>
840 840 <tabstop>txtElabel</tabstop>
841 841 <tabstop>lstStartDay</tabstop>
842 842 <tabstop>lstStopDay</tabstop>
843 843 <tabstop>chkSimultaneously</tabstop>
844 844 <tabstop>chkSequentially</tabstop>
845 845 <tabstop>chkSalert</tabstop>
846 846 <tabstop>lstDcapacity</tabstop>
847 847 <tabstop>chkPSgraphic</tabstop>
848 848 <tabstop>lineEdit_17</tabstop>
849 849 <tabstop>txtSTATUSa</tabstop>
850 850 <tabstop>txtSTATUSb</tabstop>
851 851 <tabstop>txtSTATUSc</tabstop>
852 852 <tabstop>txtSTATUSd</tabstop>
853 853 <tabstop>txtINFOa</tabstop>
854 854 <tabstop>txtINFOb</tabstop>
855 855 <tabstop>txtINFOc</tabstop>
856 856 <tabstop>txtINFOd</tabstop>
857 857 <tabstop>txtSETa</tabstop>
858 858 <tabstop>txtSETb</tabstop>
859 859 <tabstop>txtSETc</tabstop>
860 860 <tabstop>txtSETd</tabstop>
861 861 <tabstop>tabWidget</tabstop>
862 862 <tabstop>txtSburn</tabstop>
863 863 <tabstop>btnGbkp</tabstop>
864 864 <tabstop>btnRestart</tabstop>
865 865 <tabstop>btnStartburn</tabstop>
866 866 <tabstop>btnStopburn</tabstop>
867 867 </tabstops>
868 868 <resources/>
869 869 <connections>
870 870 <connection>
871 871 <sender>chkSequentially</sender>
872 872 <signal>clicked()</signal>
873 873 <receiver>chkSimultaneously</receiver>
874 874 <slot>toggle()</slot>
875 875 <hints>
876 876 <hint type="sourcelabel">
877 877 <x>635</x>
878 878 <y>276</y>
879 879 </hint>
880 880 <hint type="destinationlabel">
881 881 <x>350</x>
882 882 <y>269</y>
883 883 </hint>
884 884 </hints>
885 885 </connection>
886 886 <connection>
887 887 <sender>chkSimultaneously</sender>
888 888 <signal>clicked()</signal>
889 889 <receiver>chkSequentially</receiver>
890 890 <slot>toggle()</slot>
891 891 <hints>
892 892 <hint type="sourcelabel">
893 893 <x>433</x>
894 894 <y>276</y>
895 895 </hint>
896 896 <hint type="destinationlabel">
897 897 <x>635</x>
898 898 <y>276</y>
899 899 </hint>
900 900 </hints>
901 901 </connection>
902 902 <connection>
903 903 <sender>chkDevA</sender>
904 904 <signal>toggled(bool)</signal>
905 905 <receiver>grpDevA</receiver>
906 906 <slot>setEnabled(bool)</slot>
907 907 <hints>
908 908 <hint type="sourcelabel">
909 909 <x>95</x>
910 910 <y>86</y>
911 911 </hint>
912 912 <hint type="destinationlabel">
913 913 <x>95</x>
914 914 <y>167</y>
915 915 </hint>
916 916 </hints>
917 917 </connection>
918 918 <connection>
919 919 <sender>chkDevB</sender>
920 920 <signal>toggled(bool)</signal>
921 921 <receiver>grpDevB</receiver>
922 922 <slot>setEnabled(bool)</slot>
923 923 <hints>
924 924 <hint type="sourcelabel">
925 925 <x>251</x>
926 926 <y>86</y>
927 927 </hint>
928 928 <hint type="destinationlabel">
929 929 <x>251</x>
930 930 <y>167</y>
931 931 </hint>
932 932 </hints>
933 933 </connection>
934 934 <connection>
935 935 <sender>chkDevC</sender>
936 936 <signal>toggled(bool)</signal>
937 937 <receiver>grpDevC</receiver>
938 938 <slot>setEnabled(bool)</slot>
939 939 <hints>
940 940 <hint type="sourcelabel">
941 941 <x>407</x>
942 942 <y>86</y>
943 943 </hint>
944 944 <hint type="destinationlabel">
945 945 <x>407</x>
946 946 <y>167</y>
947 947 </hint>
948 948 </hints>
949 949 </connection>
950 950 <connection>
951 951 <sender>chkDevD</sender>
952 952 <signal>toggled(bool)</signal>
953 953 <receiver>grpDevD</receiver>
954 954 <slot>setEnabled(bool)</slot>
955 955 <hints>
956 956 <hint type="sourcelabel">
957 957 <x>563</x>
958 958 <y>86</y>
959 959 </hint>
960 960 <hint type="destinationlabel">
961 961 <x>563</x>
962 962 <y>167</y>
963 963 </hint>
964 964 </hints>
965 965 </connection>
966 966 </connections>
967 967 </ui>
General Comments 0
You need to be logged in to leave comments. Login now