X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBBoardPage.py;h=6d7fc89b4d0347261ded550efb51f19b52f07202;hb=8f2036c05d9a8531400c1ab97dca9193e92187d3;hp=301d46b7c36383abe30aa6a5aa50c11375d88686;hpb=bcf0975ec310e26b8e392c5243c530a63c2a9f72;p=bertos.git diff --git a/wizard/BBoardPage.py b/wizard/BBoardPage.py index 301d46b7..6d7fc89b 100644 --- a/wizard/BBoardPage.py +++ b/wizard/BBoardPage.py @@ -69,10 +69,18 @@ class BBoardPage(BWizardPage): preset_path = qvariant_converter.getStringDict(preset_path["info"]) preset_path = preset_path["path"] self.setProjectInfo("PROJECT_BOARD", preset_path) + self.setProjectInfo("PROJECT_FROM_PRESET", True) return True else: return False + def nextId(self): + wizard = self.wizard() + if not self.projectInfo("PROJECT_FROM_PRESET"): + return wizard.pageIndex(BCpuPage) + else: + return QWizardPage.nextId(self) + #### ## Overloaded BWizardPage methods ## @@ -89,11 +97,13 @@ class BBoardPage(BWizardPage): """ self.connect(self.pageContent.boardList, SIGNAL("itemSelectionChanged()"), self.updateUi) self.connect(self.pageContent.boardList, SIGNAL("itemSelectionChanged()"), self, SIGNAL("completeChanged()")) + self.connect(self.pageContent.customButton, SIGNAL("clicked()"), self.customButtonClicked) def reloadData(self): """ Overload of the BWizardPage reloadData method. """ + self.project.loadProjectPresets() preset_list = self.projectInfo("PRESET_TREE") preset_list = preset_list["children"] preset_list = sorted(preset_list.values(), _cmp) @@ -116,6 +126,10 @@ class BBoardPage(BWizardPage): self.pageContent.imageLabel.setVisible(False) self.pageContent.descriptionLabel.setText(description) + def customButtonClicked(self): + self.setProjectInfo("PROJECT_FROM_PRESET", False) + self.wizard().next() + #### def setItems(self, preset_list):