X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBOutputPage.py;h=c8e22c9fe0625f2e9bf3e7ac53b3e207067ecae8;hb=747ba554790ad832c0508b1f79242ba1d493d849;hp=e233612e4e20069c9a3ebbda0e0af3b4012bf9c5;hpb=0f0599b68cbba7b8cf8d42153d0927c8c0170844;p=bertos.git diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index e233612e..c8e22c9f 100644 --- a/wizard/BOutputPage.py +++ b/wizard/BOutputPage.py @@ -15,9 +15,26 @@ from PyQt4.QtGui import * from BWizardPage import * import bertos_utils +from const import * class BOutputPage(BWizardPage): def __init__(self): - BWizardPage.__init__(self, "output_select.ui") + 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")) + + 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