X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBOutputPage.py;h=c36ec390fc384d9ff271ac434ef3ff5333a2049b;hb=23dceb1ea9a8ad9250ce1a2b349a0706987c005d;hp=c8e22c9fe0625f2e9bf3e7ac53b3e207067ecae8;hpb=747ba554790ad832c0508b1f79242ba1d493d849;p=bertos.git diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index c8e22c9f..c36ec390 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,37 @@ 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", []) + self.connectSignals() + self.setProjectInfo("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 connectSignals method. ## - 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")) + + #### + + ## 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