@@ -20,6 +20,12 | |||
|
20 | 20 | def __init__(self, parent = None): |
|
21 | 21 | QMainWindow.__init__(self, parent) |
|
22 | 22 | self.setupUi(self) |
|
23 | self.setupUi2() | |
|
24 | ||
|
25 | def setupUi2(self): | |
|
26 | print 'hi' | |
|
27 | ||
|
28 | ||
|
23 | 29 | |
|
24 | 30 | @pyqtSignature("") |
|
25 | 31 | def on_btnDpath_clicked(self): |
@@ -38,22 +44,30 | |||
|
38 | 44 | filename = QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly) |
|
39 | 45 | self.txtRpath.setText(filename) |
|
40 | 46 | |
|
41 | # TODO: not implemented yet | |
|
42 | # raise NotImplementedError | |
|
47 | ||
|
43 | 48 | |
|
44 | 49 | @pyqtSignature("") |
|
45 | 50 | def on_txtDpath_editingFinished(self): |
|
46 | 51 | |
|
47 | var_Dpath=self.txtDpath.text() | |
|
48 | ||
|
52 | ||
|
49 | 53 | #Usando el modulo "subprocess" eric4 pide seleccion del tipo de subproceso (padre o hijo) |
|
50 | 54 | #por ello se prefiere usar el modulo "commands" |
|
51 | 55 | #p1= Popen(['find', var_Dpath, '-name', '*.r'], stdout=PIPE) |
|
52 | 56 | #p2= Popen(['awk', '-F/', '{print substr($NF,2,7)}'], stdin=p1.stdout, stdout=PIPE) |
|
53 | 57 | #output_p2= p2.communicate()[0] |
|
54 | 58 | #self.txtInfo.setText(output_p2) |
|
55 | ||
|
56 | var_cmd="find " + str(var_Dpath) + " -name *.r | awk -F/ '{print substr($NF,2,7)}' | sort| uniq" | |
|
59 | ||
|
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 | 71 | output_p2=commands.getstatusoutput(var_cmd)[1] |
|
58 | 72 | |
|
59 | 73 | self.txtInfo.setText(output_p2) |
@@ -72,3 +86,28 | |||
|
72 | 86 | self.txtInfo.setText(str(self.lstStartDay.count())) |
|
73 | 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 | 6 | <rect> |
|
7 | 7 | <x>0</x> |
|
8 | 8 | <y>0</y> |
|
9 |
<width>5 |
|
|
9 | <width>593</width> | |
|
10 | 10 | <height>787</height> |
|
11 | 11 | </rect> |
|
12 | 12 | </property> |
@@ -88,10 +88,38 | |||
|
88 | 88 | <item> |
|
89 | 89 | <layout class="QHBoxLayout" name="horizontalLayout_4"> |
|
90 | 90 | <item> |
|
91 |
<widget class="QComboBox" name="lstDtype" |
|
|
92 |
< |
|
|
93 | <item> | |
|
94 | <widget class="QLineEdit" name="txtDtype"/> | |
|
91 | <widget class="QComboBox" name="lstDtype"> | |
|
92 | <item> | |
|
93 | <property name="text"> | |
|
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 | 123 | </item> |
|
96 | 124 | <item> |
|
97 | 125 | <widget class="QCheckBox" name="chkMST"> |
@@ -390,10 +418,43 | |||
|
390 | 418 | <enum>QLayout::SetFixedSize</enum> |
|
391 | 419 | </property> |
|
392 | 420 | <item> |
|
393 |
<widget class="QComboBox" name="lstDcapacity" |
|
|
394 | </item> | |
|
395 | <item> | |
|
396 | <widget class="QLineEdit" name="txtDcapacity"/> | |
|
421 | <widget class="QComboBox" name="lstDcapacity"> | |
|
422 | <property name="currentIndex"> | |
|
423 | <number>2</number> | |
|
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 | 458 | </item> |
|
398 | 459 | <item> |
|
399 | 460 | <widget class="QCheckBox" name="chkPSgraphic"> |
@@ -581,7 +642,7 | |||
|
581 | 642 | <rect> |
|
582 | 643 | <x>0</x> |
|
583 | 644 | <y>0</y> |
|
584 |
<width>5 |
|
|
645 | <width>593</width> | |
|
585 | 646 | <height>25</height> |
|
586 | 647 | </rect> |
|
587 | 648 | </property> |
@@ -689,5 +750,22 | |||
|
689 | 750 | <tabstop>btnStopburn</tabstop> |
|
690 | 751 | </tabstops> |
|
691 | 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 | 771 | </ui> |
@@ -1,9 +1,9 | |||
|
1 | 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: |
|
|
6 | # by: PyQt4 UI code generator 4.7 | |
|
5 | # Created: Mon Apr 26 10:36:51 2010 | |
|
6 | # by: PyQt4 UI code generator 4.7.2 | |
|
7 | 7 | # |
|
8 | 8 | # WARNING! All changes made in this file will be lost! |
|
9 | 9 | |
@@ -12,7 +12,7 | |||
|
12 | 12 | class Ui_MainWindow(object): |
|
13 | 13 | def setupUi(self, MainWindow): |
|
14 | 14 | MainWindow.setObjectName("MainWindow") |
|
15 |
MainWindow.resize(5 |
|
|
15 | MainWindow.resize(593, 787) | |
|
16 | 16 | self.centralwidget = QtGui.QWidget(MainWindow) |
|
17 | 17 | self.centralwidget.setObjectName("centralwidget") |
|
18 | 18 | self.verticalLayout_3 = QtGui.QVBoxLayout(self.centralwidget) |
@@ -65,8 +65,13 | |||
|
65 | 65 | self.horizontalLayout_4.setObjectName("horizontalLayout_4") |
|
66 | 66 | self.lstDtype = QtGui.QComboBox(self.tabParameters) |
|
67 | 67 | self.lstDtype.setObjectName("lstDtype") |
|
68 | self.lstDtype.addItem("") | |
|
69 | self.lstDtype.addItem("") | |
|
70 | self.lstDtype.addItem("") | |
|
71 | self.lstDtype.addItem("") | |
|
68 | 72 | self.horizontalLayout_4.addWidget(self.lstDtype) |
|
69 | 73 | self.txtDtype = QtGui.QLineEdit(self.tabParameters) |
|
74 | self.txtDtype.setReadOnly(True) | |
|
70 | 75 | self.txtDtype.setObjectName("txtDtype") |
|
71 | 76 | self.horizontalLayout_4.addWidget(self.txtDtype) |
|
72 | 77 | self.chkMST = QtGui.QCheckBox(self.tabParameters) |
@@ -253,8 +258,14 | |||
|
253 | 258 | self.horizontalLayout_10.setObjectName("horizontalLayout_10") |
|
254 | 259 | self.lstDcapacity = QtGui.QComboBox(self.tabDconfig) |
|
255 | 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 | 266 | self.horizontalLayout_10.addWidget(self.lstDcapacity) |
|
257 | 267 | self.txtDcapacity = QtGui.QLineEdit(self.tabDconfig) |
|
268 | self.txtDcapacity.setReadOnly(False) | |
|
258 | 269 | self.txtDcapacity.setObjectName("txtDcapacity") |
|
259 | 270 | self.horizontalLayout_10.addWidget(self.txtDcapacity) |
|
260 | 271 | self.chkPSgraphic = QtGui.QCheckBox(self.tabDconfig) |
@@ -367,7 +378,7 | |||
|
367 | 378 | self.verticalLayout_3.addLayout(self.horizontalLayout_2) |
|
368 | 379 | MainWindow.setCentralWidget(self.centralwidget) |
|
369 | 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 | 382 | self.menubar.setObjectName("menubar") |
|
372 | 383 | self.menuFile = QtGui.QMenu(self.menubar) |
|
373 | 384 | self.menuFile.setObjectName("menuFile") |
@@ -397,6 +408,8 | |||
|
397 | 408 | |
|
398 | 409 | self.retranslateUi(MainWindow) |
|
399 | 410 | self.tabWidget.setCurrentIndex(0) |
|
411 | self.lstDcapacity.setCurrentIndex(2) | |
|
412 | QtCore.QObject.connect(self.chkDevA, QtCore.SIGNAL("toggled(bool)"), self.txtDeviceA.setEnabled) | |
|
400 | 413 | QtCore.QMetaObject.connectSlotsByName(MainWindow) |
|
401 | 414 | MainWindow.setTabOrder(self.txtDpath, self.btnDpath) |
|
402 | 415 | MainWindow.setTabOrder(self.btnDpath, self.txtRpath) |
@@ -459,6 +472,11 | |||
|
459 | 472 | self.btnDpath.setText(QtGui.QApplication.translate("MainWindow", "Data Path", None, QtGui.QApplication.UnicodeUTF8)) |
|
460 | 473 | self.btnRpath.setText(QtGui.QApplication.translate("MainWindow", "Resource Path", None, QtGui.QApplication.UnicodeUTF8)) |
|
461 | 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 | 480 | self.chkMST.setText(QtGui.QApplication.translate("MainWindow", "MST-ISR Data", None, QtGui.QApplication.UnicodeUTF8)) |
|
463 | 481 | self.lblElabel.setText(QtGui.QApplication.translate("MainWindow", "Exp. Label at device", None, QtGui.QApplication.UnicodeUTF8)) |
|
464 | 482 | self.lblCopys.setText(QtGui.QApplication.translate("MainWindow", "Copys", None, QtGui.QApplication.UnicodeUTF8)) |
@@ -481,6 +499,11 | |||
|
481 | 499 | self.chkSequentially.setText(QtGui.QApplication.translate("MainWindow", "Sequentially", None, QtGui.QApplication.UnicodeUTF8)) |
|
482 | 500 | self.lblDcapacity.setText(QtGui.QApplication.translate("MainWindow", "Device Capacity", None, QtGui.QApplication.UnicodeUTF8)) |
|
483 | 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 | 507 | self.chkPSgraphic.setText(QtGui.QApplication.translate("MainWindow", "PS Graphic", None, QtGui.QApplication.UnicodeUTF8)) |
|
485 | 508 | self.tabWidget.setTabText(self.tabWidget.indexOf(self.tabDconfig), QtGui.QApplication.translate("MainWindow", "Device Config.", None, QtGui.QApplication.UnicodeUTF8)) |
|
486 | 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