Reference documentation
The Thistle Project

What is Thistle

Thistle is a open source library under LGPLv3 for Qt applications.Thistle provides a simple API to create charts, trees and graphs.

Why Thistle

For now, there is no library of charts, trees, etc. for Qt which is open source, free or which provides a correct render. The libraries like Qwt don't use the MVC pattern provided by Qt: their view need a list of points. The views in Thistle use a QAbstractItemModel to store the points/items. So, the Thistle's views work exactly like the Qt's views (QListView,QTreeView, QTableView,etc.) ans provide the same features.

OverView

Thistle is based on model/viewes class, such as QAbstractIemView class, from Qt framework. It doesn't need anything else than Qt (version >= 4.7).

Viewes are can be easily integrated to user interfaces and can be used as QWidgets. The project tries to provide a set of easy to use widgets and tries to make it easy to customize.

The main purpose of Thistle is to offer a set of new views which can be use for Qt applications. These views represents data from a model (based on QAbstractItemModel) in a more useful way.

Customizing views is an important point in Thistle: Thistle wants to let the developpers customize the render of each component (title, legend, axis, link, node, etc.).

The views contains the essentials functionnalities like item selection, modification, deletion, addition, etc. For now, we are only focused on the development of the item views. But, Thistle will contain a larger set of widgets (menus, indicators, etc.).

The libraries like Qwt already offer new components but the render don't often fit for client applications.

Thistle contains three modules:

Charts

This module can display a chart. there is three types of chart:

Trees

The module works like the view QTreeView. It can display a tree. There is thre types of tree: Vertical tree: The classic way to display a tree. The root is on the top. The children are below their parent. Horizontal tree: Similar to the vertical tree. Radial tree: The root are at the center. The nodes are displayed on circle around their parent.

Graphs

This module can display a graph in a Thistle::GraphView from a Thistle::GraphModel model. This modl contains the list of nodes (QModelIndex) and the list of links (Thistle::Edge). Thistle::GraphView uses the Thistle::AbstractGraphAlgorithm to calculate the position of each node.

Soon, this module will allow developpers to use the functionnalities for graphs from a library like Boost.