X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBOutputPage.py;h=397be470a6684adbde69afb19cca125db5356df2;hb=947fa269915f08922989a0faf971c216594ababf;hp=e233612e4e20069c9a3ebbda0e0af3b4012bf9c5;hpb=0f0599b68cbba7b8cf8d42153d0927c8c0170844;p=bertos.git diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index e233612e..397be470 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): + outputList = self._projectInfoRetrieve("OUTPUT") + if checked == Qt.Checked: + outputList.append(value) + else: + outputList.remove(value) + self._projectInfoStore("OUTPUT", outputList) + \ No newline at end of file