From: duplo Date: Fri, 19 Dec 2008 14:23:52 +0000 (+0000) Subject: Add the isComplete overload per the cpu selection page X-Git-Tag: 2.1.0~574 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=29094c2d235a65c3edadd2ec3398b8d71c91a998;p=bertos.git Add the isComplete overload per the cpu selection page git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2108 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BCpuPage.py b/wizard/BCpuPage.py index 501a5a20..2c884e23 100644 --- a/wizard/BCpuPage.py +++ b/wizard/BCpuPage.py @@ -18,12 +18,26 @@ class BCpuPage(BWizardPage): def __init__(self): BWizardPage.__init__(self, "cpu_select.ui") self.setTitle(self.tr("Select the CPU")) + self._connectSignals() def _populateCpuList(self): + self.pageContent.cpuList.clear() infos = bertos_utils.loadCpuInfos(self._projectInfoRetrieve("SOURCES_PATH")) for cpu in infos: self.pageContent.cpuList.addItem(QListWidgetItem(cpu["CPU_NAME"])) + def _connectSignals(self): + self.connect(self.pageContent.cpuList, SIGNAL("itemSelectionChanged()"), self.rowChanged) + def reloadData(self): self._populateCpuList() - \ No newline at end of file + + def isComplete(self): + if self.pageContent.cpuList.currentRow() != -1: + self._projectInfoStore("CPU_NAME", self.pageContent.cpuList.currentItem()) + return True + else: + return False + + def rowChanged(self): + self.emit(SIGNAL("completeChanged()"))