diff options
author | Jan-Arve Sæther <jan-arve.saether@nokia.com> | 2009-06-11 11:37:45 (GMT) |
---|---|---|
committer | Eduardo M. Fleury <eduardo.fleury@openbossa.org> | 2009-07-22 18:04:27 (GMT) |
commit | 07cac98dddb5bf3f4c6705d53ef240abcf6e8e90 (patch) | |
tree | 97677d94d811be61da2dca264a0b52f555454a71 /src | |
parent | f5dc6a07fb9eb99211eb1fa3056a51b933ac3430 (diff) | |
download | Qt-07cac98dddb5bf3f4c6705d53ef240abcf6e8e90.zip Qt-07cac98dddb5bf3f4c6705d53ef240abcf6e8e90.tar.gz Qt-07cac98dddb5bf3f4c6705d53ef240abcf6e8e90.tar.bz2 |
Improve how graphviz (dotty) renders the serialized graph.
The black arrow shows the principal direction based on the "origin"
member of AnchorData.
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/graphicsview/qgraph_p.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gui/graphicsview/qgraph_p.h b/src/gui/graphicsview/qgraph_p.h index 6f4d7bd..63ba53b 100644 --- a/src/gui/graphicsview/qgraph_p.h +++ b/src/gui/graphicsview/qgraph_p.h @@ -131,7 +131,16 @@ public: for (int i = 0; i < adjacents.count(); ++i) { Vertex *v1 = adjacents.at(i); EdgeData *data = edgeData(v, v1); - edges += QString::fromAscii("%1->%2 [label=\"[%3,%4]\"]\n").arg(v->toString()).arg(v1->toString()).arg(data->minSize).arg(data->maxSize); + bool forward = data->origin == v; + if (forward) { + edges += QString::fromAscii("%1->%2 [label=\"[%3,%4]\" dir=both color=\"#000000:#a0a0a0\"] \n") + .arg(v->toString()) + .arg(v1->toString()) + .arg(data->minSize) + .arg(data->maxSize) + ; + } + } strVertices += QString::fromAscii("%1 [label=\"%2\"]\n").arg(v->toString()).arg(v->toString()); } |