From: duplo Date: Tue, 8 Sep 2009 13:29:56 +0000 (+0000) Subject: Show visual feedback for modules autoenabled in module page X-Git-Tag: 2.2.0~65 X-Git-Url: https://codewiz.org/gitweb?p=bertos.git;a=commitdiff_plain;h=02c58644efcaf424d9b824d13a16c01d1d95d577 Show visual feedback for modules autoenabled in module page git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2903 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index fac4cacd..ca051603 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -77,6 +77,7 @@ class BModulePage(BWizardPage): Overload of the BWizardPage connectSignals method. """ self.connect(self.pageContent.moduleTree, SIGNAL("itemPressed(QTreeWidgetItem*, int)"), self.fillPropertyTable) + self.connect(self.pageContent.moduleTree, SIGNAL("itemPressed(QTreeWidgetItem*, int)"), self.moduleClicked) self.connect(self.pageContent.moduleTree, SIGNAL("itemChanged(QTreeWidgetItem*, int)"), self.dependencyCheck) self.connect(self.pageContent.propertyTable, SIGNAL("itemSelectionChanged()"), self.showPropertyDescription) @@ -94,6 +95,9 @@ class BModulePage(BWizardPage): ## Slots ## + def moduleClicked(self, item, column): + self.setBold(item, False) + def fillPropertyTable(self): """ Slot called when the user selects a module from the module tree. @@ -373,6 +377,13 @@ class BModulePage(BWizardPage): break self.pageContent.propertyTable.item(index, 0).setText(self.currentModuleConfigurations()[property_name]['brief']) + def setBold(self, item, bold): + self.pageContent.moduleTree.blockSignals(True) + font = item.font(0) + font.setBold(bold) + item.setFont(0, font) + self.pageContent.moduleTree.blockSignals(False) + def moduleSelected(self, selectedModule): """ Resolves the selection dependencies. @@ -392,6 +403,8 @@ class BModulePage(BWizardPage): item = self.pageContent.moduleTree.topLevelItem(category) for child in range(item.childCount()): if unicode(item.child(child).text(0)) in unsatisfied: + self.setBold(item.child(child), True) + self.setBold(item, True) item.child(child).setCheckState(0, Qt.Checked) def moduleUnselected(self, unselectedModule):