X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=wizard%2FBFolderPage.py;h=06191f6be8af9be12fd4debfafee6018760181ad;hb=e3892547e4cd75c1ec039e42ff7db425be9d7b72;hp=0014a886056c0efa138bd630a85275de9fbe0ecb;hpb=6a7f7153724fd0f4392ba94715e44ed643e661fb;p=bertos.git diff --git a/wizard/BFolderPage.py b/wizard/BFolderPage.py index 0014a886..06191f6b 100644 --- a/wizard/BFolderPage.py +++ b/wizard/BFolderPage.py @@ -39,6 +39,9 @@ from PyQt4.QtGui import * from BWizardPage import * import bertos_utils +from BCpuPage import BCpuPage +from BBoardPage import BBoardPage + from const import * class BFolderPage(BWizardPage): @@ -61,6 +64,8 @@ class BFolderPage(BWizardPage): self.setDefaultFolder(self._destination_folder) 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 @@ -82,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) #### @@ -120,6 +126,16 @@ class BFolderPage(BWizardPage): self.pageContent.directoryEdit.setText(QDir.toNativeSeparators(directory)) #### + + @property + def next_page(self): + """ + Contains the next page class. + """ + if self.pageContent.customButton.isChecked(): + return BCpuPage + else: + return BBoardPage def initializeAttributes(self): """