X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2FBOutputPage.py;h=84222fee46cf54ac8416f5d967050853ac8a9aaa;hb=a1d25fea5a303e2d45b6ece1718ed3f50b6eebc2;hp=e233612e4e20069c9a3ebbda0e0af3b4012bf9c5;hpb=0f0599b68cbba7b8cf8d42153d0927c8c0170844;p=bertos.git diff --git a/wizard/BOutputPage.py b/wizard/BOutputPage.py index e233612e..84222fee 100644 --- a/wizard/BOutputPage.py +++ b/wizard/BOutputPage.py @@ -15,9 +15,39 @@ 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._setupButtonGroup() + self._connectSignals() + + def _connectSignals(self): + self.connect(self._buttonGroup, SIGNAL("buttonClicked(int)"), self._buttonClicked) + + 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