1 /*! \page architecture Qanava Architecture
4 \section arch_overview Overview
6 <p>Qanava is built around two main modules corresponding to the following c++ namespaces: </p>
9 <li> <b>qan::la :</b> 'la' originally stands for "Link Analysis", even if only the graph description part of the library has been kept in Qanava. This namespace provides the necessary classes to describe a simple directed graph, as well as various abstract interfaces which allow the manipulation of the graph in a virtual canvas.
11 <li> <b>qan::can:</b> 'can' stands for 'canvas'. This namespace contains all the code that actually draws the 'la' graph nodes on an extended version of a QCanvas.
14 <p>Relations between 'qan::la' and 'qan::can' are detailed on the following picture. The 'can' part of Qanava can be used to draw graphs that are not defined with the 'la' framework, but automatic layout algorithms will be disabled.</p>
16 <img src="./images/qan-la_can-overview.png" alt="Qanava la and can namespace relationship">
21 \section arch_graph Graph module
25 <li> <b>Graph:</b> Store a navigable structure of node (qan::la::Node) objects connected by edges (qan::la::Edge).
27 <li> <b>Layout:</b> A layout define a position for each node of a given graph. The layout can be either random, optimized for general undirected graph or use more specific information stored in nodes such as date and time (qan::la::TimeTree).
29 <li> <b>Grid:</b> The grid interface define how a layout algorithm can modify the canvas by adding graphical elements to support node presentation (for example, by adding node labels or decoration items such as lines or coloured rectangles).
32 <img src="./images/qan-la-class.png" alt="'qan::la' namespace class diagram">
34 \subsection arch_graph_graph Graph
36 <p>Graphs in Qanava (class qan::la::Graph) are modelled with directed graph using a node and edge list structure. Qanava voluntarily does not provide advanced graph functions such as node searching and ordering. The graph package is designed to provide only the minimal set of functionalities needed to later use the graph drawing code. If more complex features are needed, a more advanced graph library such as Boost Graph Library should be used and the necessary wrappers created (Or a new qan::can::GraphView implemented specifically for the desired graph library).</p>
38 \sa qan::la::Graph, qan::la::Node and qan::la::Edge
40 \subsection arch_graph_layout Layout and grids
42 <p>Graph nodes encode both connectivity information and various parameters used to encode some kind of node semantic such as node label, creation date, type flag or position in space. Some of theses elements can be used to layout the graph in space before it is actually rendered on a canvas.</p>
44 <p>Warning: As in the previous section, the layout system is voluntarily kept simple and basic, and has not been designed to deal with large graph (>10.000 nodes). Other libraries should be used if more complex layouts are required, and the abstract layout classes subclassed to make the appropriate calls to this external library</p>
46 <p>In its current version, Qanava provide simple graph layout, that should be useful for most applications dealing with graphs, and a more advanced layout dealing with clustered and time labelled graph (Such as TV schedules or GANT charts).</p>
49 \section arch_canvas Canvas Module
51 <p>Graph drawing package (or canvas module qan::can) provide subclasses of QT QCanvas and QCanvasView that can graphically render graph described using the previous graph package.</p>
53 <img src="./images/qan-can-class.png" alt="'qan::can' namespace class diagram">