[graph] use 'types' module for data models and signals/slots

* store Nodes and Attributes in Models
* expose key attributes/methods as Properties/Slots
* update command line scripts
This commit is contained in:
Yann Lanthony 2017-09-25 19:14:19 +02:00
parent 4cd9627263
commit 51a9b0e316
4 changed files with 138 additions and 66 deletions

View file

@ -56,11 +56,11 @@ if args.node:
if args.node not in graph.nodes:
print('ERROR: node "{}" does not exist in file "{}".'.format(args.node, args.graphFile))
exit(-1)
nodes = [graph.nodes[args.node]]
nodes = [graph.nodes(args.node)]
else:
startNodes = None
if args.graph:
startNodes = [graph.nodes[args.graph]]
startNodes = [graph.nodes(args.graph)]
nodes = graph.dfsNodesOnFinish(startNodes=startNodes)
for node in nodes: