X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=wizard%2Fbertos.py;h=7017e0d2073fbef8720a242a29c0a8c3a93c51f9;hb=1dfc119210d048ac921c05ecbf7ce08fb24db461;hp=124a453106e20a01e4de3007a6daeec7f0854f94;hpb=62daf2c2387363780ef8f64e90e94ed527fbf58b;p=bertos.git diff --git a/wizard/bertos.py b/wizard/bertos.py old mode 100644 new mode 100755 index 124a4531..7017e0d2 --- a/wizard/bertos.py +++ b/wizard/bertos.py @@ -9,21 +9,42 @@ # Author: Lorenzo Berni # +import os import sys +from distutils.dep_util import newer + from PyQt4.QtCore import * from PyQt4.QtGui import * + +import BProject + import BStartPage +import BWizard + +def newProject(): + wizard = BWizard.BWizard() + 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) - startPage = BStartPage.BStartPage() - wizard = QWizard() - wizard.setWindowTitle("Welcome in beRTOS configuration wizard") - wizard.addPage(startPage) - wizard.show() + app.settings = QSettings("Develer", "Bertos Configurator") + app.project = BProject.BProject() + if newer("bertos.qrc", "bertos.rcc"): + os.system("rcc -binary bertos.qrc > bertos.rcc") + QResource.registerResource("bertos.rcc") + showStartPage() sys.exit(app.exec_()) - if __name__ == '__main__': main()