X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBWizard.py;h=3ea2dac67a195fa68fecd88bfeb8192a153a6816;hb=d7f7bae3bc88eade97c9fc12dc81b45fdfb4f285;hp=a430952835e077b542f5a4006f592feda68bebfe;hpb=a1aee0fd51fc5c32d712e76367abc3a2365c6324;p=bertos.git diff --git a/wizard/BWizard.py b/wizard/BWizard.py index a4309528..3ea2dac6 100644 --- a/wizard/BWizard.py +++ b/wizard/BWizard.py @@ -24,15 +24,21 @@ import BCreationPage import BFinalPage class BWizard(QWizard): + """ + Main class of the wizard. It adds the pages automatically. + """ def __init__(self): QWizard.__init__(self) self.setWindowTitle(self.tr("Create a BeRTOS project")) self.setOption(QWizard.DisabledBackButtonOnLastPage, True) - self._addPages() - self._connectSignals() + self.addPages() + self.connectSignals() - def _addPages(self): + def addPages(self): + """ + Method used by the constructor in order to add the pages in the wizard. + """ self.addPage(BFolderPage.BFolderPage()) self.addPage(BVersionPage.BVersionPage()) self.addPage(BCpuPage.BCpuPage()) @@ -42,13 +48,23 @@ class BWizard(QWizard): self.addPage(BCreationPage.BCreationPage()) self.addPage(BFinalPage.BFinalPage()) - def _connectSignals(self): - self.connect(self, SIGNAL("currentIdChanged(int)"), self._pageChanged) + def connectSignals(self): + """ + Connects the signals with the related slots. + """ + self.connect(self, SIGNAL("currentIdChanged(int)"), self.pageChanged) - def _pageChanged(self, pageId): + def pageChanged(self, pageId): + """ + Slot called when the user change the current page. It calls the reloadData + method of the next page. + """ page = self.page(pageId) if page is not None: page.reloadData() def project(self): + """ + Returns the BProject associated with the wizard. + """ return copy.deepcopy(QApplication.instance().project)