4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
12 from BWizardPage import *
13 from libbertos import *
15 class BStartPage(BWizardPage):
18 BWizardPage.__init__(self, "start.ui")
19 self._connectSignals()
20 self.setTitle(self.tr("Create or edit a beRTOS project"))
21 self._initializeButtons()
24 def _connectSignals(self):
25 self.connect(self.pageContent.newButton, SIGNAL("clicked()"), self.newProject)
26 self.connect(self.pageContent.editButton, SIGNAL("clicked()"), self.editProject)
28 def _initializeButtons(self):
29 self.buttonGroup = QButtonGroup()
30 self.buttonGroup.addButton(self.pageContent.newButton)
31 self.buttonGroup.addButton(self.pageContent.editButton)
32 self.buttonGroup.setExclusive(True)
35 self.pageContent.newDescription.setVisible(False)
36 self.pageContent.editDescription.setVisible(False)
39 filename = QFileDialog.getSaveFileName(self, self.tr("Destination directory"), "", "", "", QFileDialog.ShowDirsOnly)
40 if not filename.isEmpty():
41 self.pageContent.newDescription.setText("(\"" + filename + "\")")
42 self.pageContent.newDescription.setVisible(True)
43 # TODO: It's better to create it at the end of the wizard...
44 createBertosProject(filename)
46 self.pageContent.newDescription.setText("")
47 self.pageContent.newDescription.setVisible(False)
49 def editProject(self):