4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
14 from PyQt4.QtCore import *
15 from PyQt4.QtGui import *
27 from version import wizard_version
29 wizard_version = "sandbox"
31 class BWizard(QWizard):
33 Main class of the wizard. It adds the pages automatically.
36 def __init__(self, page_list):
37 QWizard.__init__(self)
38 self.setWindowTitle(self.tr("Create a BeRTOS project - rev.%1").arg(wizard_version))
39 self.setWindowIcon(QIcon(":/images/appicon.png"))
40 self.setOption(QWizard.DisabledBackButtonOnLastPage, True)
41 self.addPages(page_list)
44 def addPages(self, page_list):
46 Adds the pages in the wizard.
48 for page in page_list:
51 def connectSignals(self):
53 Connects the signals with the related slots.
55 self.connect(self, SIGNAL("currentIdChanged(int)"), self.pageChanged)
57 def pageChanged(self, pageId):
59 Slot called when the user change the current page. It calls the reloadData
60 method of the next page.
62 page = self.page(pageId)
68 Returns the BProject associated with the wizard.
70 return copy.deepcopy(QApplication.instance().project)