# Copyright 2009 Develer S.r.l. (http://www.develer.com/)
# All rights reserved.
#
-# $Id:$
+# $Id$
#
# Author: Lorenzo Berni <duplo@develer.com>
#
from BWizardPage import *
import bertos_utils
+from bertos_utils import SupportedException
from DefineException import *
from const import *
self.pageContent.propertyTable.setColumnCount(2)
self.pageContent.propertyTable.setRowCount(0)
self.pageContent.moduleLabel.setVisible(False)
+ self.pageContent.warningLabel.setVisible(False)
def connectSignals(self):
"""
"""
module = self.currentModule()
if module is not None:
+ try:
+ supported = bertos_utils.isSupported(module, self.project())
+ except SupportedException, e:
+ self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(selectedModule))
+ supported = True
self._control_group.clear()
configuration = self.projectInfo("MODULES")[module]["configuration"]
module_description = self.projectInfo("MODULES")[module]["description"]
self.pageContent.moduleLabel.setText(module_description)
self.pageContent.moduleLabel.setVisible(True)
+ if not supported:
+ self.pageContent.warningLabel.setVisible(True)
+ selected_cpu = self.projectInfo("CPU_NAME")
+ self.pageContent.warningLabel.setText(self.tr("<font color='#FF0000'>Warning: the selected module, \
+ is not completely supported by the %1.</font>").arg(selected_cpu))
+ else:
+ self.pageContent.warningLabel.setVisible(False)
self.pageContent.propertyTable.clear()
self.pageContent.propertyTable.setRowCount(0)
if configuration != "":
for module in module_list:
enabled = modules[module]["enabled"]
module_item = QTreeWidgetItem(item, QStringList([module]))
+ try:
+ supported = bertos_utils.isSupported(module, self.project())
+ except SupportedException, e:
+ self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(selectedModule))
+ supported = True
+ if not supported:
+ module_item.setForeground(0, QBrush(QColor(Qt.red)))
if enabled:
module_item.setCheckState(0, Qt.Checked)
else: