def __init__(self):
BWizardPage.__init__(self, UI_LOCATION + "/output_select.ui")
self.setTitle(self.tr("Choose the project output"))
- self._setupButtonGroup()
self._connectSignals()
+ self._projectInfoStore("OUTPUT", [])
def _connectSignals(self):
- self.connect(self._buttonGroup, SIGNAL("buttonClicked(int)"), self._buttonClicked)
+ 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 _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
+ 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
makefile = open("mktemplates/template.mk", "r").read()
makefile = mkGenerator(projectInfo, makefile)
open(prjdir + "/" + os.path.basename(prjdir) + ".mk", "w").write(makefile)
- workspace = codeliteWorkspaceGenerator(projectInfo)
- open(directory + "/" + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
- project = codeliteProjectGenerator(projectInfo)
- open(directory + "/" + os.path.basename(prjdir) + ".project", "w").write(project)
+ if "codelite" in projectInfo.info("OUTPUT"):
+ workspace = codeliteWorkspaceGenerator(projectInfo)
+ open(directory + "/" + os.path.basename(prjdir) + ".workspace", "w").write(workspace)
+ project = codeliteProjectGenerator(projectInfo)
+ open(directory + "/" + os.path.basename(prjdir) + ".project", "w").write(project)
def mkGenerator(projectInfo, makefile):
"""
</property>
<layout class="QVBoxLayout" name="verticalLayout" >
<item>
- <widget class="QRadioButton" name="bbsButton" >
+ <widget class="QCheckBox" name="standardCheckBox" >
+ <property name="enabled" >
+ <bool>false</bool>
+ </property>
<property name="text" >
<string>BeRTOS build system</string>
</property>
+ <property name="checkable" >
+ <bool>true</bool>
+ </property>
+ <property name="checked" >
+ <bool>true</bool>
+ </property>
</widget>
</item>
<item>
</property>
<layout class="QVBoxLayout" name="verticalLayout_2" >
<item>
- <widget class="QRadioButton" name="eclipseButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
+ <widget class="QCheckBox" name="eclipseCheckBox" >
<property name="text" >
<string>Eclipse project</string>
</property>
</property>
<layout class="QVBoxLayout" name="verticalLayout_3" >
<item>
- <widget class="QRadioButton" name="xcodeButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
+ <widget class="QCheckBox" name="xcodeCheckBox" >
<property name="text" >
<string>XCode project</string>
</property>
<item>
<widget class="QFrame" name="frame_4" >
<property name="enabled" >
- <bool>false</bool>
+ <bool>true</bool>
</property>
<property name="frameShape" >
<enum>QFrame::StyledPanel</enum>
</property>
<layout class="QVBoxLayout" name="verticalLayout_4" >
<item>
- <widget class="QRadioButton" name="codeliteButton" >
- <property name="enabled" >
- <bool>false</bool>
- </property>
+ <widget class="QCheckBox" name="codeliteCheckBox" >
<property name="text" >
<string>CodeLite project</string>
</property>