te::map::Chart Class Reference

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...
 
bool getAvoidConflicts () const
 
std::size_t getBarWidth () const
 
const te::color::RGBAColorgetColor (std::size_t i) const
 
const te::color::RGBAColorgetContourColor () 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::RGBAColorm_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...
 

Detailed Description

This class represents the informations needed to build map charts.

See also
AbstractLayer

Definition at line 51 of file Chart.h.

Constructor & Destructor Documentation

Chart::Chart ( ChartType  type,
const std::vector< std::string > &  properties 
)

It constructs a new Chart instance.

Parameters
typeThe chart type.
propertiesThe property names that will be used to generate the chart.

Definition at line 35 of file Chart.cpp.

References m_colors, m_properties, and TE_OPAQUE.

Chart::Chart ( ChartType  type,
const std::vector< std::string > &  properties,
const std::vector< te::color::RGBAColor > &  colors 
)

It constructs a new Chart instance.

Parameters
typeThe chart type.
propertiesThe property names that will be used to generate the chart.
colorsThe colors that will be used to represent each property.

Definition at line 57 of file Chart.cpp.

Chart::~Chart ( )

Destructor.

Definition at line 74 of file Chart.cpp.

Member Function Documentation

bool Chart::getAvoidConflicts ( ) const
std::size_t Chart::getBarWidth ( ) const
double Chart::getMaxValue ( ) const
std::string Chart::getSummary ( ) const
bool Chart::isVisible ( ) const
void Chart::setAvoidConflicts ( bool  on)

Definition at line 187 of file Chart.cpp.

Referenced by te::qt::widgets::ChartLayerWidget::buildChart().

void Chart::setBarWidth ( std::size_t  width)

Definition at line 162 of file Chart.cpp.

void Chart::setColor ( std::size_t  i,
const te::color::RGBAColor color 
)

Definition at line 105 of file Chart.cpp.

void Chart::setContourColor ( const te::color::RGBAColor color)

Definition at line 117 of file Chart.cpp.

Referenced by te::qt::widgets::ChartLayerWidget::buildChart().

void Chart::setContourWidth ( std::size_t  width)

Definition at line 127 of file Chart.cpp.

Referenced by te::qt::widgets::ChartLayerWidget::buildChart().

void Chart::setHeight ( std::size_t  height)

Definition at line 137 of file Chart.cpp.

Referenced by te::qt::widgets::ChartLayerWidget::buildChart().

void Chart::setMaxValue ( double  value)

Definition at line 167 of file Chart.cpp.

Referenced by te::qt::widgets::ChartLayerWidget::buildChart().

void Chart::setPropertiesPos ( const std::vector< size_t > &  propPos)
void Chart::setSummary ( const std::string &  summary)

It gets the grouping summary. It is used only in case 1 to n.

Parameters
summaryThe summary mode. It can be: "MIN", "MAX", "SUM", "AVERAGE", "MEDIAN", "STDDEV" or "VARIANCE"

Definition at line 202 of file Chart.cpp.

Referenced by te::qt::widgets::ChartLayerWidget::buildChart().

void Chart::setVisibility ( bool  visible)

It sets the chart visibility.

Parameters
visibleThe visibility value.

Definition at line 182 of file Chart.cpp.

Member Data Documentation

bool te::map::Chart::m_avoidConflicts
private

A flag that indicates if conflicts must be avoided.

Definition at line 146 of file Chart.h.

std::size_t te::map::Chart::m_barWidth
private

The bar width for char Bar type (in pixels).

Definition at line 143 of file Chart.h.

std::vector<te::color::RGBAColor> te::map::Chart::m_colors
private

The color used to each property.

Definition at line 139 of file Chart.h.

Referenced by Chart().

te::color::RGBAColor te::map::Chart::m_contourColor
private

The chart contour color.

Definition at line 140 of file Chart.h.

std::size_t te::map::Chart::m_contourWidth
private

The chart contour width (in pixels).

Definition at line 141 of file Chart.h.

std::size_t te::map::Chart::m_height
private

The chart height (in pixels).

Definition at line 142 of file Chart.h.

bool te::map::Chart::m_isVisible
private

A flag that indicates if the chart is visible.

Definition at line 144 of file Chart.h.

double te::map::Chart::m_maxValue
private

The max value of the chart.

Definition at line 145 of file Chart.h.

std::vector<std::string> te::map::Chart::m_properties
private

The property names that will be used to generate the chart.

Definition at line 137 of file Chart.h.

Referenced by Chart().

std::vector<size_t> te::map::Chart::m_propertiesPos
private

The properties position.

Definition at line 138 of file Chart.h.

std::string te::map::Chart::m_summary
private

The summary used in case 1 to n.

Definition at line 147 of file Chart.h.

ChartType te::map::Chart::m_type
private

The chart type.

Definition at line 136 of file Chart.h.


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