##// END OF EJS Templates
workspace.py...
Alexander Valdez -
r375:d7aa668a0f5b
parent child
Show More
@@ -1,29 +1,32
1 # -*- coding: utf-8 -*-
1 # -*- coding: utf-8 -*-
2
2 import os
3 from PyQt4.QtGui import QMainWindow
3 from PyQt4.QtGui import QDialog
4 from PyQt4.QtCore import pyqtSignature
4 from PyQt4.QtCore import pyqtSignature
5 from PyQt4.QtCore import pyqtSignal
5 from PyQt4.QtCore import pyqtSignal
6 from PyQt4 import QtGui
6 from PyQt4 import QtGui, QtCore
7 from viewer.ui_workspace import Ui_Workspace
7 from viewer.ui_workspace import Ui_Workspace
8 from os.path import expanduser
8
9
9 class Workspace(QMainWindow, Ui_Workspace):
10 class Workspace(QDialog, Ui_Workspace):
10 """
11 """
11 Class documentation goes here.
12 Class documentation goes here.
12 """
13 """
13 closed=pyqtSignal()
14
14 def __init__(self, parent = None):
15 def __init__(self, parent = None):
15 """
16 """
16 Constructor
17 Constructor
17 """
18 """
18 QMainWindow.__init__(self, parent)
19 QDialog.__init__(self, parent)
19 self.dirList=[]
20 self.dirList=[]
20 self.setupUi(self)
21 self.setupUi(self)
21 self.setWindowTitle("ROJ-Signal Chain")
22 self.setWindowTitle("ROJ-Signal Chain")
22 self.setWindowIcon(QtGui.QIcon("figure/adn.jpg"))
23 self.setWindowIcon(QtGui.QIcon("figure/adn.jpg"))
23 #*####### DIRECTORIO DE TRABAJO #########*#
24 #*####### DIRECTORIO DE TRABAJO #########*#
24 #self.dirCmbBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "C:\WorkSpaceGui", None, QtGui.QApplication.UnicodeUTF8))
25 #self.dirCmbBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "C:\WorkSpaceGui", None, QtGui.QApplication.UnicodeUTF8))
25
26 home=expanduser("~")
26 self.dir=str("C:\WorkSpaceGui")
27 self.dir=os.path.join(home,'schain_workspace')
28 if not os.path.exists(self.dir):
29 os.makedirs(self.dir)
27 self.dirComBox.addItem(self.dir)
30 self.dirComBox.addItem(self.dir)
28 self.i=0
31 self.i=0
29
32
@@ -45,8 +48,9 class Workspace(QMainWindow, Ui_Workspace):
45 """
48 """
46 VISTA DE INTERFAZ GRÁFICA
49 VISTA DE INTERFAZ GRÁFICA
47 """
50 """
48 self.close()
51 self.accept()
49
52 # self.close()
53 #
50 @pyqtSignature("")
54 @pyqtSignature("")
51 def on_dirCancelBtn_clicked(self):
55 def on_dirCancelBtn_clicked(self):
52 """
56 """
@@ -54,9 +58,7 class Workspace(QMainWindow, Ui_Workspace):
54 """
58 """
55 self.close()
59 self.close()
56
60
57 def closeEvent(self, event):
61
58 self.closed.emit()
59 event.accept()
60
62
61
63
62
64
General Comments 0
You need to be logged in to leave comments. Login now