X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBOutputPage.py;h=c8e22c9fe0625f2e9bf3e7ac53b3e207067ecae8;hb=8b2b3759daf3222963cbb3cd4364fef556622e87;hp=84222fee46cf54ac8416f5d967050853ac8a9aaa;hpb=255e98716335ab8e40da330bad016a8983046dec;p=bertos.git diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index 84222fee..c8e22c9f 100644 --- a/wizard/BOutputPage.py +++ b/wizard/BOutputPage.py @@ -22,32 +22,19 @@ class BOutputPage(BWizardPage): def __init__(self): BWizardPage.__init__(self, UI_LOCATION + "/output_select.ui") self.setTitle(self.tr("Choose the project output")) - self._setupButtonGroup() self._connectSignals() + self._projectInfoStore("OUTPUT", []) def _connectSignals(self): - self.connect(self._buttonGroup, SIGNAL("buttonClicked(int)"), self._buttonClicked) + self.connect(self.pageContent.eclipseCheckBox, SIGNAL("stateChanged(int)"), lambda checked: self._modeChecked(checked, "eclipse")) + self.connect(self.pageContent.xcodeCheckBox, SIGNAL("stateChanged(int)"), lambda checked: self._modeChecked(checked, "xcode")) + self.connect(self.pageContent.codeliteCheckBox, SIGNAL("stateChanged(int)"), lambda checked: self._modeChecked(checked, "codelite")) - def _setupButtonGroup(self): - self._buttonGroup = QButtonGroup() - self._buttonGroup.addButton(self.pageContent.bbsButton) - self._buttonGroup.addButton(self.pageContent.eclipseButton) - self._buttonGroup.addButton(self.pageContent.codeliteButton) - self._buttonGroup.addButton(self.pageContent.xcodeButton) - - def _buttonClicked(self): - self.emit(SIGNAL("completeChanged()")) - - def isComplete(self): - for button in self._buttonGroup.buttons(): - if button.isChecked(): - if button is self.pageContent.bbsButton: - self._projectInfoStore("OUTPUT", "makefile") - elif button is self.pageContent.eclipseButton: - self._projectInfoStore("OUTPUT", "eclipse") - elif button is self.pageContent.codeliteButton: - self._projectInfoStore("OUTPUT", "codelite") - elif button is self.pageContent.xcodeButton: - self._projectInfoStore("OUTPUT", "xcode") - return True - return False \ No newline at end of file + def _modeChecked(self, checked, value): + output_list = self._projectInfoRetrieve("OUTPUT") + if checked == Qt.Checked: + output_list.append(value) + else: + output_list.remove(value) + self._projectInfoStore("OUTPUT", output_list) + \ No newline at end of file