@@ -20,6 +20,12 | |||||
20 | def __init__(self, parent = None): |
|
20 | def __init__(self, parent = None): | |
21 | QMainWindow.__init__(self, parent) |
|
21 | QMainWindow.__init__(self, parent) | |
22 | self.setupUi(self) |
|
22 | self.setupUi(self) | |
|
23 | self.setupUi2() | |||
|
24 | ||||
|
25 | def setupUi2(self): | |||
|
26 | print 'hi' | |||
|
27 | ||||
|
28 | ||||
23 |
|
29 | |||
24 | @pyqtSignature("") |
|
30 | @pyqtSignature("") | |
25 | def on_btnDpath_clicked(self): |
|
31 | def on_btnDpath_clicked(self): | |
@@ -38,22 +44,30 | |||||
38 | filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) |
|
44 | filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) | |
39 | self.txtRpath.setText(filename) |
|
45 | self.txtRpath.setText(filename) | |
40 |
|
46 | |||
41 | # TODO: not implemented yet |
|
47 | ||
42 | # raise NotImplementedError |
|
|||
43 |
|
48 | |||
44 | @pyqtSignature("") |
|
49 | @pyqtSignature("") | |
45 | def on_txtDpath_editingFinished(self): |
|
50 | def on_txtDpath_editingFinished(self): | |
46 |
|
51 | |||
47 | var_Dpath=self.txtDpath.text() |
|
52 | ||
48 |
|
||||
49 | #Usando el modulo "subprocess" eric4 pide seleccion del tipo de subproceso (padre o hijo) |
|
53 | #Usando el modulo "subprocess" eric4 pide seleccion del tipo de subproceso (padre o hijo) | |
50 | #por ello se prefiere usar el modulo "commands" |
|
54 | #por ello se prefiere usar el modulo "commands" | |
51 | #p1= Popen(['find', var_Dpath, '-name', '*.r'], stdout=PIPE) |
|
55 | #p1= Popen(['find', var_Dpath, '-name', '*.r'], stdout=PIPE) | |
52 | #p2= Popen(['awk', '-F/', '{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE) |
|
56 | #p2= Popen(['awk', '-F/', '{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE) | |
53 | #output_p2= p2.communicate()[0] |
|
57 | #output_p2= p2.communicate()[0] | |
54 | #self.txtInfo.setText(output_p2) |
|
58 | #self.txtInfo.setText(output_p2) | |
55 |
|
59 | |||
56 | var_cmd="find " + str(var_Dpath) + " -name *.r | awk -F/ '{print substr($NF,2,7)}' | sort| uniq" |
|
60 | ||
|
61 | var_Dpath=self.txtDpath.text() | |||
|
62 | var_cmd="test -d "+str(var_Dpath) | |||
|
63 | var_output=commands.getstatusoutput(var_cmd)[0] | |||
|
64 | if var_output != 0: | |||
|
65 | self.txtInfo.setText(str(var_output)) | |||
|
66 | return | |||
|
67 | ||||
|
68 | ||||
|
69 | var_Dtype=self.txtDtype.text() | |||
|
70 | var_cmd="find " + str(var_Dpath) + " -name *."+ str(var_Dtype) +" | awk -F/ '{print substr($NF,2,7)}' | sort| uniq" | |||
57 | output_p2=commands.getstatusoutput(var_cmd)[1] |
|
71 | output_p2=commands.getstatusoutput(var_cmd)[1] | |
58 |
|
72 | |||
59 | self.txtInfo.setText(output_p2) |
|
73 | self.txtInfo.setText(output_p2) | |
@@ -72,3 +86,28 | |||||
72 | self.txtInfo.setText(str(self.lstStartDay.count())) |
|
86 | self.txtInfo.setText(str(self.lstStartDay.count())) | |
73 | self.lstStopDay.setCurrentIndex(self.lstStartDay.count()-1) |
|
87 | self.lstStopDay.setCurrentIndex(self.lstStartDay.count()-1) | |
74 |
|
88 | |||
|
89 | @pyqtSignature("int") | |||
|
90 | def on_lstDtype_activated(self, index): | |||
|
91 | """ | |||
|
92 | Permite elegir entre los tipos de archivos | |||
|
93 | """ | |||
|
94 | if index == 0: | |||
|
95 | var_type='r' | |||
|
96 | elif index == 1: | |||
|
97 | var_type='pdata' | |||
|
98 | elif index == 2: | |||
|
99 | var_type='sswma' | |||
|
100 | ||||
|
101 | if index != 3: | |||
|
102 | self.txtDtype.setText(var_type) | |||
|
103 | self.txtDtype.setReadOnly(True) | |||
|
104 | else: | |||
|
105 | self.txtDtype.setText('') | |||
|
106 | self.txtDtype.setReadOnly(False) | |||
|
107 | ||||
|
108 | @pyqtSignature("") | |||
|
109 | def on_txtDtype_editingFinished(self): | |||
|
110 | """ | |||
|
111 | Se activa cuando el tipo de archivo es ingresado manualmente | |||
|
112 | """ | |||
|
113 | self.on_txtDpath_editingFinished() |
@@ -6,7 +6,7 | |||||
6 | <rect> |
|
6 | <rect> | |
7 | <x>0</x> |
|
7 | <x>0</x> | |
8 | <y>0</y> |
|
8 | <y>0</y> | |
9 |
<width>5 |
|
9 | <width>593</width> | |
10 | <height>787</height> |
|
10 | <height>787</height> | |
11 | </rect> |
|
11 | </rect> | |
12 | </property> |
|
12 | </property> | |
@@ -88,10 +88,38 | |||||
88 | <item> |
|
88 | <item> | |
89 | <layout class="QHBoxLayout" name="horizontalLayout_4"> |
|
89 | <layout class="QHBoxLayout" name="horizontalLayout_4"> | |
90 | <item> |
|
90 | <item> | |
91 |
<widget class="QComboBox" name="lstDtype" |
|
91 | <widget class="QComboBox" name="lstDtype"> | |
92 |
< |
|
92 | <item> | |
93 | <item> |
|
93 | <property name="text"> | |
94 | <widget class="QLineEdit" name="txtDtype"/> |
|
94 | <string>Raw Data</string> | |
|
95 | </property> | |||
|
96 | </item> | |||
|
97 | <item> | |||
|
98 | <property name="text"> | |||
|
99 | <string>Process Data</string> | |||
|
100 | </property> | |||
|
101 | </item> | |||
|
102 | <item> | |||
|
103 | <property name="text"> | |||
|
104 | <string>BLTR Data</string> | |||
|
105 | </property> | |||
|
106 | </item> | |||
|
107 | <item> | |||
|
108 | <property name="text"> | |||
|
109 | <string>Other</string> | |||
|
110 | </property> | |||
|
111 | </item> | |||
|
112 | </widget> | |||
|
113 | </item> | |||
|
114 | <item> | |||
|
115 | <widget class="QLineEdit" name="txtDtype"> | |||
|
116 | <property name="text"> | |||
|
117 | <string>r</string> | |||
|
118 | </property> | |||
|
119 | <property name="readOnly"> | |||
|
120 | <bool>true</bool> | |||
|
121 | </property> | |||
|
122 | </widget> | |||
95 | </item> |
|
123 | </item> | |
96 | <item> |
|
124 | <item> | |
97 | <widget class="QCheckBox" name="chkMST"> |
|
125 | <widget class="QCheckBox" name="chkMST"> | |
@@ -390,10 +418,43 | |||||
390 | <enum>QLayout::SetFixedSize</enum> |
|
418 | <enum>QLayout::SetFixedSize</enum> | |
391 | </property> |
|
419 | </property> | |
392 | <item> |
|
420 | <item> | |
393 |
<widget class="QComboBox" name="lstDcapacity" |
|
421 | <widget class="QComboBox" name="lstDcapacity"> | |
394 | </item> |
|
422 | <property name="currentIndex"> | |
395 | <item> |
|
423 | <number>2</number> | |
396 | <widget class="QLineEdit" name="txtDcapacity"/> |
|
424 | </property> | |
|
425 | <item> | |||
|
426 | <property name="text"> | |||
|
427 | <string>BluRay [25.0 GB]</string> | |||
|
428 | </property> | |||
|
429 | </item> | |||
|
430 | <item> | |||
|
431 | <property name="text"> | |||
|
432 | <string>DVD2 [8.5 GB]</string> | |||
|
433 | </property> | |||
|
434 | </item> | |||
|
435 | <item> | |||
|
436 | <property name="text"> | |||
|
437 | <string>DVD1 [4.7 GB]</string> | |||
|
438 | </property> | |||
|
439 | </item> | |||
|
440 | <item> | |||
|
441 | <property name="text"> | |||
|
442 | <string>CD [0.7 GB]</string> | |||
|
443 | </property> | |||
|
444 | </item> | |||
|
445 | <item> | |||
|
446 | <property name="text"> | |||
|
447 | <string>Other [? GB]</string> | |||
|
448 | </property> | |||
|
449 | </item> | |||
|
450 | </widget> | |||
|
451 | </item> | |||
|
452 | <item> | |||
|
453 | <widget class="QLineEdit" name="txtDcapacity"> | |||
|
454 | <property name="readOnly"> | |||
|
455 | <bool>false</bool> | |||
|
456 | </property> | |||
|
457 | </widget> | |||
397 | </item> |
|
458 | </item> | |
398 | <item> |
|
459 | <item> | |
399 | <widget class="QCheckBox" name="chkPSgraphic"> |
|
460 | <widget class="QCheckBox" name="chkPSgraphic"> | |
@@ -581,7 +642,7 | |||||
581 | <rect> |
|
642 | <rect> | |
582 | <x>0</x> |
|
643 | <x>0</x> | |
583 | <y>0</y> |
|
644 | <y>0</y> | |
584 |
<width>5 |
|
645 | <width>593</width> | |
585 | <height>25</height> |
|
646 | <height>25</height> | |
586 | </rect> |
|
647 | </rect> | |
587 | </property> |
|
648 | </property> | |
@@ -689,5 +750,22 | |||||
689 | <tabstop>btnStopburn</tabstop> |
|
750 | <tabstop>btnStopburn</tabstop> | |
690 | </tabstops> |
|
751 | </tabstops> | |
691 | <resources/> |
|
752 | <resources/> | |
692 |
<connections |
|
753 | <connections> | |
|
754 | <connection> | |||
|
755 | <sender>chkDevA</sender> | |||
|
756 | <signal>toggled(bool)</signal> | |||
|
757 | <receiver>txtDeviceA</receiver> | |||
|
758 | <slot>setEnabled(bool)</slot> | |||
|
759 | <hints> | |||
|
760 | <hint type="sourcelabel"> | |||
|
761 | <x>102</x> | |||
|
762 | <y>93</y> | |||
|
763 | </hint> | |||
|
764 | <hint type="destinationlabel"> | |||
|
765 | <x>102</x> | |||
|
766 | <y>135</y> | |||
|
767 | </hint> | |||
|
768 | </hints> | |||
|
769 | </connection> | |||
|
770 | </connections> | |||
693 | </ui> |
|
771 | </ui> |
@@ -1,9 +1,9 | |||||
1 | # -*- coding: utf-8 -*- |
|
1 | # -*- coding: utf-8 -*- | |
2 |
|
2 | |||
3 |
# Form implementation generated from reading ui file '/home/r |
|
3 | # Form implementation generated from reading ui file '/home/ricardoar/principal/JRO_SVN/eric4/jro_backup_manager/ui/MainWindow.ui' | |
4 | # |
|
4 | # | |
5 |
# Created: |
|
5 | # Created: Mon Apr 26 10:36:51 2010 | |
6 | # by: PyQt4 UI code generator 4.7 |
|
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! | |
9 |
|
9 | |||
@@ -12,7 +12,7 | |||||
12 | class Ui_MainWindow(object): |
|
12 | class Ui_MainWindow(object): | |
13 | def setupUi(self, MainWindow): |
|
13 | def setupUi(self, MainWindow): | |
14 | MainWindow.setObjectName("MainWindow") |
|
14 | MainWindow.setObjectName("MainWindow") | |
15 |
MainWindow.resize(5 |
|
15 | MainWindow.resize(593, 787) | |
16 | self.centralwidget = QtGui.QWidget(MainWindow) |
|
16 | self.centralwidget = QtGui.QWidget(MainWindow) | |
17 | self.centralwidget.setObjectName("centralwidget") |
|
17 | self.centralwidget.setObjectName("centralwidget") | |
18 | self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget) |
|
18 | self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget) | |
@@ -65,8 +65,13 | |||||
65 | self.horizontalLayout_4.setObjectName("horizontalLayout_4") |
|
65 | self.horizontalLayout_4.setObjectName("horizontalLayout_4") | |
66 | self.lstDtype = QtGui.QComboBox(self.tabParameters) |
|
66 | self.lstDtype = QtGui.QComboBox(self.tabParameters) | |
67 | self.lstDtype.setObjectName("lstDtype") |
|
67 | self.lstDtype.setObjectName("lstDtype") | |
|
68 | self.lstDtype.addItem("") | |||
|
69 | self.lstDtype.addItem("") | |||
|
70 | self.lstDtype.addItem("") | |||
|
71 | self.lstDtype.addItem("") | |||
68 | self.horizontalLayout_4.addWidget(self.lstDtype) |
|
72 | self.horizontalLayout_4.addWidget(self.lstDtype) | |
69 | self.txtDtype = QtGui.QLineEdit(self.tabParameters) |
|
73 | self.txtDtype = QtGui.QLineEdit(self.tabParameters) | |
|
74 | self.txtDtype.setReadOnly(True) | |||
70 | self.txtDtype.setObjectName("txtDtype") |
|
75 | self.txtDtype.setObjectName("txtDtype") | |
71 | self.horizontalLayout_4.addWidget(self.txtDtype) |
|
76 | self.horizontalLayout_4.addWidget(self.txtDtype) | |
72 | self.chkMST = QtGui.QCheckBox(self.tabParameters) |
|
77 | self.chkMST = QtGui.QCheckBox(self.tabParameters) | |
@@ -253,8 +258,14 | |||||
253 | self.horizontalLayout_10.setObjectName("horizontalLayout_10") |
|
258 | self.horizontalLayout_10.setObjectName("horizontalLayout_10") | |
254 | self.lstDcapacity = QtGui.QComboBox(self.tabDconfig) |
|
259 | self.lstDcapacity = QtGui.QComboBox(self.tabDconfig) | |
255 | self.lstDcapacity.setObjectName("lstDcapacity") |
|
260 | self.lstDcapacity.setObjectName("lstDcapacity") | |
|
261 | self.lstDcapacity.addItem("") | |||
|
262 | self.lstDcapacity.addItem("") | |||
|
263 | self.lstDcapacity.addItem("") | |||
|
264 | self.lstDcapacity.addItem("") | |||
|
265 | self.lstDcapacity.addItem("") | |||
256 | self.horizontalLayout_10.addWidget(self.lstDcapacity) |
|
266 | self.horizontalLayout_10.addWidget(self.lstDcapacity) | |
257 | self.txtDcapacity = QtGui.QLineEdit(self.tabDconfig) |
|
267 | self.txtDcapacity = QtGui.QLineEdit(self.tabDconfig) | |
|
268 | self.txtDcapacity.setReadOnly(False) | |||
258 | self.txtDcapacity.setObjectName("txtDcapacity") |
|
269 | self.txtDcapacity.setObjectName("txtDcapacity") | |
259 | self.horizontalLayout_10.addWidget(self.txtDcapacity) |
|
270 | self.horizontalLayout_10.addWidget(self.txtDcapacity) | |
260 | self.chkPSgraphic = QtGui.QCheckBox(self.tabDconfig) |
|
271 | self.chkPSgraphic = QtGui.QCheckBox(self.tabDconfig) | |
@@ -367,7 +378,7 | |||||
367 | self.verticalLayout_3.addLayout(self.horizontalLayout_2) |
|
378 | self.verticalLayout_3.addLayout(self.horizontalLayout_2) | |
368 | MainWindow.setCentralWidget(self.centralwidget) |
|
379 | MainWindow.setCentralWidget(self.centralwidget) | |
369 | self.menubar = QtGui.QMenuBar(MainWindow) |
|
380 | self.menubar = QtGui.QMenuBar(MainWindow) | |
370 |
self.menubar.setGeometry(QtCore.QRect(0, 0, 5 |
|
381 | self.menubar.setGeometry(QtCore.QRect(0, 0, 593, 25)) | |
371 | self.menubar.setObjectName("menubar") |
|
382 | self.menubar.setObjectName("menubar") | |
372 | self.menuFile = QtGui.QMenu(self.menubar) |
|
383 | self.menuFile = QtGui.QMenu(self.menubar) | |
373 | self.menuFile.setObjectName("menuFile") |
|
384 | self.menuFile.setObjectName("menuFile") | |
@@ -397,6 +408,8 | |||||
397 |
|
408 | |||
398 | self.retranslateUi(MainWindow) |
|
409 | self.retranslateUi(MainWindow) | |
399 | self.tabWidget.setCurrentIndex(0) |
|
410 | self.tabWidget.setCurrentIndex(0) | |
|
411 | self.lstDcapacity.setCurrentIndex(2) | |||
|
412 | QtCore.QObject.connect(self.chkDevA, QtCore.SIGNAL("toggled(bool)"), self.txtDeviceA.setEnabled) | |||
400 | QtCore.QMetaObject.connectSlotsByName(MainWindow) |
|
413 | QtCore.QMetaObject.connectSlotsByName(MainWindow) | |
401 | MainWindow.setTabOrder(self.txtDpath, self.btnDpath) |
|
414 | MainWindow.setTabOrder(self.txtDpath, self.btnDpath) | |
402 | MainWindow.setTabOrder(self.btnDpath, self.txtRpath) |
|
415 | MainWindow.setTabOrder(self.btnDpath, self.txtRpath) | |
@@ -459,6 +472,11 | |||||
459 | self.btnDpath.setText(QtGui.QApplication.translate("MainWindow", "Data Path", None, QtGui.QApplication.UnicodeUTF8)) |
|
472 | self.btnDpath.setText(QtGui.QApplication.translate("MainWindow", "Data Path", None, QtGui.QApplication.UnicodeUTF8)) | |
460 | self.btnRpath.setText(QtGui.QApplication.translate("MainWindow", "Resource Path", None, QtGui.QApplication.UnicodeUTF8)) |
|
473 | self.btnRpath.setText(QtGui.QApplication.translate("MainWindow", "Resource Path", None, QtGui.QApplication.UnicodeUTF8)) | |
461 | self.lblDtype.setText(QtGui.QApplication.translate("MainWindow", "Data Type", None, QtGui.QApplication.UnicodeUTF8)) |
|
474 | self.lblDtype.setText(QtGui.QApplication.translate("MainWindow", "Data Type", None, QtGui.QApplication.UnicodeUTF8)) | |
|
475 | self.lstDtype.setItemText(0, QtGui.QApplication.translate("MainWindow", "Raw Data", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
476 | self.lstDtype.setItemText(1, QtGui.QApplication.translate("MainWindow", "Process Data", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
477 | self.lstDtype.setItemText(2, QtGui.QApplication.translate("MainWindow", "BLTR Data", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
478 | self.lstDtype.setItemText(3, QtGui.QApplication.translate("MainWindow", "Other", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
479 | self.txtDtype.setText(QtGui.QApplication.translate("MainWindow", "r", None, QtGui.QApplication.UnicodeUTF8)) | |||
462 | self.chkMST.setText(QtGui.QApplication.translate("MainWindow", "MST-ISR Data", None, QtGui.QApplication.UnicodeUTF8)) |
|
480 | self.chkMST.setText(QtGui.QApplication.translate("MainWindow", "MST-ISR Data", None, QtGui.QApplication.UnicodeUTF8)) | |
463 | self.lblElabel.setText(QtGui.QApplication.translate("MainWindow", "Exp. Label at device", None, QtGui.QApplication.UnicodeUTF8)) |
|
481 | self.lblElabel.setText(QtGui.QApplication.translate("MainWindow", "Exp. Label at device", None, QtGui.QApplication.UnicodeUTF8)) | |
464 | self.lblCopys.setText(QtGui.QApplication.translate("MainWindow", "Copys", None, QtGui.QApplication.UnicodeUTF8)) |
|
482 | self.lblCopys.setText(QtGui.QApplication.translate("MainWindow", "Copys", None, QtGui.QApplication.UnicodeUTF8)) | |
@@ -481,6 +499,11 | |||||
481 | self.chkSequentially.setText(QtGui.QApplication.translate("MainWindow", "Sequentially", None, QtGui.QApplication.UnicodeUTF8)) |
|
499 | self.chkSequentially.setText(QtGui.QApplication.translate("MainWindow", "Sequentially", None, QtGui.QApplication.UnicodeUTF8)) | |
482 | self.lblDcapacity.setText(QtGui.QApplication.translate("MainWindow", "Device Capacity", None, QtGui.QApplication.UnicodeUTF8)) |
|
500 | self.lblDcapacity.setText(QtGui.QApplication.translate("MainWindow", "Device Capacity", None, QtGui.QApplication.UnicodeUTF8)) | |
483 | self.chkSalert.setText(QtGui.QApplication.translate("MainWindow", "Sound Alert", None, QtGui.QApplication.UnicodeUTF8)) |
|
501 | self.chkSalert.setText(QtGui.QApplication.translate("MainWindow", "Sound Alert", None, QtGui.QApplication.UnicodeUTF8)) | |
|
502 | self.lstDcapacity.setItemText(0, QtGui.QApplication.translate("MainWindow", "BluRay [25.0 GB]", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
503 | self.lstDcapacity.setItemText(1, QtGui.QApplication.translate("MainWindow", "DVD2 [8.5 GB]", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
504 | self.lstDcapacity.setItemText(2, QtGui.QApplication.translate("MainWindow", "DVD1 [4.7 GB]", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
505 | self.lstDcapacity.setItemText(3, QtGui.QApplication.translate("MainWindow", "CD [0.7 GB]", None, QtGui.QApplication.UnicodeUTF8)) | |||
|
506 | self.lstDcapacity.setItemText(4, QtGui.QApplication.translate("MainWindow", "Other [? GB]", None, QtGui.QApplication.UnicodeUTF8)) | |||
484 | self.chkPSgraphic.setText(QtGui.QApplication.translate("MainWindow", "PS Graphic", None, QtGui.QApplication.UnicodeUTF8)) |
|
507 | self.chkPSgraphic.setText(QtGui.QApplication.translate("MainWindow", "PS Graphic", None, QtGui.QApplication.UnicodeUTF8)) | |
485 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabDconfig), QtGui.QApplication.translate("MainWindow", "Device Config.", None, QtGui.QApplication.UnicodeUTF8)) |
|
508 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabDconfig), QtGui.QApplication.translate("MainWindow", "Device Config.", None, QtGui.QApplication.UnicodeUTF8)) | |
486 | self.lblSTATUS.setText(QtGui.QApplication.translate("MainWindow", "STATUS", None, QtGui.QApplication.UnicodeUTF8)) |
|
509 | self.lblSTATUS.setText(QtGui.QApplication.translate("MainWindow", "STATUS", None, QtGui.QApplication.UnicodeUTF8)) |
General Comments 0
You need to be logged in to leave comments.
Login now