From 013f0657487eb21b48de2467978d0672e0b44b34 Mon Sep 17 00:00:00 2001 From: duplo Date: Tue, 16 Dec 2008 14:56:26 +0000 Subject: [PATCH] The main file handle the wizard and the start window git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2046 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/bertos.py | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/wizard/bertos.py b/wizard/bertos.py index 65f73f8e..72c41773 100644 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -10,24 +10,36 @@ # import sys + from PyQt4.QtCore import * from PyQt4.QtGui import * + import BStartPage + import BVersionPage +def newProject(): + QApplication.instance().wizard = QWizard() + QApplication.instance().wizard.setWindowTitle("Create a BeRTOS project") + QApplication.instance().wizard.addPage(BVersionPage.BVersionPage()) + QApplication.instance().wizard.show() + +def editProject(): + print "editProject" + +def showStartPage(): + QApplication.instance().dialog = BStartPage.BStartPage() + QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("newProject"), newProject) + QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("editProject"), editProject) + QApplication.instance().dialog.show() + def main(): app = QApplication(sys.argv) app.settings = QSettings("Develer", "Bertos Configurator") QResource.registerResource("bertos.rcc") - startPage = BStartPage.BStartPage() - wizard = QWizard() - wizard.setWindowTitle("Welcome in BeRTOS configuration wizard") - wizard.addPage(startPage) - wizard.addPage(BVersionPage.BVersionPage()) - wizard.show() + showStartPage() sys.exit(app.exec_()) - if __name__ == '__main__': main() -- 2.25.1