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.setWindowIcon(QIcon(":/images/appicon.png"))
35 self.setOption(QWizard.DisabledBackButtonOnLastPage, True)
36 self.addPages(page_list)
39 def addPages(self, page_list):
41 Adds the pages in the wizard.
43 for page in page_list:
46 def connectSignals(self):
48 Connects the signals with the related slots.
50 self.connect(self, SIGNAL("currentIdChanged(int)"), self.pageChanged)
52 def pageChanged(self, pageId):
54 Slot called when the user change the current page. It calls the reloadData
55 method of the next page.
57 page = self.page(pageId)
63 Returns the BProject associated with the wizard.
65 return copy.deepcopy(QApplication.instance().project)