@@ -4,8 +4,8 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 |
|
|
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 | """ |
@@ -17,33 +17,42 class Workspace(QMainWindow, Ui_Workspace): | |||
|
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.s |
|
|
46 | ||
|
55 | self.close() | |
|
47 | 56 | |
|
48 | 57 | @pyqtSignature("") |
|
49 | 58 | def on_dirCancelbtn_clicked(self): |
@@ -51,11 +60,6 class Workspace(QMainWindow, Ui_Workspace): | |||
|
51 | 60 | Cerrar |
|
52 | 61 | """ |
|
53 | 62 | self.close() |
|
54 | ||
|
55 | def showmemainwindow(self): | |
|
56 | self.Dialog= MainWindow(self) | |
|
57 | self.Dialog.show() | |
|
58 | self.hide() | |
|
59 | 63 | |
|
60 | 64 | def closeEvent(self, event): |
|
61 | 65 | self.closed.emit() |
General Comments 0
You need to be logged in to leave comments.
Login now