This class represents the informations needed to build map charts. More...
#include <Chart.h>
Public Member Functions | |
| Chart (ChartType type, const std::vector< std::string > &properties) | |
| It constructs a new Chart instance. More... | |
| Chart (ChartType type, const std::vector< std::string > &properties, const std::vector< te::color::RGBAColor > &colors) | |
| It constructs a new Chart instance. More... | |
| Chart * | clone () |
| bool | getAvoidConflicts () const |
| std::size_t | getBarWidth () const |
| const te::color::RGBAColor & | getColor (std::size_t i) const |
| const te::color::RGBAColor & | getContourColor () const |
| std::size_t | getContourWidth () const |
| std::size_t | getHeight () const |
| double | getMaxValue () const |
| const std::vector< std::string > & | getProperties () const |
| const std::vector< size_t > & | getPropertiesPos () const |
| std::string | getSummary () const |
| It gets the grouping summary. It is used only in case 1 to n. More... | |
| ChartType | getType () const |
| std::size_t | getWidth () const |
| bool | isVisible () const |
| It gets the chart visibility. More... | |
| void | setAvoidConflicts (bool on) |
| void | setBarWidth (std::size_t width) |
| void | setColor (std::size_t i, const te::color::RGBAColor &color) |
| void | setContourColor (const te::color::RGBAColor &color) |
| void | setContourWidth (std::size_t width) |
| void | setHeight (std::size_t height) |
| void | setMaxValue (double value) |
| void | setPropertiesPos (const std::vector< size_t > &propPos) |
| void | setSummary (const std::string &summary) |
| It gets the grouping summary. It is used only in case 1 to n. More... | |
| void | setVisibility (bool visible) |
| It sets the chart visibility. More... | |
| ~Chart () | |
| Destructor. More... | |
Private Attributes | |
| bool | m_avoidConflicts |
| A flag that indicates if conflicts must be avoided. More... | |
| std::size_t | m_barWidth |
| The bar width for char Bar type (in pixels). More... | |
| std::vector< te::color::RGBAColor > | m_colors |
| The color used to each property. More... | |
| te::color::RGBAColor | m_contourColor |
| The chart contour color. More... | |
| std::size_t | m_contourWidth |
| The chart contour width (in pixels). More... | |
| std::size_t | m_height |
| The chart height (in pixels). More... | |
| bool | m_isVisible |
| A flag that indicates if the chart is visible. More... | |
| double | m_maxValue |
| The max value of the chart. More... | |
| std::vector< std::string > | m_properties |
| The property names that will be used to generate the chart. More... | |
| std::vector< size_t > | m_propertiesPos |
| The properties position. More... | |
| std::string | m_summary |
| The summary used in case 1 to n. More... | |
| ChartType | m_type |
| The chart type. More... | |
This class represents the informations needed to build map charts.
| Chart::Chart | ( | ChartType | type, |
| const std::vector< std::string > & | properties | ||
| ) |
| Chart::Chart | ( | ChartType | type, |
| const std::vector< std::string > & | properties, | ||
| const std::vector< te::color::RGBAColor > & | colors | ||
| ) |
|
default |
Destructor.
Referenced by Chart().
| te::map::Chart * Chart::clone | ( | ) |
Definition at line 76 of file Chart.cpp.
References Chart(), m_avoidConflicts, m_barWidth, m_colors, m_contourColor, m_contourWidth, m_height, m_isVisible, m_maxValue, m_properties, m_propertiesPos, m_summary, m_type, setAvoidConflicts(), setBarWidth(), setContourColor(), setContourWidth(), setHeight(), setMaxValue(), setPropertiesPos(), setSummary(), and setVisibility().
Referenced by te::map::CopyAbstractLayerInfo().
| bool Chart::getAvoidConflicts | ( | ) | const |
Definition at line 206 of file Chart.cpp.
References m_avoidConflicts.
Referenced by te::map::QueryLayerRenderer::buildChart(), te::map::AbstractLayerRenderer::buildChart(), and te::qt::widgets::ChartLayerWidget::setChart().
| std::size_t Chart::getBarWidth | ( | ) | const |
Definition at line 171 of file Chart.cpp.
References m_barWidth.
Referenced by te::qt::widgets::ChartRenderer::drawBars(), and te::map::serialize::WriteLayerChart().
| const te::color::RGBAColor & Chart::getColor | ( | std::size_t | i | ) | const |
Definition at line 112 of file Chart.cpp.
References m_colors.
Referenced by AddSliceItems(), te::qt::widgets::ChartRenderer::drawBars(), te::qt::widgets::ChartRenderer::drawPies(), te::qt::widgets::ChartLayerWidget::setChart(), and te::map::serialize::WriteLayerChart().
| const te::color::RGBAColor & Chart::getContourColor | ( | ) | const |
Definition at line 126 of file Chart.cpp.
References m_contourColor.
Referenced by AddSliceItems(), te::qt::widgets::ChartRenderer::drawBars(), te::qt::widgets::ChartRenderer::drawPies(), te::qt::widgets::ChartLayerWidget::setChart(), and te::map::serialize::WriteLayerChart().
| std::size_t Chart::getContourWidth | ( | ) | const |
Definition at line 136 of file Chart.cpp.
References m_contourWidth.
Referenced by AddSliceItems(), te::qt::widgets::ChartRenderer::drawBars(), te::qt::widgets::ChartRenderer::drawPies(), te::qt::widgets::ChartLayerWidget::setChart(), and te::map::serialize::WriteLayerChart().
| std::size_t Chart::getHeight | ( | ) | const |
Definition at line 146 of file Chart.cpp.
References m_height.
Referenced by te::map::QueryLayerRenderer::buildChart(), te::map::AbstractLayerRenderer::buildChart(), te::qt::widgets::ChartRenderer::drawBars(), te::map::QueryLayerRenderer::drawDatSetGeometries(), te::map::AbstractLayerRenderer::drawDatSetGeometries(), te::map::QueryLayerRenderer::drawLayerGroupingMem(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::qt::widgets::ChartRenderer::drawPies(), te::qt::widgets::ChartLayerWidget::setChart(), and te::map::serialize::WriteLayerChart().
| double Chart::getMaxValue | ( | ) | const |
Definition at line 186 of file Chart.cpp.
References m_maxValue.
Referenced by te::qt::widgets::ChartRenderer::drawBars(), and te::map::serialize::WriteLayerChart().
| const std::vector< std::string > & Chart::getProperties | ( | ) | const |
Definition at line 97 of file Chart.cpp.
References m_properties.
Referenced by AddSliceItems(), te::map::QueryLayerRenderer::drawDatSetGeometries(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::qt::widgets::ChartLayerWidget::getMaxValue(), te::qt::widgets::ChartRenderer::getValues(), te::qt::widgets::ChartLayerWidget::setChart(), and te::map::serialize::WriteLayerChart().
| const std::vector< size_t > & Chart::getPropertiesPos | ( | ) | const |
Definition at line 102 of file Chart.cpp.
References m_propertiesPos.
Referenced by te::map::QueryLayerRenderer::drawDatSetGeometries(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::qt::widgets::ChartLayerWidget::getMaxValue(), and te::qt::widgets::ChartRenderer::getValues().
| std::string Chart::getSummary | ( | ) | const |
It gets the grouping summary. It is used only in case 1 to n.
Definition at line 211 of file Chart.cpp.
References m_summary.
Referenced by te::map::QueryLayerRenderer::drawDatSetGeometries(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::qt::widgets::ChartLayerWidget::getMaxValue(), and te::map::serialize::WriteLayerChart().
| te::map::ChartType Chart::getType | ( | ) | const |
Definition at line 92 of file Chart.cpp.
References m_type.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), te::qt::widgets::ChartItem::ChartItem(), te::qt::widgets::ChartRenderer::render(), te::qt::widgets::ChartLayerWidget::setChart(), and te::map::serialize::WriteLayerChart().
| std::size_t Chart::getWidth | ( | ) | const |
Definition at line 156 of file Chart.cpp.
References te::map::Bar, m_barWidth, m_height, m_properties, m_type, and te::map::Pie.
Referenced by te::map::QueryLayerRenderer::buildChart(), te::map::AbstractLayerRenderer::buildChart(), te::qt::widgets::ChartRenderer::drawBars(), te::map::QueryLayerRenderer::drawDatSetGeometries(), te::map::AbstractLayerRenderer::drawDatSetGeometries(), te::map::QueryLayerRenderer::drawLayerGroupingMem(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), and te::qt::widgets::ChartRenderer::drawPies().
| bool Chart::isVisible | ( | ) | const |
It gets the chart visibility.
Definition at line 191 of file Chart.cpp.
References m_isVisible.
Referenced by te::map::QueryLayerRenderer::buildChart(), te::map::AbstractLayerRenderer::buildChart(), te::qt::widgets::ChartItem::isVisible(), and te::map::serialize::WriteLayerChart().
| void Chart::setAvoidConflicts | ( | bool | on | ) |
Definition at line 201 of file Chart.cpp.
References m_avoidConflicts.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), and clone().
| void Chart::setBarWidth | ( | std::size_t | width | ) |
| void Chart::setColor | ( | std::size_t | i, |
| const te::color::RGBAColor & | color | ||
| ) |
| void Chart::setContourColor | ( | const te::color::RGBAColor & | color | ) |
Definition at line 131 of file Chart.cpp.
References m_contourColor.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), and clone().
| void Chart::setContourWidth | ( | std::size_t | width | ) |
Definition at line 141 of file Chart.cpp.
References m_contourWidth.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), and clone().
| void Chart::setHeight | ( | std::size_t | height | ) |
Definition at line 151 of file Chart.cpp.
References m_height.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), and clone().
| void Chart::setMaxValue | ( | double | value | ) |
Definition at line 181 of file Chart.cpp.
References m_maxValue.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), and clone().
| void Chart::setPropertiesPos | ( | const std::vector< size_t > & | propPos | ) |
Definition at line 107 of file Chart.cpp.
References m_propertiesPos.
Referenced by clone(), te::map::QueryLayerRenderer::drawDatSetGeometries(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), and te::qt::widgets::ChartLayerWidget::getMaxValue().
| void Chart::setSummary | ( | const std::string & | summary | ) |
It gets the grouping summary. It is used only in case 1 to n.
| summary | The summary mode. It can be: "MIN", "MAX", "SUM", "AVERAGE", "MEDIAN", "STDDEV" or "VARIANCE" |
Definition at line 216 of file Chart.cpp.
References m_summary.
Referenced by te::qt::widgets::ChartLayerWidget::buildChart(), and clone().
| void Chart::setVisibility | ( | bool | visible | ) |
It sets the chart visibility.
| visible | The visibility value. |
Definition at line 196 of file Chart.cpp.
References m_isVisible.
Referenced by clone(), and te::qt::widgets::ChartItem::setVisible().
|
private |
A flag that indicates if conflicts must be avoided.
Definition at line 148 of file Chart.h.
Referenced by clone(), getAvoidConflicts(), and setAvoidConflicts().
|
private |
The bar width for char Bar type (in pixels).
Definition at line 145 of file Chart.h.
Referenced by clone(), getBarWidth(), getWidth(), and setBarWidth().
|
private |
The color used to each property.
Definition at line 141 of file Chart.h.
Referenced by Chart(), clone(), getColor(), and setColor().
|
private |
The chart contour color.
Definition at line 142 of file Chart.h.
Referenced by clone(), getContourColor(), and setContourColor().
|
private |
The chart contour width (in pixels).
Definition at line 143 of file Chart.h.
Referenced by clone(), getContourWidth(), and setContourWidth().
|
private |
The chart height (in pixels).
Definition at line 144 of file Chart.h.
Referenced by clone(), getHeight(), getWidth(), and setHeight().
|
private |
A flag that indicates if the chart is visible.
Definition at line 146 of file Chart.h.
Referenced by clone(), isVisible(), and setVisibility().
|
private |
The max value of the chart.
Definition at line 147 of file Chart.h.
Referenced by clone(), getMaxValue(), and setMaxValue().
|
private |
The property names that will be used to generate the chart.
Definition at line 139 of file Chart.h.
Referenced by Chart(), clone(), getProperties(), and getWidth().
|
private |
The properties position.
Definition at line 140 of file Chart.h.
Referenced by clone(), getPropertiesPos(), and setPropertiesPos().
|
private |
The summary used in case 1 to n.
Definition at line 149 of file Chart.h.
Referenced by clone(), getSummary(), and setSummary().
|
private |
The chart type.
Definition at line 138 of file Chart.h.
Referenced by clone(), getType(), and getWidth().