X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBBoardPage.py;h=843562a7b72b139da864adea6c417f3767b77c5d;hb=c145dfaa541e8166971353e91dfc281648379cd3;hp=85363bd203967093f7efc3f05946ceeaa40394b2;hpb=52c487b2edccff2f2eb2a9082b38f370be0e05d6;p=bertos.git diff --git a/wizard/BBoardPage.py b/wizard/BBoardPage.py index 85363bd2..843562a7 100644 --- a/wizard/BBoardPage.py +++ b/wizard/BBoardPage.py @@ -54,7 +54,7 @@ class BBoardPage(BWizardPage): def __init__(self): BWizardPage.__init__(self, const.UI_LOCATION + "/board_select.ui") - self.setTitle(self.tr("Select the board from the predefined ones")) + self.setTitle(self.tr("Select your development board")) ## Overloaded QWizardPage methods ## @@ -68,6 +68,7 @@ class BBoardPage(BWizardPage): preset_path = preset_path["path"] self.setProjectInfo("PROJECT_BOARD", preset_path) self.setProjectInfo("PROJECT_FROM_PRESET", True) + self.setProjectInfo("PRESET_LOADED", False) return True else: return False @@ -93,11 +94,11 @@ class BBoardPage(BWizardPage): """ Overload of the BWizardPage connectSignals method. """ - self.connect(self.pageContent.boardList, SIGNAL("itemSelectionChanged()"), self.updateUi) - self.connect(self.pageContent.boardList, SIGNAL("itemSelectionChanged()"), self, SIGNAL("completeChanged()")) + self.connect(self.pageContent.boardList, SIGNAL("currentItemChanged(QListWidgetItem*,QListWidgetItem*)"), self.updateUi) + self.connect(self.pageContent.boardList, SIGNAL("currentItemChanged(QListWidgetItem*,QListWidgetItem*)"), self, SIGNAL("completeChanged()")) self.connect(self.pageContent.customButton, SIGNAL("clicked()"), self.customButtonClicked) - def reloadData(self): + def reloadData(self, previous_id=None): """ Overload of the BWizardPage reloadData method. """ @@ -116,13 +117,9 @@ class BBoardPage(BWizardPage): info_dict = qvariant_converter.getDict(self.selected.data(Qt.UserRole)) info_dict = qvariant_converter.getStringDict(info_dict["info"]) description = info_dict.get("description", "") - image = os.path.join(info_dict["path"], ".image.png") - if os.path.exists(image): - self.pageContent.imageLabel.setPixmap(QPixmap(image)) - self.pageContent.imageLabel.setVisible(True) - else: - self.pageContent.imageLabel.setVisible(False) - self.pageContent.descriptionLabel.setText(description) + path = unicode(QUrl.fromLocalFile(info_dict["path"]).toString()) + description = description.replace("$path", path) + self.pageContent.descriptionArea.setHtml(description) def customButtonClicked(self): self.setProjectInfo("PROJECT_FROM_PRESET", False) @@ -146,4 +143,4 @@ class BBoardPage(BWizardPage): @property def selected(self): - return self.pageContent.boardList.currentItem() \ No newline at end of file + return self.pageContent.boardList.currentItem()