X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBOutputPage.py;h=55418d664de7f98dfd2f4bdfd57a45773c2ac905;hb=81f2387d160fee072af03291b5682a06f5b807cd;hp=c8e22c9fe0625f2e9bf3e7ac53b3e207067ecae8;hpb=747ba554790ad832c0508b1f79242ba1d493d849;p=bertos.git diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index c8e22c9f..55418d66 100644 --- a/wizard/BOutputPage.py +++ b/wizard/BOutputPage.py @@ -4,7 +4,7 @@ # Copyright 2009 Develer S.r.l. (http://www.develer.com/) # All rights reserved. # -# $Id:$ +# $Id$ # # Author: Lorenzo Berni # @@ -18,23 +18,47 @@ import bertos_utils from const import * class BOutputPage(BWizardPage): + """ + Page of the wizard that show a little summary of the previous decisions. + """ def __init__(self): BWizardPage.__init__(self, UI_LOCATION + "/output_select.ui") self.setTitle(self.tr("Choose the project output")) - self._connectSignals() - self._projectInfoStore("OUTPUT", []) - def _connectSignals(self): - 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")) + ## Overloaded BWizardPage methods. ## - def _modeChecked(self, checked, value): - output_list = self._projectInfoRetrieve("OUTPUT") + def connectSignals(self): + """ + Connects the signals with the related slots. + """ + self.connect(self.pageContent.codeliteCheckBox, SIGNAL("stateChanged(int)"), lambda checked: self.modeChecked(checked, "codelite")) + + def reloadData(self): + """ + Overload of the BWizardPage reloadData method. + """ + output = [] + if self.pageContent.codeliteCheckBox.isChecked(): + output.append("codelite") + else: + if "codelite" in output: + output.remove("codelite") + self.setProjectInfo("OUTPUT", output) + + #### + + ## Slots ## + + def modeChecked(self, checked, value): + """ + Slot called when one of the mode checkbox is checked. It stores it. + """ + output_list = self.projectInfo("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 + self.setProjectInfo("OUTPUT", output_list) + + #### \ No newline at end of file