@@ -8,6 +8,7 | |||
|
8 | 8 | from PyQt4.QtCore import pyqtSignature |
|
9 | 9 | from PyQt4 import QtCore |
|
10 | 10 | from Ui_MainWindow import Ui_MainWindow |
|
11 | from Ui_Parameters import Ui_Parameters | |
|
11 | 12 | from PyQt4 import QtGui |
|
12 | 13 | from subprocess import * |
|
13 | 14 | import sys |
@@ -25,6 +26,7 | |||
|
25 | 26 | def __init__(self, parent = None): |
|
26 | 27 | QMainWindow.__init__(self, parent) |
|
27 | 28 | self.setupUi(self) |
|
29 | ||
|
28 | 30 | self.setupUi2() |
|
29 | 31 | #sys.stdout = self #redirige salida estandar |
|
30 | 32 | |
@@ -64,7 +66,9 | |||
|
64 | 66 | |
|
65 | 67 | if os.path.isfile("parameters.conf"): |
|
66 | 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 | 73 | self.var_process = QtCore.QProcess() |
|
70 | 74 | self.connect(self.var_process, QtCore.SIGNAL('readyReadStandardOutput()'), self.readOuput) |
@@ -74,7 +78,18 | |||
|
74 | 78 | |
|
75 | 79 | def write(self, txt): |
|
76 | 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 | 94 | #----------------------------------------------------- Funciones del proceso --------------------------------------------------------------- |
|
80 | 95 | |
@@ -420,3 +435,21 | |||
|
420 | 435 | var_dev = str(self.txtDeviceD.text()) |
|
421 | 436 | var_cmd = 'eject ' + var_dev + '; eject -t ' + var_dev |
|
422 | 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 | 27 | </sizepolicy> |
|
28 | 28 | </property> |
|
29 | 29 | <property name="currentIndex"> |
|
30 |
<number> |
|
|
30 | <number>2</number> | |
|
31 | 31 | </property> |
|
32 | 32 | <widget class="QWidget" name="tabParameters"> |
|
33 | 33 | <property name="enabled"> |
@@ -1098,10 +1098,10 | |||
|
1098 | 1098 | <item> |
|
1099 | 1099 | <widget class="QCheckBox" name="chkCheck"> |
|
1100 | 1100 | <property name="enabled"> |
|
1101 |
<bool> |
|
|
1101 | <bool>true</bool> | |
|
1102 | 1102 | </property> |
|
1103 | 1103 | <property name="text"> |
|
1104 |
<string> |
|
|
1104 | <string>MANUAL</string> | |
|
1105 | 1105 | </property> |
|
1106 | 1106 | </widget> |
|
1107 | 1107 | </item> |
@@ -2,7 +2,7 | |||
|
2 | 2 | |
|
3 | 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 | 6 | # by: PyQt4 UI code generator 4.7.2 |
|
7 | 7 | # |
|
8 | 8 | # WARNING! All changes made in this file will be lost! |
@@ -505,7 +505,7 | |||
|
505 | 505 | spacerItem15 = QtGui.QSpacerItem(50, 20, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum) |
|
506 | 506 | self.horizontalLayout_20.addItem(spacerItem15) |
|
507 | 507 | self.chkCheck = QtGui.QCheckBox(self.tabStatus) |
|
508 |
self.chkCheck.setEnabled( |
|
|
508 | self.chkCheck.setEnabled(True) | |
|
509 | 509 | self.chkCheck.setObjectName("chkCheck") |
|
510 | 510 | self.horizontalLayout_20.addWidget(self.chkCheck) |
|
511 | 511 | spacerItem16 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum) |
@@ -663,7 +663,7 | |||
|
663 | 663 | self.lblDevB_2.setText(QtGui.QApplication.translate("MainWindow", "DEV B", None, QtGui.QApplication.UnicodeUTF8)) |
|
664 | 664 | self.lblDevC_2.setText(QtGui.QApplication.translate("MainWindow", "DEV C", None, QtGui.QApplication.UnicodeUTF8)) |
|
665 | 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 | 667 | self.btnCHstart.setText(QtGui.QApplication.translate("MainWindow", "START", None, QtGui.QApplication.UnicodeUTF8)) |
|
668 | 668 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabStatus), QtGui.QApplication.translate("MainWindow", "Status Burn", None, QtGui.QApplication.UnicodeUTF8)) |
|
669 | 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