X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBWizard.py;h=1966d932e10d908ac74f5bbd2ec0329ff9209c87;hb=16555988e69afefd1a3cee8eed5202143ce6931a;hp=3ea2dac67a195fa68fecd88bfeb8192a153a6816;hpb=d7f7bae3bc88eade97c9fc12dc81b45fdfb4f285;p=bertos.git diff --git a/wizard/BWizard.py b/wizard/BWizard.py index 3ea2dac6..1966d932 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -28,26 +28,21 @@ class BWizard(QWizard): Main class of the wizard. It adds the pages automatically. """ - def __init__(self): + def __init__(self, page_list): QWizard.__init__(self) self.setWindowTitle(self.tr("Create a BeRTOS project")) + self.setWindowIcon(QIcon(":/images/appicon.png")) self.setOption(QWizard.DisabledBackButtonOnLastPage, True) - self.addPages() + self.addPages(page_list) self.connectSignals() - def addPages(self): + def addPages(self, page_list): """ - Method used by the constructor in order to add the pages in the wizard. + Adds the pages in the wizard. """ - self.addPage(BFolderPage.BFolderPage()) - self.addPage(BVersionPage.BVersionPage()) - self.addPage(BCpuPage.BCpuPage()) - self.addPage(BToolchainPage.BToolchainPage()) - self.addPage(BModulePage.BModulePage()) - self.addPage(BOutputPage.BOutputPage()) - self.addPage(BCreationPage.BCreationPage()) - self.addPage(BFinalPage.BFinalPage()) - + for page in page_list: + self.addPage(page()) + def connectSignals(self): """ Connects the signals with the related slots.