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.
31 def __init__(self, page_list):
32 QWizard.__init__(self)
33 self.setWindowTitle(self.tr("Create a BeRTOS project"))
34 self.setOption(QWizard.DisabledBackButtonOnLastPage, True)
35 self.addPages(page_list)
38 def addPages(self, page_list):
40 Adds the pages in the wizard.
42 for page in page_list:
45 def connectSignals(self):
47 Connects the signals with the related slots.
49 self.connect(self, SIGNAL("currentIdChanged(int)"), self.pageChanged)
51 def pageChanged(self, pageId):
53 Slot called when the user change the current page. It calls the reloadData
54 method of the next page.
56 page = self.page(pageId)
62 Returns the BProject associated with the wizard.
64 return copy.deepcopy(QApplication.instance().project)