workspace.py
62 lines
| 1.7 KiB
| text/x-python
|
PythonLexer
|
r208 | # -*- coding: utf-8 -*- | |
from PyQt4.QtGui import QMainWindow | |||
from PyQt4.QtCore import pyqtSignature | |||
from PyQt4.QtCore import pyqtSignal | |||
from PyQt4 import QtGui | |||
|
r261 | from viewer.ui_workspace import Ui_Workspace | |
|
r208 | ||
class Workspace(QMainWindow, Ui_Workspace): | |||
""" | |||
Class documentation goes here. | |||
""" | |||
closed=pyqtSignal() | |||
def __init__(self, parent = None): | |||
""" | |||
Constructor | |||
""" | |||
QMainWindow.__init__(self, parent) | |||
|
r261 | self.dirList=[] | |
|
r208 | self.setupUi(self) | |
|
r365 | self.setWindowTitle("ROJ-Signal Chain") | |
self.setWindowIcon(QtGui.QIcon("figure/adn.jpg")) | |||
|
r208 | #*####### DIRECTORIO DE TRABAJO #########*# | |
|
r365 | #self.dirCmbBox.setItemText(0, QtGui.QApplication.translate("MainWindow", "C:\WorkSpaceGui", None, QtGui.QApplication.UnicodeUTF8)) | |
|
r208 | self.dir=str("C:\WorkSpaceGui") | |
|
r365 | self.dirComBox.addItem(self.dir) | |
self.i=0 | |||
|
r208 | ||
@pyqtSignature("") | |||
|
r365 | def on_dirToolPath_clicked(self): | |
|
r208 | """ | |
Slot documentation goes here. | |||
""" | |||
|
r365 | self.i +=1 | |
|
r208 | self.dirBrowse = str(QtGui.QFileDialog.getExistingDirectory(self, 'Open Directory', './', QtGui.QFileDialog.ShowDirsOnly)) | |
|
r365 | self.dirComBox.addItem(self.dirBrowse) | |
self.dirComBox.setCurrentIndex(self.i) | |||
|
r261 | ||
|
r208 | ||
@pyqtSignature("") | |||
|
r365 | def on_dirOkBtn_clicked(self): | |
|
r208 | """ | |
VISTA DE INTERFAZ GRÃFICA | |||
""" | |||
|
r261 | self.close() | |
|
r208 | ||
@pyqtSignature("") | |||
|
r365 | def on_dirCancelBtn_clicked(self): | |
|
r208 | """ | |
Cerrar | |||
""" | |||
self.close() | |||
def closeEvent(self, event): | |||
self.closed.emit() | |||
event.accept() | |||