Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Free C++ library for drawing flow diagrams or Directed graph? [closed]

I want to embed a flow diagram drawing canvas in my program. Users would possible to:

  • draw "nodes" (rectangle nodes is enough) and "edges" (preferable to be orthogonal) to connect "nodes";
  • use mouse to drag nodes for layout and resize rectangle;
  • select one or multiple nodes by mouse to delete, copy, paste etc.;
  • select one or multiple nodes by mouse to edit predefined properties (volume, temperature, pressure etc.) for them.;
  • change color (optional)
  • save/read data to/from files.

After drawing, the program only needs to get the connection logic (in data structure like Directed graph) and properties for further calculation.

Is there any free or open source C++ library to do this? (Not necessary for cross-platform, available in windows is enough.)

like image 380
Zhang Long Avatar asked May 29 '11 14:05

Zhang Long


3 Answers

I recently was looking in to this and came across a few other options, along with Graphviz:

http://igraph.sourceforge.net/screenshots.html

http://networkx.lanl.gov/gallery.html

http://gephi.org/screenshots/

I ended up using networkx. I'm going to be playing with Gephi shortly to see what kind of data I can load in to it.

like image 170
Sean Avatar answered Nov 08 '22 19:11

Sean


Dynagraph seems to have GUI Drawing included

http://www.dynagraph.org/

Dynagraph for Windows is a complete OLE graph-drawing application, allowing you to paste graphs into other documents, and paste documents into a graph as nodes.

like image 1
Lou Franco Avatar answered Nov 08 '22 17:11

Lou Franco


If you're willing to commit to using Qt code for the graphical side of things, Qanava does a decent job of it. For dealing with graphs themselves (non-graphically) Boost Graph is quite nice.

like image 1
synthesizerpatel Avatar answered Nov 08 '22 18:11

synthesizerpatel