Mercurial > lcfOS
comparison python/ide.py @ 131:04e45faafd1d
Added register view
author | Windel Bouwman |
---|---|
date | Sat, 19 Jan 2013 18:41:49 +0100 |
parents | 654093a9a1e3 |
children | 9af544be5d2a |
comparison
equal
deleted
inserted
replaced
130:654093a9a1e3 | 131:04e45faafd1d |
---|---|
1 #!/usr/bin/python | 1 #!/usr/bin/python |
2 | 2 |
3 import sys, os, base64 | 3 import sys, os, base64 |
4 if sys.version_info.major != 3: | 4 assert sys.version_info.major == 3, "Needs to be run in python version 3.x" |
5 print("Needs to be run in python version 3.x") | |
6 sys.exit(1) | |
7 | 5 |
8 from PyQt4.QtCore import * | 6 from PyQt4.QtCore import * |
9 from PyQt4.QtGui import * | 7 from PyQt4.QtGui import * |
10 | 8 |
11 # Compiler imports: | 9 # Compiler imports: |
12 from project import Project | 10 from project import Project |
13 import ppci | 11 import ppci |
14 from astviewer import AstViewer | 12 from astviewer import AstViewer |
15 from codeeditor import CodeEdit | 13 from codeeditor import CodeEdit |
14 stutil = __import__('st-util') | |
16 | 15 |
17 lcfospng = base64.decodestring(b'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A\n/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEhMKBk7B678AAAA/SURBVFjD\n7dbBCQAgDATBi9h/y7EFA4Kf2QLCwH1S6XQu6sqoujublc8BAAAAAAAAAAB8B+zXT6YJAAAAAKYd\nWSgFQNUyijIAAAAASUVORK5CYII=\n') | 16 lcfospng = base64.decodestring(b'iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A\n/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9sJEhMKBk7B678AAAA/SURBVFjD\n7dbBCQAgDATBi9h/y7EFA4Kf2QLCwH1S6XQu6sqoujublc8BAAAAAAAAAAB8B+zXT6YJAAAAAKYd\nWSgFQNUyijIAAAAASUVORK5CYII=\n') |
18 | 17 |
19 class BuildOutput(QTextEdit): | 18 class BuildOutput(QTextEdit): |
20 """ Build output component """ | 19 """ Build output component """ |
147 self.astViewer.sigNodeSelected.connect(self.nodeSelected) | 146 self.astViewer.sigNodeSelected.connect(self.nodeSelected) |
148 self.builderrors = addComponent('Build errors', BuildErrors()) | 147 self.builderrors = addComponent('Build errors', BuildErrors()) |
149 self.builderrors.sigErrorSelected.connect(self.errorSelected) | 148 self.builderrors.sigErrorSelected.connect(self.errorSelected) |
150 self.projectview = addComponent('Project explorer', ProjectView()) | 149 self.projectview = addComponent('Project explorer', ProjectView()) |
151 self.projectview.sigLoadFile.connect(self.loadFile) | 150 self.projectview.sigLoadFile.connect(self.loadFile) |
151 self.devxplr = addComponent('Device explorer', stutil.DeviceExplorer()) | |
152 self.regview = addComponent('Registers', stutil.RegisterView()) | |
153 self.devxplr.deviceSelected.connect(self.regview.mdl.setDevice) | |
152 | 154 |
153 # About dialog: | 155 # About dialog: |
154 self.aboutDialog = AboutDialog() | 156 self.aboutDialog = AboutDialog() |
155 self.aboutDialog.setWindowIcon(QIcon(icon)) | 157 self.aboutDialog.setWindowIcon(QIcon(icon)) |
156 # Create actions: | 158 # Create actions: |