From: duplo Date: Thu, 1 Apr 2010 09:51:47 +0000 (+0000) Subject: Modify the order of the pages. X-Git-Tag: 2.5.0~538 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=ec8c7a72981bd819fba072cf53404bae3d9cee46;p=bertos.git Modify the order of the pages. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3370 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index 7caf4382..06191f6b 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -39,7 +39,7 @@ from PyQt4.QtGui import * from BWizardPage import * import bertos_utils -from BVersionPage import BVersionPage +from BCpuPage import BCpuPage from BBoardPage import BBoardPage from const import * @@ -65,16 +65,10 @@ class BFolderPage(BWizardPage): if self.pageContent.projectPath.text() != "None": self.setProjectInfo("PROJECT_PATH", unicode(self.pageContent.projectPath.text())) self.setProjectInfo("PROJECT_NAME", os.path.basename(unicode(self.pageContent.projectPath.text()))) + self.setProjectInfo("ROUTE", self.next_page) return True else: return False - - def nextId(self): - """ - Overload of the QWizardPage nextId method. - """ - return self.wizard().pageIndex(self.next_page) - #### @@ -93,6 +87,7 @@ class BFolderPage(BWizardPage): self.connect(self.pageContent.nameEdit, SIGNAL("textChanged(const QString)"), self.nameChanged) self.connect(self.pageContent.directoryEdit, SIGNAL("textChanged(const QString)"), self.directoryChanged) self.connect(self.pageContent.directoryButton, SIGNAL("clicked()"), self.selectDirectory) + self.connect(self.pageContent.customButton, SIGNAL("toggled(bool)"), self.isComplete) #### @@ -138,7 +133,7 @@ class BFolderPage(BWizardPage): Contains the next page class. """ if self.pageContent.customButton.isChecked(): - return BVersionPage + return BCpuPage else: return BBoardPage diff --git a/wizard/BVersionPage.py b/wizard/BVersionPage.py index 8842289d..452e8a94 100644 --- a/wizard/BVersionPage.py +++ b/wizard/BVersionPage.py @@ -69,6 +69,14 @@ class BVersionPage(BWizardPage): return True else: return False + + def nextId(self): + """ + Overload of the QWizard nextId method. + """ + # Pick up the class stored into the project in the 'folder' step + page_class = self.projectInfo("ROUTE") + return self.wizard().pageIndex(page_class) #### diff --git a/wizard/bertos.py b/wizard/bertos.py index 7097ebce..0e3206c2 100755 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -66,7 +66,7 @@ from LoadException import VersionException, ToolchainException def newProject(): QApplication.instance().project = BProject() - page_list = [BIntroPage, BFolderPage, BBoardPage, BVersionPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage] + page_list = [BIntroPage, BFolderPage, BVersionPage, BBoardPage, BCpuPage, BToolchainPage, BModulePage, BOutputPage, BCreationPage, BFinalPage] wizard = BWizard(page_list) wizard.show() wizard.exec_()