##// END OF EJS Templates
update workspace
Alexander Valdez -
r261:1da5a2d48804
parent child
Show More
@@ -1,66 +1,70
1 1 # -*- coding: utf-8 -*-
2 2
3 3 from PyQt4.QtGui import QMainWindow
4 4 from PyQt4.QtCore import pyqtSignature
5 5 from PyQt4.QtCore import pyqtSignal
6 6 from PyQt4 import QtGui
7 from mainwindow import MainWindow
8 from GUI.ui_workspace import Ui_Workspace
7 from viewcontroller.mainwindow import MainWindow
8 from viewer.ui_workspace import Ui_Workspace
9 9
10 10 class Workspace(QMainWindow, Ui_Workspace):
11 11 """
12 12 Class documentation goes here.
13 13 """
14 14 closed=pyqtSignal()
15 15 def __init__(self, parent = None):
16 16 """
17 17 Constructor
18 18 """
19 19 QMainWindow.__init__(self, parent)
20 self.dirList=[]
20 21 self.setupUi(self)
21 22 #*####### DIRECTORIO DE TRABAJO #########*#
22 23 self.dirCmbBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "C:\WorkSpaceGui", None, QtGui.QApplication.UnicodeUTF8))
23 24 self.dir=str("C:\WorkSpaceGui")
24 25 self.dirCmbBox.addItem(self.dir)
26 self.dirList.append(self.dir)
25 27
26 28 @pyqtSignature("")
27 29 def on_dirBrowsebtn_clicked(self):
28 30 """
29 31 Slot documentation goes here.
30 32 """
33
31 34 self.dirBrowse = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly))
32 self.dirCmbBox.addItem(self.dirBrowse)
35 self.dirCmbBox.setItemText(0, QtGui.QApplication.translate("MainWindow", self.dirBrowse, None, QtGui.QApplication.UnicodeUTF8))
36 self.dirList.append(self.dirBrowse)
37 self.dirCmbBox.clear()
38 for i in self.dirList:
39 self.dirCmbBox.addItem(i)
40
41
33 42
34 43 @pyqtSignature("")
35 44 def on_dirButton_clicked(self):
36 45 """
37 46 Slot documentation goes here.
38 47 """
48 pass
39 49
40 50 @pyqtSignature("")
41 51 def on_dirOkbtn_clicked(self):
42 52 """
43 53 VISTA DE INTERFAZ GRÁFICA
44 54 """
45 self.showmemainwindow()
46
55 self.close()
47 56
48 57 @pyqtSignature("")
49 58 def on_dirCancelbtn_clicked(self):
50 59 """
51 60 Cerrar
52 61 """
53 62 self.close()
54 63
55 def showmemainwindow(self):
56 self.Dialog= MainWindow(self)
57 self.Dialog.show()
58 self.hide()
59
60 64 def closeEvent(self, event):
61 65 self.closed.emit()
62 66 event.accept()
63 67
64 68
65 69
66 70 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now