Remove the spinner (it isn't needed)
[bertos.git] / wizard / bertos.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 import os
13 import sys
14 from distutils.dep_util import newer
15
16 from PyQt4.QtCore import *
17 from PyQt4.QtGui import *
18
19 import BProject
20
21 import BStartPage
22 import BWizard
23
24 import bertos_utils
25
26 def newProject():
27     wizard = BWizard.BWizard()
28     wizard.show()
29     wizard.exec_()
30     
31 def editProject():
32     print "editProject"
33
34 def showStartPage():
35     QApplication.instance().dialog = BStartPage.BStartPage()
36     QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("newProject"), newProject)
37     QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("editProject"), editProject)
38     QApplication.instance().dialog.show()
39
40 def main():
41     app = QApplication(sys.argv)
42     app.settings = QSettings("Develer", "Bertos Configurator")
43     app.project = BProject.BProject()
44     if newer("bertos.qrc", "bertos.rcc"):
45         os.system("rcc -binary bertos.qrc > bertos.rcc")
46     QResource.registerResource("bertos.rcc")
47     showStartPage()
48     sys.exit(app.exec_())
49
50 if __name__ == '__main__':
51     main()
52