From 12102ca8922e92ea2675d808f6785c61b33cce90 Mon Sep 17 00:00:00 2001 From: duplo Date: Thu, 19 Feb 2009 12:11:29 +0000 Subject: [PATCH] Add the summary containin information about the choices of the user git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2357 38d2e660-2303-0410-9eaa-f027e97ec537 --- wizard/BCreationPage.py | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/wizard/BCreationPage.py b/wizard/BCreationPage.py index b58c83c5..42d24610 100644 --- a/wizard/BCreationPage.py +++ b/wizard/BCreationPage.py @@ -25,16 +25,41 @@ class BCreationPage(BWizardPage): self._connectSignals() self._completed = False - def reloadData(self): - self._completed = False - self._setupUi() - def _setupUi(self): self._confirmGroup = QWidgetGroup(self.pageContent.summaryTree, self.pageContent.createButton) self._finalGroup = QWidgetGroup(self.pageContent.iconLabel, self.pageContent.textLabel) self._finalGroup.setVisible(False) + summary = self.pageContent.summaryTree + summary.setHeaderHidden(True) + summary.setColumnCount(1) + + def reloadData(self): + self._completed = False + self._setupUi() + self.pageContent.summaryTree.clear() + topLevel = [] + folderTitle = QTreeWidgetItem(QStringList([self.tr("Project folder")])) + folderItem = QTreeWidgetItem(folderTitle, QStringList([self._projectInfoRetrieve("PROJECT_PATH")])) + topLevel.append(folderTitle) + versionTitle = QTreeWidgetItem(QStringList([self.tr("BeRTOS version")])) + sources_path = self._projectInfoRetrieve("SOURCES_PATH") + version = QTreeWidgetItem(versionTitle, QStringList([self.tr("version: ") + bertos_utils.bertosVersion(sources_path)])) + sourcePath = QTreeWidgetItem(versionTitle, QStringList([self.tr("path: ") + sources_path])) + topLevel.append(versionTitle) + cpuTitle = QTreeWidgetItem(QStringList([self.tr("CPU")])) + cpuName = QTreeWidgetItem(cpuTitle, QStringList([self.tr("cpu name: ") + self._projectInfoRetrieve("CPU_NAME")])) + topLevel.append(cpuTitle) + toolchainTitle = QTreeWidgetItem(QStringList([self.tr("Toolchain")])) + toolchainInfo = self._projectInfoRetrieve("TOOLCHAIN") + if "target" in toolchainInfo.keys(): + toolchainTarget = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("target: " + toolchainInfo["target"])])) + if "version" in toolchainInfo.keys(): + toolchainTarget = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("version: " + "GCC " + toolchainInfo["version"] + " (" + toolchainInfo["build"] + ")")])) + toolchainPath = QTreeWidgetItem(toolchainTitle, QStringList([self.tr("path: " + toolchainInfo["path"])])) + topLevel.append(toolchainTitle) + self.pageContent.summaryTree.insertTopLevelItems(0, topLevel) def _connectSignals(self): self.connect(self.pageContent.createButton, SIGNAL("clicked(bool)"), self._createProject) -- 2.25.1