Update to new kernel config; use cpu_relax().
[bertos.git] / wizard / BOutputPage.py
index e233612e4e20069c9a3ebbda0e0af3b4012bf9c5..c8e22c9fe0625f2e9bf3e7ac53b3e207067ecae8 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):
+        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