GobChartsWidget  1.0
Signals | Public Member Functions | List of all members
GobChartsWidget Class Reference

Main widget class. More...

#include <gobchartswidget.h>

Inheritance diagram for GobChartsWidget:


void lastDebugLogMsg (QString)
 Emits the last debug log message.

Public Member Functions

 GobChartsWidget (QWidget *parent=0)
 ~GobChartsWidget ()
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".

Detailed Description

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.

Definition at line 124 of file gobchartswidget.h.

Member Function Documentation

void GobChartsWidget::lastDebugLogMsg ( QString  )

Emits the last debug log message.

See Also
void GobChartsWidget::setDebugLoggingOn ( bool  log)

Turn debug logging messages "on" or "off".

See Also

Definition at line 161 of file gobchartswidget.cpp.

void GobChartsWidget::setModel ( QAbstractItemModel *  model)

Set the item model (GobChartsWidget does NOT take ownership).

Definition at line 174 of file gobchartswidget.cpp.

void GobChartsWidget::setSelectionModel ( QItemSelectionModel *  selectionModel)

Set the item selection model (GobChartsWidget does NOT take ownership).

Definition at line 184 of file gobchartswidget.cpp.

The documentation for this class was generated from the following files: