Parse the filename for find the cpu name
[bertos.git] / wizard / BCpuPage.py
1 #!/usr/bin/env python
2 # encoding: utf-8
3 #
4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
5 # All rights reserved.
6 #
7 # $Id:$
8 #
9 # Author: Lorenzo Berni <duplo@develer.com>
10 #
11
12
13 from BWizardPage import *
14 import bertos_utils
15
16 class BCpuPage(BWizardPage):
17     
18     def __init__(self):
19         BWizardPage.__init__(self, "cpu_select.ui")
20         self.setTitle(self.tr("Select the CPU"))
21     
22     def _populateCpuList(self):
23         infos = bertos_utils.loadCpuInfos(self._projectInfoRetrieve("SOURCES_PATH"))
24         for cpu in infos:
25             self.pageContent.cpuList.addItem(QListWidgetItem(cpu["CPU_NAME"]))
26     
27     def reloadData(self):
28         self._populateCpuList()
29