[kgraphviewer-devel] Re: Many wishes + will to implement them :-)
Gaël (aka Kleag)
kleag at free.fr
Sun Nov 21 17:03:16 CET 2010
Hi Marco,
And welcome to kgraphviewer development ! :-)
First of all, I must say that if you have important projects for KGraphViewer,
they will be very welcome. I have currently not a lot of time for large
projects for it. I have developped it to fullfill my needs and I am now mainly
in maintenance mode. So, if you want to make it better, it will be great!
Le samedi 20 novembre 2010 18:53:05, Marco Poletti a écrit :
> Hi,
>
> I am searching for a (Qt or KDE) graph library for a simple
> application, so I stumbled upon KGraphViewer.
>
> From *my* point of view, I have many wishes in KGraphViewer that I am
> willing to implement, either in KGraphViewer itself or in a new
> library (if you don't want these changes or maybe if these changes
> would require a complete re-write).
>
> --- Important wishes: ---
>
> * Allow in-memory graphs
> If I understand it correctly, graphs must be loaded from files.
You can also give an already built graphviz agraph object..
> I think a class should be provided to let the programmer construct the
> graph structure, without the associated serialization/disk/parsing
> overhead.
> See the example code in the next wish.
Well, there is already basic and incomplete edit features done through
signal/slots of the part. But yes, the idea was to interact only through the
part.
>
> * Implement MVC "better" (IMHO)
> When using KGraphViewer as a widget, it acts both as a View and as a Model.
> I think the user should use two separate classes: DotGraphView as View
> and DotGraph as model.
> This is currently not possible because the DotGraph interface is not
> exposed to user code and because DotGraphView contains a DotGraph
> instead of referencing an independent DotGraph provided by the user. I
> imagine code like this (after the relevant "using" declarations):
>
> DotGraph *graph = new DotGraph(DotGraph::Directed);
> Node* a = graph->addNode("A");
> Node* b = graph->addNode("B");
> graph->addEdge(a, b);
>
> DotGraphView *graphView = new DotGraphView();
> graphView->setGraph(graph);
> myLayout->addWidget(graphView);
>
> // The "A -> B" graph is drawn
>
> graph->addEdge(b, a);
>
> // The model notifies the view of this change, and the widget is
> updated accordingly.
The idea was the kgraphviewer would be a vizualization of the user data whose
correspondance with a dotgraph should not be known to kgv. But yes, the kind
of interaction you describe could be usefull in other cases.
>
> * Incremental layouts
> A simple change (for example, adding a node) should not require a full
> recalculation of the layout, and should usually have a limited amount
> of changes in the layout. I think this can be addressed using
> Dynagraph instead of Graphviz.
Yes, I wanted this kind of thing too. I did not know about Dynagraph, but if
it is http://dynagraph2.svn.sourceforge.net, it seems dead since three years ?
>
>
> --- Optional wishes: ---
>
> * Animations on graph changes
> When the graph is changed, for example by adding a new edge, firstly a
> straight new edge should appear, and then the nodes and edges should
> move from the old positions to the updated ones (the new edge starts
> as a straight line and moves to its position).
Yeah !
>
> * Polishing of the widget interface
> I think (but being a noob, I may be wrong) that when using
> KGraphViewer as a widget instead of a KPart, it should have a
> constructor that doesn't take a KActionCollection. Maybe it should
> even have a default (no argument) constructor.
You're right.
>
> * Allow widgets as nodes
> This is maybe the most complicated wish, and it is *really* optional.
> I think some applications might want to use custom-drawn widgets as
> nodes. For example, I imagine the elements of an UML diagram, lay out
> by Dynagraph as rectangular boxes and then filled with the widget's
> content.
All elements are QGraphicsItems. So they can also contain other items or even
widgets.
>
>
> Am I wrong? I.e., are some of my wishes already implemented?
>
> Do you think I should implement these changes in KGraphViewer?
Yes, please !
> If this is the case, should I develop in a separate branch or something?
> How? This would be my first contribution to a KDE project.
Yes, each important new feature should be in another branch and merged when
they are ready. But now kgv is on git. and I'm not sure of how it works. You
will have to read the manual :-)
I have other wishes :-) See the TODO file. The more important one is to be able
to load and explore really large files (1,000, 10,000 nodes...) to expoit data
mining results. The tulip libraries could be a possibility.
So, to conclude, your efforts will be very welcome. The only thing I will
insist on is that the current features should be maintained: the KGraphViewer
part and application have to be able to load any graphviz graph and show him
exactly as would dot do.
Hoping ti hear soon from you ! Regards,
Gaël
>
> Thanks,
> Marco Poletti
> _______________________________________________
> kgraphviewer-devel mailing list
> kgraphviewer-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kgraphviewer-devel
--
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