From af547c974bce8d8a7952cfc8089ef30e5d8e4bdf Mon Sep 17 00:00:00 2001 From: Giovanni Gherdovich Date: Wed, 15 Sep 2010 00:37:15 +0200 Subject: [PATCH] minor changes to mainwindow.py --- sface/mainwindow.py | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sface/mainwindow.py b/sface/mainwindow.py index 39e68a0..ab552ce 100644 --- a/sface/mainwindow.py +++ b/sface/mainwindow.py @@ -8,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 @@ -60,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) @@ -77,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) @@ -94,6 +98,8 @@ 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() @@ -104,6 +110,12 @@ class MainWindow(QWidget): 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) -- 2.43.0