te::qt::widgets::ChartLayerWidget Class Reference

A widget used to build a grouping. More...

#include <ChartLayerWidget.h>

Inheritance diagram for te::qt::widgets::ChartLayerWidget:
QWidget

Public Slots

double getMaxValue (te::map::Chart *chart)
 
void onAddToolButtonClicked ()
 Function used when the user clicked over the add tool button. More...
 
void onItemClicked (int row, int column)
 Function used when the user clicked over the table (color column). More...
 
void onRemoveToolButtonClicked ()
 Function used when the user clicked over the remove tool button. More...
 
void updateUi ()
 Updates the widget form based on internal fill element. More...
 

Public Member Functions

bool buildChart ()
 Creates the te::map::Chart object using the interface parameters. More...
 
void setChart (te::map::Chart *chart)
 Update the interface with the chart properties. More...
 
void setLayer (te::map::AbstractLayerPtr layer)
 Set a layer. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 ChartLayerWidget (QWidget *parent=0, Qt::WindowFlags f=0)
 Constructs a basic fill widget which is a child of parent, with widget flags set to f. More...
 
 ~ChartLayerWidget ()
 Destructor. More...
 

Protected Member Functions

void initialize ()
 Internal method to initialize the widget (e.g.: color, combos, icons, etc.) More...
 
void listAttributes ()
 List the layer attributes (from layer schema) More...
 

Private Attributes

std::vector< std::pair< std::string, QColor > > m_chartVec
 Chart Vec. More...
 
ColorPickerToolButtonm_colorPicker
 The color picker used to customise the color of several chart parameters. More...
 
te::map::AbstractLayerPtr m_layer
 TerraLib layer auto ptr. More...
 
std::unique_ptr< Ui::ChartLayerWidgetForm > m_ui
 Widget form. More...
 

Detailed Description

A widget used to build a grouping.

See also

Definition at line 64 of file ChartLayerWidget.h.

Constructor & Destructor Documentation

te::qt::widgets::ChartLayerWidget::ChartLayerWidget ( QWidget parent = 0,
Qt::WindowFlags  f = 0 
)

Constructs a basic fill widget which is a child of parent, with widget flags set to f.

Definition at line 52 of file ChartLayerWidget.cpp.

References initialize(), m_colorPicker, m_ui, onAddToolButtonClicked(), onItemClicked(), onRemoveToolButtonClicked(), and updateUi().

te::qt::widgets::ChartLayerWidget::~ChartLayerWidget ( )

Destructor.

Definition at line 77 of file ChartLayerWidget.cpp.

References m_chartVec.

Member Function Documentation

void te::qt::widgets::ChartLayerWidget::initialize ( )
protected

Internal method to initialize the widget (e.g.: color, combos, icons, etc.)

Definition at line 194 of file ChartLayerWidget.cpp.

References te::map::Bar, m_ui, and te::map::Pie.

Referenced by ChartLayerWidget().

void te::qt::widgets::ChartLayerWidget::listAttributes ( )
protected
void te::qt::widgets::ChartLayerWidget::onAddToolButtonClicked ( )
slot

Function used when the user clicked over the add tool button.

Note
This function adds a new attribute to be used in Chart object.

Definition at line 229 of file ChartLayerWidget.cpp.

References m_chartVec, m_ui, and updateUi().

Referenced by ChartLayerWidget().

void te::qt::widgets::ChartLayerWidget::onItemClicked ( int  row,
int  column 
)
slot

Function used when the user clicked over the table (color column).

Note
This function gives a new color to a selected attribute.

Definition at line 269 of file ChartLayerWidget.cpp.

References m_chartVec, and updateUi().

Referenced by ChartLayerWidget().

void te::qt::widgets::ChartLayerWidget::onRemoveToolButtonClicked ( )
slot

Function used when the user clicked over the remove tool button.

Note
This function removes a selected attribute used in Chart object.

Definition at line 259 of file ChartLayerWidget.cpp.

References m_chartVec, m_ui, and updateUi().

Referenced by ChartLayerWidget().

void te::qt::widgets::ChartLayerWidget::setLayer ( te::map::AbstractLayerPtr  layer)

Set a layer.

Definition at line 82 of file ChartLayerWidget.cpp.

References te::da::HasLinkedTable(), listAttributes(), m_layer, and m_ui.

Referenced by te::qt::widgets::ChartLayerDialog::setLayer().

void te::qt::widgets::ChartLayerWidget::updateUi ( )
slot

Member Data Documentation

std::vector<std::pair<std::string, QColor> > te::qt::widgets::ChartLayerWidget::m_chartVec
private
ColorPickerToolButton* te::qt::widgets::ChartLayerWidget::m_colorPicker
private

The color picker used to customise the color of several chart parameters.

Definition at line 143 of file ChartLayerWidget.h.

Referenced by buildChart(), ChartLayerWidget(), setChart(), and updateUi().

te::map::AbstractLayerPtr te::qt::widgets::ChartLayerWidget::m_layer
private

TerraLib layer auto ptr.

Definition at line 144 of file ChartLayerWidget.h.

Referenced by buildChart(), getMaxValue(), listAttributes(), and setLayer().

std::unique_ptr<Ui::ChartLayerWidgetForm> te::qt::widgets::ChartLayerWidget::m_ui
private

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