Add the main file in the makefile
[bertos.git] / wizard / BOutputPage.py
index e233612e4e20069c9a3ebbda0e0af3b4012bf9c5..397be470a6684adbde69afb19cca125db5356df2 100644 (file)
@@ -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