[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kgraphviewer-devel
Subject:    Re: kgraphviewer and QML ?
From:       Ivan Brezina <ibrezina () ibrezina ! net>
Date:       2017-09-14 23:28:18
Message-ID: 124adb9f-7eb5-a596-34a7-2ce03b61228d () ibrezina ! net
[Download RAW message or body]


Maybe off-topic, but maybe you'll find it useful.

I teared piece of kgraphviewer and I use it as embedded library named 
liber in open-source project Tora. I use it for displaying joining 
graphs of SQL statements.

kgraphviewer can use graphviz two ways

- via loading gv libraries, which is problematic from technical and also 
from license perspective (imho GV is EML, while Tora is GPL)

- via calling got command and parsing its output (the dot grammar parser 
is based on boost::spring)

So you can do something similar as I did.
Or you can use freely available ANTLR grammar to parse dot output get 
AST, and then render it via QML.
Or you can implement some planar drawing graph algorithm by your own.

Ivan

On 09/14/2017 10:10 AM, kleag@free.fr wrote:
> Hi,
> 
> I'm working on a new GUI for the linguistic analyzer of my lab:
> https://github.com/aymara/lima/tree/master/lima_gui
> 
> The interface is currently purely QML based with text based displays. A standard \
> way at looking results is through graphs like the one attached. In fact, I started \
> kgraphviewer (kgv) to visualize these graphs… 
> So, I thinked about integrating the kgraphviewer kpart in the GUI and then \
> discovered that it is not quite possible. Or at least complex and inefficient. 
> I'd like to get your advice on what would be the right solution. I thinked at \
>                 several possibilities:
> - use the graphivz lib API to generate an image and show the image in the UI;
> - use the kgv API to load the graph without dispalying it in the widget and export \
>                 it to an image like above;
> - use the kgv API to load the graph and reimplement in QML the kgv canvas elements \
> (based on QAbstractGraphicsShapeItem). 
> The latter seems to be the best but also complicated with the current QML API.
> 
> What do you think ? Does one of these solutions seems reasonable ? Other ideas ?
> 
> Thanks for your attention ?
> 
> Regards,
> 
> Gaël


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic