X-Git-Url: http://git.onelab.eu/?p=sface.git;a=blobdiff_plain;f=sface%2Fmainwindow.py;h=ab552ce41e2626fd41b091c6d75ad0526d1c99e7;hp=0ae038d47337b5b47641082a16d070ebb3b15a15;hb=e3ff7b1a829714d72e135fd11f7746a01bc2492b;hpb=0c0ed5cf347035d49af431066c5495542b0ee5ac diff --git a/sface/mainwindow.py b/sface/mainwindow.py index 0ae038d..ab552ce 100644 --- a/sface/mainwindow.py +++ b/sface/mainwindow.py @@ -1,5 +1,6 @@ import os +import sys import time from PyQt4.QtCore import * @@ -7,6 +8,7 @@ from PyQt4.QtGui import * from sface.config import config from sface.logwindow import LogWindow +from sface.xmlwindow import XmlWindow from sface.screens.configscreen import ConfigScreen from sface.screens.mainscreen import MainScreen @@ -59,6 +61,7 @@ class MainWindow(QWidget): QWidget.__init__(self, parent) self.logWindow = LogWindow(self) + self.xmlWindow = XmlWindow(self) self.pix = QLabel(self) self.config_screen = ConfigScreen(self) @@ -76,11 +79,13 @@ class MainWindow(QWidget): self.status = Status(self) self.log = QLabel("Show Log", self) + self.xml = QLabel("Show RSpec", self) hlayout = QHBoxLayout() hlayout.addWidget(self.status) hlayout.addStretch() hlayout.addWidget(self.log) + hlayout.addWidget(self.xml) layout = QVBoxLayout() layout.addWidget(self.nav) @@ -93,12 +98,24 @@ class MainWindow(QWidget): self.animateToScreen) self.connect(self.log, SIGNAL('linkActivated(QString)'), self.showLogWindow) + self.connect(self.xml, SIGNAL('linkActivated(QString)'), + self.showXmlWindow) + + def redirectOutputToLog(self): + self.logWindow.redirectOutput() def showLogWindow(self, link): self.logWindow.show() + self.logWindow.resize(500, 500) self.logWindow.raise_() self.logWindow.activateWindow() + def showXmlWindow(self, link): + self.xmlWindow.show() + self.xmlWindow.resize(500, 500) + self.xmlWindow.raise_() + self.xmlWindow.activateWindow() + def animatePixmap(self, y): self.pix.move(0, y)