Change variable name to follow the develer python coding standard
[bertos.git] / wizard / BStartPage.py
1 #!/usr/bin/env python
2 # encoding: utf-8
3 #
4 # Copyright 2008 Develer S.r.l. (http://www.develer.com/)
5 # All rights reserved.
6 #
7 # $Id:$
8 #
9 # Author: Lorenzo Berni <duplo@develer.com>
10 #
11
12 from PyQt4.QtCore import *
13 from PyQt4.QtGui import *
14 import PyQt4.uic as uic
15
16 from const import *
17
18 class BStartPage(QDialog):
19     
20     def __init__(self):
21         QDialog.__init__(self)
22         self._setupUi()
23         self._connectSignals()
24         self.setWindowTitle(self.tr("Create or edit a BeRTOS project"))
25         self._initializeButtons()
26     
27     def _setupUi(self):
28         self.content = uic.loadUi(UI_LOCATION + "/start.ui", None)
29         layout = QVBoxLayout()
30         layout.addWidget(self.content)
31         self.setLayout(layout)
32     
33     def _connectSignals(self):
34         self.connect(self.content.newButton, SIGNAL("clicked()"), self.newProject)
35         self.connect(self.content.editButton, SIGNAL("clicked()"), self.editProject)
36     
37     def _initializeButtons(self):
38         self.button_group = QButtonGroup()
39         self.button_group.addButton(self.content.newButton)
40         self.button_group.addButton(self.content.editButton)
41         self.button_group.setExclusive(True)
42         
43     def newProject(self):
44         self.close()
45         self.emit(SIGNAL("newProject"))
46     
47     def editProject(self):
48         self.close()
49         self.emit(SIGNAL("editProject"))