Commit c8ed8b88 authored by Maxime Perrotin's avatar Maxime Perrotin
Browse files

Set root elements in the data dictionary

parent cb492905
......@@ -176,7 +176,7 @@
<widget class="QWidget" name="dockWidgetContents_3">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QTreeView" name="datadict"/>
<widget class="QTreeWidget" name="datadict"/>
</item>
</layout>
</widget>
......
This diff is collapsed.
......@@ -2012,6 +2012,7 @@ class OG_MainWindow(QtGui.QMainWindow, object):
self.mdi_area = None
self.sub_mdi = None
self.statechart_mdi = None
self.datadict = None
def new_scene(self):
''' Create a new, clean SDL scene. This function is necessary because
......@@ -2128,6 +2129,13 @@ class OG_MainWindow(QtGui.QMainWindow, object):
self.asn1_area.text.try_resize()
self.view.update_asn1_dock.connect(self.set_asn1_view)
self.datadict = self.findChild(QtGui.QTreeWidget, 'datadict')
QtGui.QTreeWidgetItem(self.datadict, ["ASN.1 Data types"])
QtGui.QTreeWidgetItem(self.datadict, ["ASN.1 Constants"])
QtGui.QTreeWidgetItem(self.datadict, ["Input signals"])
QtGui.QTreeWidgetItem(self.datadict, ["Output signals"])
self.datatypes_scene.addItem(self.asn1_area)
# Create a timer for periodically saving a backup of the model
......@@ -2192,11 +2200,11 @@ class OG_MainWindow(QtGui.QMainWindow, object):
children = []
try:
children.extend(ast.dataview[each].type.Children)
except AttributeError:
except (AttributeError, KeyError):
pass
try:
children.extend(ast.dataview[each].type.EnumValues)
except AttributeError:
except (AttributeError, KeyError):
pass
for ch in children:
text = re.sub(ch, ch.replace('-', '_'), text)
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-08-22 10:32:25
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-08-22 11:16:15
import sys
from antlr3 import *
......
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-08-22 10:32:23
# $ANTLR 3.1.3 Mar 17, 2009 19:23:44 sdl92.g 2016-08-22 11:16:12
 
import sys
from antlr3 import *
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment