Add the CPU select page to the wizard
[bertos.git] / wizard / bertos.py
index db3fa49042c5ac94fa7104c354bc9414c0483a17..387da00c2550342a6294e9c0bd47e24200099350 100644 (file)
 #
 
 import sys
-import os
 
+from PyQt4.QtCore import *
+from PyQt4.QtGui import *
 
-def main():
-    pass
+import BProject
+
+import BStartPage
+
+import BFolderPage
+import BVersionPage
+import BCpuPage
 
+def newProject():
+    wizard = QWizard()
+    wizard.setWindowTitle("Create a BeRTOS project")
+    wizard.addPage(BFolderPage.BFolderPage())
+    wizard.addPage(BVersionPage.BVersionPage())
+    wizard.addPage(BCpuPage.BCpuPage())
+    wizard.show()
+    wizard.exec_()
+    
+def editProject():
+    print "editProject"
+
+def showStartPage():
+    QApplication.instance().dialog = BStartPage.BStartPage()
+    QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("newProject"), newProject)
+    QApplication.instance().connect(QApplication.instance().dialog, SIGNAL("editProject"), editProject)
+    QApplication.instance().dialog.show()
+
+def main():
+    app = QApplication(sys.argv)
+    app.settings = QSettings("Develer", "Bertos Configurator")
+    app.project = BProject.BProject()
+    QResource.registerResource("bertos.rcc")
+    showStartPage()
+    sys.exit(app.exec_())
 
 if __name__ == '__main__':
     main()