From: duplo Date: Thu, 22 Jan 2009 19:14:57 +0000 (+0000) Subject: Delete the module page structure X-Git-Tag: 2.1.0~473 X-Git-Url: https://codewiz.org/gitweb?a=commitdiff_plain;h=fc50950d14992600f5e5beb88fc1d1b6d50c104b;p=bertos.git Delete the module page structure git-svn-id: https://src.develer.com/svnoss/bertos/trunk@2209 38d2e660-2303-0410-9eaa-f027e97ec537 --- diff --git a/wizard/BModulePage.py b/wizard/BModulePage.py index 11101c2c..c670596e 100644 --- a/wizard/BModulePage.py +++ b/wizard/BModulePage.py @@ -20,57 +20,21 @@ class BModulePage(BWizardPage): def __init__(self): BWizardPage.__init__(self, "module_select.ui") - self.setTitle(self.tr("Configure the modules")) + self.setTitle(self.tr("Configure the BeRTOS modules")) self._setupUi() self._connectSignals() def reloadData(self): - self._fillModuleList() + pass def _setupUi(self): self.pageContent.moduleList.setSortingEnabled(True) self.pageContent.propertyTable.horizontalHeader().setResizeMode(QHeaderView.ResizeToContents) self.pageContent.propertyTable.horizontalHeader().setVisible(False) + self.pageContent.propertyTable.verticalHeader().setResizeMode(QHeaderView.ResizeToContents) self.pageContent.propertyTable.verticalHeader().setVisible(False) self.pageContent.propertyTable.setColumnCount(2) self.pageContent.propertyTable.setRowCount(0) def _connectSignals(self): - self.connect(self.pageContent.moduleList, SIGNAL("currentRowChanged(int)"), self.moduleItemClicked) - - def _fillModuleList(self): - moduleInfos = bertos_utils.loadModuleInfos(self._projectInfoRetrieve("SOURCES_PATH")) - self._projectInfoStore("MODULE_INFO", moduleInfos) - for key, value in moduleInfos.items(): - self.pageContent.moduleList.addItem(QListWidgetItem(key)) - - def _fillParameterTable(self, parameters): - self.pageContent.propertyTable.clear() - self.pageContent.propertyTable.setRowCount(len(parameters)) - for index, key in enumerate(parameters): - self.pageContent.propertyTable.setItem(index, 0, QTableWidgetItem(key)) - if "type" in parameters[key]["informations"].keys(): - if parameters[key]["informations"]["type"] == "boolean": - checkBox = QCheckBox() - self.pageContent.propertyTable.setCellWidget(index, 1, checkBox) - checkBox.setChecked(parameters[key]["value"] == "1") - if parameters[key]["informations"]["type"] == "int": - spinBox = QSpinBox() - if "max" in parameters[key]["informations"].keys(): - spinBox.setMaximum(int(parameters[key]["informations"]["max"])) - if "min" in parameters[key]["informations"].keys(): - spinBox.setMinimum(int(parameters[key]["informations"]["min"])) - if "long" in parameters[key]["informations"].keys(): - if bool(parameters[key]["informations"]["long"]): - spinBox.setSuffix("L") - self.pageContent.propertyTable.setCellWidget(index, 1, spinBox) - spinBox.setValue(int(parameters[key]["value"])) - else: - self.pageContent.propertyTable.setItem(index, 1, QTableWidgetItem(parameters[key]["value"])) - - def moduleItemClicked(self): - module = unicode(self.pageContent.moduleList.currentItem().text()) - self._fillParameterTable(self._projectInfoRetrieve("MODULE_INFO")[module]) - - - + pass \ No newline at end of file