GobChartsWidget
1.0
|
Responsible for drawing LINE charts. More...
#include <gobchartslineview.h>
Public Member Functions | |
GobChartsLineView (QWidget *parent=0) | |
Constructor. | |
virtual | ~GobChartsLineView () |
Destructor. | |
Public Member Functions inherited from GobChartsView | |
virtual | ~GobChartsView () |
Constructor. | |
void | drawChart () |
Displays the chosen chart type. | |
void | legendItemSelected (const QString &text) |
Informs the view that a legend of name "text" has been selected. | |
void | setStateXML (const QDomNode &viewNode, const QDomNode &dataNode, bool includeData=true) |
Set the chart values when loading from file. | |
QString | getStateXML (bool includeData=true) const |
Returns the chart content and settings as an XML QString. | |
QRect | visualRect (const QModelIndex &index) const |
Re-implemented from QAbstractItemView. | |
QModelIndex | indexAt (const QPoint &point) const |
Re-implemented from QAbstractItemView. | |
void | scrollTo (const QModelIndex &index, ScrollHint hint=EnsureVisible) |
Re-implemented from QAbstractItemView. | |
void | setModel (QAbstractItemModel *model) |
Re-implemented from QAbstractItemView. | |
Protected Member Functions | |
void | generateGraphicsItems () |
Graphics (chart) items. | |
bool | needsGrid () const |
Grid required (returns "true"). | |
QString | typeInteger () const |
Type integer is "2". | |
Protected Member Functions inherited from GobChartsView | |
GobChartsView (QWidget *parent=0) | |
Destructor. | |
bool | useFixedColour () const |
Returns "true" if the chart colour is fixed or "false" if random colours must be generated. | |
QColor | fixedColour () const |
If the chart colour is fixed, this function returns the colour used to draw the chart items. | |
void | addToGraphItemsContainer (const QModelIndex &valueIndex, QGraphicsItem *item, const QString &legendText) |
Stores dynamically created graphics items. | |
int | nrValidItems () const |
Returns the number of valid rows in the data model. | |
QList< int > | validRowList () const |
Returns a list of valid data row numbers. | |
QString | category (int row) const |
Returns the category name corresponding to "row" in validRowList() | |
qreal | value (int row) const |
Returns the data value corresponding to "row" in validRowList() | |
const QRectF & | innerSceneRectF () const |
Returns the rectangle corresponding to the "inner scene". | |
bool | isWithinAllowedRange (qreal value) const |
Determines whether or not a data value falls within the allowed data range. | |
qreal | gridWidth () const |
Returns the grid width. | |
qreal | stripSpace (qreal perc) const |
Calculates the amount of space at the top of the view that is "extra". | |
qreal | totalValue () const |
Returns the total, consolidated value of all category values. | |
QModelIndex | moveCursor (QAbstractItemView::CursorAction cursorAction, Qt::KeyboardModifiers modifiers) |
Re-implemented from QAbstractItemView. | |
QRegion | visualRegionForSelection (const QItemSelection &selection) const |
Re-implemented from QAbstractItemView. | |
int | horizontalOffset () const |
Re-implemented from QAbstractItemView. | |
int | verticalOffset () const |
Re-implemented from QAbstractItemView. | |
bool | isIndexHidden (const QModelIndex &index) const |
Re-implemented from QAbstractItemView. | |
void | setSelection (const QRect &rect, QItemSelectionModel::SelectionFlags command) |
Re-implemented from QAbstractItemView. | |
void | keyPressEvent (QKeyEvent *event) |
Re-implemented from QAbstractItemView. | |
Additional Inherited Members | |
Public Slots inherited from GobChartsView | |
void | setLabelDetails (GobChartsLabel label, const QString &text, const QFont &font, const QColor &colour, Qt::Alignment align) |
Set chart label. | |
void | requestLabelDetails (GobChartsLabel label) |
Request a specific label's settings. | |
void | setGridLineStyle (Qt::PenStyle style) |
Grid line style. | |
void | setHorizontalGridLines (bool set, int number) |
Set horizontal grid lines. | |
void | setVerticalGridLines (bool set, int number) |
Set horizontal grid lines. | |
void | setGridColour (QColor colour) |
Set grid colour. | |
void | setFixedColour (QColor colour) |
Fix the chart colour. | |
void | setRandomColours () |
Use different colours. | |
void | setAllowedDataRange (qreal lowerBoundary, qreal upperBoundary) |
Limit data range. | |
void | setShowTotalRange () |
Show total data range. | |
void | setDebugLoggingOn (bool logging) |
Debug log. | |
Signals inherited from GobChartsView | |
void | lastDebugLogMsg (QString) |
Debug messages. | |
void | emitLabelDetails (GobChartsLabel label, const QString &text, const QFont &font, const QColor &colour, Qt::Alignment align) |
Obtain label details. | |
void | createLegendItem (const QColor &colour, const QString &text) |
Emitted when a new graphics item was created. | |
void | clearLegend () |
Emitted when a chart is redrawn and its graphics items are reset. | |
void | highLightLegendItem (const QString &text) |
Emitted when a graphics item is selected. | |
Protected Types inherited from GobChartsView | |
enum | GobChartsColumn { CATEGORY, VALUE } |
Expected data model columns. More... | |
Protected Slots inherited from GobChartsView | |
void | debugLog (QString msg) |
Log debug messages. | |
void | dataChanged (const QModelIndex &topLeft, const QModelIndex &bottomRight) |
Re-implemented from QAbstractItemView. | |
void | rowsInserted (const QModelIndex &parent, int start, int end) |
Re-implemented from QAbstractItemView. | |
void | rowsAboutToBeRemoved (const QModelIndex &parent, int start, int end) |
Re-implemented from QAbstractItemView. | |
void | mousePressEvent (QMouseEvent *p_event) |
Re-implemented from QAbstractItemView. | |
Responsible for drawing LINE charts.
This class implements the following GobChartsView pure virtual functions:
Definition at line 39 of file gobchartslineview.h.
|
protectedvirtual |
Graphics (chart) items.
This function generates the chart's line segments and uses the various categories' values to determine each segment's relative size with respect to each other and the confines of the available space.
Implements GobChartsView.
Definition at line 51 of file gobchartslineview.cpp.
|
protectedvirtual |
Grid required (returns "true").
Implements GobChartsView.
Definition at line 126 of file gobchartslineview.cpp.
|
protectedvirtual |
Type integer is "2".
Implements GobChartsView.
Definition at line 133 of file gobchartslineview.cpp.