321b1076c1f5479735620cb3f7d5b64dfb196a06
[bertos.git] / wizard / test / testModulePage.py
1 #!/usr/bin/env python
2 # encoding: utf-8
3 #
4 # Copyright 2009 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 sys
13 import os
14
15 from PyQt4.QtGui import *
16
17 # Add the wizard class path in the path for the testing module
18 sys.path.append("../")
19
20 import BProject
21 import BModulePage
22 import bertos_utils
23
24 # Add a custom UI_LOCATION constant
25 BModulePage.UI_LOCATION = "../ui"
26
27 def main():
28     app = QApplication([])
29     app.project = BProject.BProject()
30     page = BModulePage.BModulePage()
31     page.setProjectInfo("SOURCES_PATH", "../../")
32     page.setProjectInfo("CPU_INFOS", {"TOOLCHAIN": "avr", "CPU_TAGS": []})
33     bertos_utils.loadSourceTree(page.project())
34     page.reloadData()
35     page.show()
36     app.exec_()
37
38 if __name__ == '__main__':
39     main()