Main widget class. More...
|Emits the last debug log message. |
|GobChartsWidget (QWidget *parent=0)|
|void||setModel (QAbstractItemModel *model)|
|Set the item model (GobChartsWidget does NOT take ownership). |
|void||setSelectionModel (QItemSelectionModel *selectionModel)|
|Set the item selection model (GobChartsWidget does NOT take ownership). |
|void||setDebugLoggingOn (bool log)|
|Turn debug logging messages "on" or "off". |
Main widget class.
As an application developer, this is the only class that really needs to concern you (unless, of course, you are interested in changing any of the underlying functionality).
GobChartsWidget will provide you with a final, usable widget that contains all the necessary GUI tools for an end-user to create and customise any of the available chart types (BAR, PIE or LINE). All you need to do is to create an instance of GobChartsWidget and inform it of your item and selection models via setModel() and setSelectionModel(). It is important to note that GobChartsWidget does NOT take ownership of either of the models set on it.
VERY IMPORTANT: The data model you use must contain your data categories in its first column and the corresponding values in the second. Furthermore, GobChartsWidget can only handle one-to-one mappings of categories to data, i.e. you cannot draw charts with data values spanning multiple columns and, finally, all negative data values are automatically rounded up to zero. The reason for this is that pie charts do not lend themselves to the display of multiple data sets per category, nor the display of negative numbers and I decided to exclude these possibilities altogether in favour of a design allowing for greater flexibility at run-time and fewer complications with regards to the implementation.
Finally, if you would like to see what GobChartsWidget gets up to in the background, you can turn debug logging on via setDebugLoggingOn() and connect to GobChartsWidget's lastDebugLogMsg() signal in order to receive the log output.
Emits the last debug log message.
|void GobChartsWidget::setModel||(||QAbstractItemModel *||model||)|
|void GobChartsWidget::setSelectionModel||(||QItemSelectionModel *||selectionModel||)|