A concrete chart renderer based on Qt4. More...
#include <ChartRenderer.h>
Public Member Functions | |
ChartRenderer () | |
Default constructor. More... | |
te::color::RGBAColor ** | render (const te::map::Chart *chart, const te::da::DataSet *dataset, std::size_t &width) |
It generates the image pattern from the given chart and the current element of dataset. More... | |
te::color::RGBAColor ** | render (const te::map::Chart *chart, const std::map< std::string, double > &chartValue, std::size_t &width) |
~ChartRenderer () | |
Destructor. More... | |
Protected Member Functions | |
double | computeSum (const std::vector< double > &values) |
QImage * | drawBars (const te::map::Chart *chart, const te::da::DataSet *dataset, std::size_t &width) |
QImage * | drawBars (const te::map::Chart *chart, const std::map< std::string, double > &chartValue, std::size_t &width) |
QImage * | drawPies (const te::map::Chart *chart, const te::da::DataSet *dataset, std::size_t &width) |
QImage * | drawPies (const te::map::Chart *chart, const std::map< std::string, double > &chartValue, std::size_t &width) |
double | getMaxValue (const std::vector< double > &values) |
void | getValues (const te::map::Chart *chart, const te::da::DataSet *dataset, std::vector< double > &values) |
void | getValues (const te::map::Chart *chart, const std::map< std::string, double > &chartValue, std::vector< double > &values) |
Internal methods of Qt4 Chart Renderer. | |
Methods that manipulate Qt4 concepts like QPainter, QImage, QBrush, QPen, QPainterPath, etc. | |
void | setup (QImage *img) |
Setups the internal QPainter and associates it with the given paint device (QImage). More... | |
void | end () |
Finalizes the internal QPainter resources. More... | |
Private Attributes | |
QBrush | m_brush |
The pen used to draw the chart. More... | |
QPainter | m_painter |
The painter used to draw the chart. More... | |
QPen | m_pen |
The pen used to draw the chart. More... | |
A concrete chart renderer based on Qt4.
Definition at line 53 of file ChartRenderer.h.
te::qt::widgets::ChartRenderer::ChartRenderer | ( | ) |
Default constructor.
te::qt::widgets::ChartRenderer::~ChartRenderer | ( | ) |
Destructor.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
Finalizes the internal QPainter resources.
|
protected |
|
protected |
|
protected |
|
virtual |
It generates the image pattern from the given chart and the current element of dataset.
chart | The chart informations that will be used. |
dataset | The dataset that will be used. |
width | An output parameter that will be filled with the width of generated image pattern. |
Implements te::map::AbstractChartRenderer.
|
virtual |
Implements te::map::AbstractChartRenderer.
|
protected |
Setups the internal QPainter and associates it with the given paint device (QImage).
|
private |
The pen used to draw the chart.
Definition at line 101 of file ChartRenderer.h.
|
private |
The painter used to draw the chart.
Definition at line 99 of file ChartRenderer.h.
|
private |
The pen used to draw the chart.
Definition at line 100 of file ChartRenderer.h.