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:
Resolves the selection dependencies.
"""
modules = self.projectInfo("MODULES")
- try:
- supported = bertos_utils.isSupported(selectedModule, self.project())
- except SupportedException, e:
- self.exceptionOccurred(self.tr("Error evaluating \"%1\" for module %2").arg(e.support_string).arg(selectedModule))
- supported = True
- # Temporary feedback
- if supported:
- print "%s is supported" %selectedModule
- else:
- print "%s is not supported" %selectedModule
modules[selectedModule]["enabled"] = True
self.setProjectInfo("MODULES", modules)
depends = self.projectInfo("MODULES")[selectedModule]["depends"]
-<ui version="4.0" >
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
<class>Form</class>
- <widget class="QWidget" name="Form" >
- <property name="geometry" >
+ <widget class="QWidget" name="Form">
+ <property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<height>409</height>
</rect>
</property>
- <property name="sizePolicy" >
- <sizepolicy vsizetype="Minimum" hsizetype="Minimum" >
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Minimum" vsizetype="Minimum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
- <property name="windowTitle" >
+ <property name="windowTitle">
<string>Form</string>
</property>
- <layout class="QHBoxLayout" name="horizontalLayout" >
+ <layout class="QHBoxLayout" name="horizontalLayout">
<item>
- <layout class="QVBoxLayout" name="verticalLayout_3" >
+ <layout class="QVBoxLayout" name="verticalLayout_3">
<item>
- <widget class="QTreeWidget" name="moduleTree" >
- <property name="minimumSize" >
+ <widget class="QTreeWidget" name="moduleTree">
+ <property name="minimumSize">
<size>
<width>175</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>175</width>
<height>16777215</height>
</size>
</property>
<column>
- <property name="text" >
+ <property name="text">
<string>1</string>
</property>
</column>
</widget>
</item>
<item>
- <widget class="QCheckBox" name="automaticFix" >
- <property name="minimumSize" >
+ <widget class="QCheckBox" name="automaticFix">
+ <property name="minimumSize">
<size>
<width>175</width>
<height>0</height>
</size>
</property>
- <property name="maximumSize" >
+ <property name="maximumSize">
<size>
<width>175</width>
<height>16777215</height>
</size>
</property>
- <property name="text" >
+ <property name="text">
<string>Automatically fix
dependecies</string>
</property>
- <property name="checked" >
+ <property name="checked">
<bool>true</bool>
</property>
</widget>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout" >
+ <layout class="QVBoxLayout" name="verticalLayout">
<item>
- <widget class="Line" name="line" >
- <property name="orientation" >
+ <widget class="Line" name="line">
+ <property name="orientation">
<enum>Qt::Vertical</enum>
</property>
</widget>
</layout>
</item>
<item>
- <layout class="QVBoxLayout" name="verticalLayout_2" >
+ <layout class="QVBoxLayout" name="verticalLayout_2">
<item>
- <widget class="QLabel" name="moduleLabel" >
- <property name="text" >
+ <widget class="QLabel" name="moduleLabel">
+ <property name="text">
<string/>
</property>
</widget>
</item>
<item>
- <widget class="QTableWidget" name="propertyTable" >
- <property name="editTriggers" >
+ <widget class="QTableWidget" name="propertyTable">
+ <property name="editTriggers">
<set>QAbstractItemView::NoEditTriggers</set>
</property>
- <property name="alternatingRowColors" >
+ <property name="alternatingRowColors">
<bool>true</bool>
</property>
- <property name="selectionMode" >
+ <property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum>
</property>
- <property name="selectionBehavior" >
+ <property name="selectionBehavior">
<enum>QAbstractItemView::SelectRows</enum>
</property>
- <property name="showGrid" >
+ <property name="showGrid">
<bool>false</bool>
</property>
- <property name="wordWrap" >
+ <property name="wordWrap">
<bool>true</bool>
</property>
- <property name="cornerButtonEnabled" >
+ <property name="cornerButtonEnabled">
<bool>false</bool>
</property>
</widget>
</item>
+ <item>
+ <widget class="QLabel" name="warningLabel">
+ <property name="text">
+ <string/>
+ </property>
+ <property name="wordWrap">
+ <bool>true</bool>
+ </property>
+ </widget>
+ </item>
</layout>
</item>
</layout>