@@ -8,6 +8,7 | |||||
8 | from PyQt4.QtCore import pyqtSignature |
|
8 | from PyQt4.QtCore import pyqtSignature | |
9 | from PyQt4 import QtCore |
|
9 | from PyQt4 import QtCore | |
10 | from Ui_MainWindow import Ui_MainWindow |
|
10 | from Ui_MainWindow import Ui_MainWindow | |
|
11 | from Ui_Parameters import Ui_Parameters | |||
11 | from PyQt4 import QtGui |
|
12 | from PyQt4 import QtGui | |
12 | from subprocess import * |
|
13 | from subprocess import * | |
13 | import sys |
|
14 | import sys | |
@@ -25,6 +26,7 | |||||
25 | def __init__(self, parent = None): |
|
26 | def __init__(self, parent = None): | |
26 | QMainWindow.__init__(self, parent) |
|
27 | QMainWindow.__init__(self, parent) | |
27 | self.setupUi(self) |
|
28 | self.setupUi(self) | |
|
29 | ||||
28 | self.setupUi2() |
|
30 | self.setupUi2() | |
29 | #sys.stdout = self #redirige salida estandar |
|
31 | #sys.stdout = self #redirige salida estandar | |
30 |
|
32 | |||
@@ -64,7 +66,9 | |||||
64 |
|
66 | |||
65 | if os.path.isfile("parameters.conf"): |
|
67 | if os.path.isfile("parameters.conf"): | |
66 | functions2.enabled_items1(True, self) #Se bloquean los parametros de configuracion |
|
68 | functions2.enabled_items1(True, self) #Se bloquean los parametros de configuracion | |
67 |
|
69 | |||
|
70 | # self.connect(self.actionChange_Parameters, QtCore.SIGNAL("triggered()"), self.dlgui.exec) | |||
|
71 | self.connect(self.actionChange_Parameters, QtCore.SIGNAL("triggered()"), self.changeParameters) | |||
68 |
|
72 | |||
69 | self.var_process = QtCore.QProcess() |
|
73 | self.var_process = QtCore.QProcess() | |
70 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput) |
|
74 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput) | |
@@ -74,7 +78,18 | |||||
74 |
|
78 | |||
75 | def write(self, txt): |
|
79 | def write(self, txt): | |
76 | self.txtInfo.append(str(txt)) |
|
80 | self.txtInfo.append(str(txt)) | |
77 |
|
81 | |||
|
82 | def changeParameters(self): | |||
|
83 | dlg=QtGui.QDialog() | |||
|
84 | dlgui=Ui_Parameters() | |||
|
85 | dlgui.setupUi(dlg) | |||
|
86 | if (dlg.exec_() == QtGui.QDialog.Accepted): | |||
|
87 | self.txtInfo.append(str(dlgui.txtNcopys.value())) | |||
|
88 | # txtDisc | |||
|
89 | # txtCopy | |||
|
90 | ||||
|
91 | ||||
|
92 | ||||
78 |
|
93 | |||
79 | #----------------------------------------------------- Funciones del proceso --------------------------------------------------------------- |
|
94 | #----------------------------------------------------- Funciones del proceso --------------------------------------------------------------- | |
80 |
|
95 | |||
@@ -420,3 +435,21 | |||||
420 | var_dev = str(self.txtDeviceD.text()) |
|
435 | var_dev = str(self.txtDeviceD.text()) | |
421 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev |
|
436 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev | |
422 | commands.getstatusoutput(var_cmd) |
|
437 | commands.getstatusoutput(var_cmd) | |
|
438 | ||||
|
439 | @pyqtSignature("") | |||
|
440 | def on_btnTDpath_clicked(self): | |||
|
441 | """ | |||
|
442 | Slot documentation goes here. | |||
|
443 | """ | |||
|
444 | self.var_TDpath= str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |||
|
445 | self.txtTDpath.setText(self.var_TDpath) | |||
|
446 | self.statusTDpath = functions.dir_exists(self.var_TDpath, self) | |||
|
447 | ||||
|
448 | ||||
|
449 | @pyqtSignature("") | |||
|
450 | def on_btnCHstart_clicked(self): | |||
|
451 | """ | |||
|
452 | Slot documentation goes here. | |||
|
453 | """ | |||
|
454 | # TODO: not implemented yet | |||
|
455 | raise NotImplementedError |
@@ -27,7 +27,7 | |||||
27 | </sizepolicy> |
|
27 | </sizepolicy> | |
28 | </property> |
|
28 | </property> | |
29 | <property name="currentIndex"> |
|
29 | <property name="currentIndex"> | |
30 |
<number> |
|
30 | <number>2</number> | |
31 | </property> |
|
31 | </property> | |
32 | <widget class="QWidget" name="tabParameters"> |
|
32 | <widget class="QWidget" name="tabParameters"> | |
33 | <property name="enabled"> |
|
33 | <property name="enabled"> | |
@@ -1098,10 +1098,10 | |||||
1098 | <item> |
|
1098 | <item> | |
1099 | <widget class="QCheckBox" name="chkCheck"> |
|
1099 | <widget class="QCheckBox" name="chkCheck"> | |
1100 | <property name="enabled"> |
|
1100 | <property name="enabled"> | |
1101 |
<bool> |
|
1101 | <bool>true</bool> | |
1102 | </property> |
|
1102 | </property> | |
1103 | <property name="text"> |
|
1103 | <property name="text"> | |
1104 |
<string> |
|
1104 | <string>MANUAL</string> | |
1105 | </property> |
|
1105 | </property> | |
1106 | </widget> |
|
1106 | </widget> | |
1107 | </item> |
|
1107 | </item> |
@@ -2,7 +2,7 | |||||
2 |
|
2 | |||
3 | # Form implementation generated from reading ui file '/home/ricardoar/JRO_SVN/eric4/jro_backup_manager/ui/MainWindow.ui' |
|
3 | # Form implementation generated from reading ui file '/home/ricardoar/JRO_SVN/eric4/jro_backup_manager/ui/MainWindow.ui' | |
4 | # |
|
4 | # | |
5 |
# Created: S |
|
5 | # Created: Sun May 23 12:15:30 2010 | |
6 | # by: PyQt4 UI code generator 4.7.2 |
|
6 | # by: PyQt4 UI code generator 4.7.2 | |
7 | # |
|
7 | # | |
8 | # WARNING! All changes made in this file will be lost! |
|
8 | # WARNING! All changes made in this file will be lost! | |
@@ -505,7 +505,7 | |||||
505 | spacerItem15 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) |
|
505 | spacerItem15 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) | |
506 | self.horizontalLayout_20.addItem(spacerItem15) |
|
506 | self.horizontalLayout_20.addItem(spacerItem15) | |
507 | self.chkCheck = QtGui.QCheckBox(self.tabStatus) |
|
507 | self.chkCheck = QtGui.QCheckBox(self.tabStatus) | |
508 |
self.chkCheck.setEnabled( |
|
508 | self.chkCheck.setEnabled(True) | |
509 | self.chkCheck.setObjectName("chkCheck") |
|
509 | self.chkCheck.setObjectName("chkCheck") | |
510 | self.horizontalLayout_20.addWidget(self.chkCheck) |
|
510 | self.horizontalLayout_20.addWidget(self.chkCheck) | |
511 | spacerItem16 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
|
511 | spacerItem16 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) | |
@@ -663,7 +663,7 | |||||
663 | self.lblDevB_2.setText(QtGui.QApplication.translate("MainWindow", "DEV B", None, QtGui.QApplication.UnicodeUTF8)) |
|
663 | self.lblDevB_2.setText(QtGui.QApplication.translate("MainWindow", "DEV B", None, QtGui.QApplication.UnicodeUTF8)) | |
664 | self.lblDevC_2.setText(QtGui.QApplication.translate("MainWindow", "DEV C", None, QtGui.QApplication.UnicodeUTF8)) |
|
664 | self.lblDevC_2.setText(QtGui.QApplication.translate("MainWindow", "DEV C", None, QtGui.QApplication.UnicodeUTF8)) | |
665 | self.lblDevD_2.setText(QtGui.QApplication.translate("MainWindow", "DEV D", None, QtGui.QApplication.UnicodeUTF8)) |
|
665 | self.lblDevD_2.setText(QtGui.QApplication.translate("MainWindow", "DEV D", None, QtGui.QApplication.UnicodeUTF8)) | |
666 |
self.chkCheck.setText(QtGui.QApplication.translate("MainWindow", " |
|
666 | self.chkCheck.setText(QtGui.QApplication.translate("MainWindow", "MANUAL", None, QtGui.QApplication.UnicodeUTF8)) | |
667 | self.btnCHstart.setText(QtGui.QApplication.translate("MainWindow", "START", None, QtGui.QApplication.UnicodeUTF8)) |
|
667 | self.btnCHstart.setText(QtGui.QApplication.translate("MainWindow", "START", None, QtGui.QApplication.UnicodeUTF8)) | |
668 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabStatus), QtGui.QApplication.translate("MainWindow", "Status Burn", None, QtGui.QApplication.UnicodeUTF8)) |
|
668 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabStatus), QtGui.QApplication.translate("MainWindow", "Status Burn", None, QtGui.QApplication.UnicodeUTF8)) | |
669 | self.btnGbkp.setText(QtGui.QApplication.translate("MainWindow", "Generate Bkp", None, QtGui.QApplication.UnicodeUTF8)) |
|
669 | self.btnGbkp.setText(QtGui.QApplication.translate("MainWindow", "Generate Bkp", None, QtGui.QApplication.UnicodeUTF8)) |
General Comments 0
You need to be logged in to leave comments.
Login now