[kgraphviewer-devel] kgraphviewer libkgraphviz corrections

Gaël (aka Kleag) kleag at free.fr
Sat Mar 19 13:32:28 CET 2011


Hi Kevin,

I have started to use your version of kgraphviewer to build an ontology 
viewer. It is really usefull to have a direct API to the graph. But I have 
found that you have maybe been a little bit excessive on some simplifications 
:-)

For example, you have oversimplified the DotGraph::addNewEdge method. Here are 
the problems with your version:
- a detail, you have renamed the src and tgt parameters to sourceState and 
targetState. I don't understand why ? They are not states but nodes.
- you have replaced the elementNamed calls by node Named. This is an error as 
edges can also link subgraphs.
- that's why there was backoff calls using the "cluster_" + elementNamed, dur 
to the way graphviz names the subgraphs. It should not be removed
- concerning the naming of the new edge id, the method you used is not sure: 
there can be also an edge named nbedges+1 in the dot file. That's why I used an 
uuid which is a bit too long but which insures it is uniques
- finaly if the id is given in the attribute, you must use it such as to be 
able to save the graph exactly as you read it.

Would you mind if I commit the corrections of these problems and possibly also 
others I could find ?

Best regards,

Gaël
-- 
KsirK - a world domination strategy game 
http://techbase.kde.org/Projects/Games/Tactic_and_Strategy/KsirK

KGraphViewer - a GraphViz dot graphs viewer and editor based on a reusable 
part
http://extragear.kde.org/apps/kgraphviewer


More information about the kgraphviewer-devel mailing list