4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
9 # Author: Lorenzo Berni <duplo@develer.com>
12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import *
14 import PyQt4.uic as uic
16 class BStartPage(QDialog):
19 QDialog.__init__(self)
21 self._connectSignals()
22 self.setWindowTitle(self.tr("Create or edit a BeRTOS project"))
23 self._initializeButtons()
26 self.content = uic.loadUi("start.ui", None)
27 layout = QVBoxLayout()
28 layout.addWidget(self.content)
29 self.setLayout(layout)
31 def _connectSignals(self):
32 self.connect(self.content.newButton, SIGNAL("clicked()"), self.newProject)
33 self.connect(self.content.editButton, SIGNAL("clicked()"), self.editProject)
35 def _initializeButtons(self):
36 self.buttonGroup = QButtonGroup()
37 self.buttonGroup.addButton(self.content.newButton)
38 self.buttonGroup.addButton(self.content.editButton)
39 self.buttonGroup.setExclusive(True)
43 self.emit(SIGNAL("newProject"))
45 def editProject(self):
47 self.emit(SIGNAL("editProject"))