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 *
26 class BWizard(QWizard):
28 Main class of the wizard. It adds the pages automatically.
32 QWizard.__init__(self)
33 self.setWindowTitle(self.tr("Create a BeRTOS project"))
34 self.setOption(QWizard.DisabledBackButtonOnLastPage, True)
36 self._connectSignals()
40 Method used by the constructor in order to add the pages in the wizard.
42 self.addPage(BFolderPage.BFolderPage())
43 self.addPage(BVersionPage.BVersionPage())
44 self.addPage(BCpuPage.BCpuPage())
45 self.addPage(BToolchainPage.BToolchainPage())
46 self.addPage(BModulePage.BModulePage())
47 self.addPage(BOutputPage.BOutputPage())
48 self.addPage(BCreationPage.BCreationPage())
49 self.addPage(BFinalPage.BFinalPage())
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)