+ self.pageContent.propertyTable.setItem(index, 1, QTableWidgetItem(configurations[property]["value"]))
+ index += 1
+ if self.pageContent.propertyTable.rowCount() == 0:
+ module_label = self.pageContent.moduleLabel.text()
+ module_label += "\n\nNo configuration needed."
+ self.pageContent.moduleLabel.setText(module_label)
+
+ def dependencyCheck(self, item):
+ """
+ Checks the dependencies of the module associated with the given item.
+ """
+ checked = False
+ module = unicode(item.text(0))
+ if item.checkState(0) == Qt.Checked:
+ self.moduleSelected(module)
+ else:
+ self.moduleUnselected(module)
+ self.removeFileDependencies(module)
+
+ def showPropertyDescription(self):
+ """
+ Slot called when the property selection changes. Shows the description
+ of the selected property.
+ """
+ self.resetPropertyDescription()
+ configurations = self.currentModuleConfigurations()
+ if self.currentProperty() in configurations:
+ description = configurations[self.currentProperty()]["brief"]
+ name = self.currentProperty()
+ self.currentPropertyItem().setText(description + "\n" + name)
+
+ def saveValue(self, index):
+ """
+ Slot called when the user modifies one of the configuration parameters.
+ It stores the new value."""
+ property = qvariant_converter.getString(self.pageContent.propertyTable.item(index, 0).data(Qt.UserRole))
+ configuration = self.projectInfo("MODULES")[self.currentModule()]["configuration"]
+ configurations = self.projectInfo("CONFIGURATIONS")
+ if "type" not in configurations[configuration][property]["informations"] or configurations[configuration][property]["informations"]["type"] == "int":
+ configurations[configuration][property]["value"] = unicode(int(self.pageContent.propertyTable.cellWidget(index, 1).value()))
+ elif configurations[configuration][property]["informations"]["type"] == "enum":
+ configurations[configuration][property]["value"] = unicode(self.pageContent.propertyTable.cellWidget(index, 1).currentText())
+ elif configurations[configuration][property]["informations"]["type"] == "boolean":
+ if self.pageContent.propertyTable.cellWidget(index, 1).isChecked():
+ configurations[configuration][property]["value"] = "1"