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... | |
~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 * | drawPies (const te::map::Chart *chart, const te::da::DataSet *dataset, 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) |
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.
Definition at line 38 of file ChartRenderer.cpp.
References m_brush, m_pen, and te::map::SolidLine.
te::qt::widgets::ChartRenderer::~ChartRenderer | ( | ) |
Destructor.
Definition at line 45 of file ChartRenderer.cpp.
|
protected |
Definition at line 204 of file ChartRenderer.cpp.
|
protected |
Definition at line 132 of file ChartRenderer.cpp.
References te::qt::widgets::Convert2Qt(), te::map::Chart::getBarWidth(), te::map::Chart::getColor(), te::map::Chart::getContourColor(), te::map::Chart::getContourWidth(), te::map::Chart::getHeight(), te::map::Chart::getMaxValue(), and te::map::Chart::getWidth().
|
protected |
Definition at line 86 of file ChartRenderer.cpp.
References te::qt::widgets::Convert2Qt(), te::map::Chart::getColor(), te::map::Chart::getContourColor(), te::map::Chart::getContourWidth(), te::map::Chart::getHeight(), and te::map::Chart::getWidth().
|
protected |
Finalizes the internal QPainter resources.
Definition at line 81 of file ChartRenderer.cpp.
|
protected |
Definition at line 214 of file ChartRenderer.cpp.
|
protected |
Definition at line 191 of file ChartRenderer.cpp.
References te::da::DataSet::getAsString(), and te::map::Chart::getProperties().
|
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.
Definition at line 49 of file ChartRenderer.cpp.
References te::map::Bar, te::qt::widgets::GetImage(), te::map::Chart::getType(), and te::map::Pie.
|
protected |
Setups the internal QPainter and associates it with the given paint device (QImage).
Definition at line 75 of file ChartRenderer.cpp.
|
private |
The pen used to draw the chart.
Definition at line 96 of file ChartRenderer.h.
Referenced by ChartRenderer().
|
private |
The painter used to draw the chart.
Definition at line 94 of file ChartRenderer.h.
|
private |
The pen used to draw the chart.
Definition at line 95 of file ChartRenderer.h.
Referenced by ChartRenderer().