A widget used to build a grouping. More...
#include <GroupingWidget.h>
Public Slots | |
| void | onApplyPushButtonClicked () |
| void | onAttrComboBoxActivated (int idx) |
| void | onColorBarChanged () |
| void | onImportPushButtonClicked () |
| void | onLoadPushButtonClicked () |
| void | onSavePushButtonClicked () |
| void | onTableWidgetItemChanged (QTableWidgetItem *item) |
| void | onTableWidgetItemDoubleClicked (QTableWidgetItem *item) |
| void | onTypeComboBoxActivated (int idx) |
Signals | |
| void | applyPushButtonClicked () |
Public Member Functions | |
| std::unique_ptr< te::map::Grouping > | getGrouping () |
| void | setLayers (te::map::AbstractLayerPtr selectedLayer, std::vector< te::map::AbstractLayerPtr > allLayers) |
| void | updateStyle () |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| GroupingWidget (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... | |
| ~GroupingWidget () | |
| Destructor. More... | |
Protected Member Functions | |
| void | buildSymbolizer (std::string meanTitle="") |
| void | createDoubleNullGroupingItem (int count) |
| void | createStringNullGroupingItem (int count) |
| void | getDataAsDouble (std::vector< double > &vec, const std::string &attrName, const int &dataType, int &nullValues) |
| void | getDataAsString (std::vector< std::string > &vec, const std::string &attrName, int &nullValues) |
| int | getGeometryType () |
| void | getLinkedDataAsDouble (std::vector< double > &vec, const std::string &attrName, const int &dataType, int &nullValues) |
| void | getLinkedDataAsString (std::vector< std::string > &vec, const std::string &attrName, int &nullValues) |
| void | initialize () |
| Internal method to initialize the widget (e.g.: color, combos, icons, etc.) More... | |
| void | listAttributes () |
| void | saveLegend (const std::string &path) |
| void | setDataSetType () |
| void | setGrouping () |
| void | setGrouping (te::map::Grouping *grouping, te::se::Style *style) |
| void | updateUi (bool loadColorBar=false) |
| Updates the widget form based on internal fill element. More... | |
Private Attributes | |
| te::color::ColorBar * | m_cb |
| Terralib color bar objetc. More... | |
| te::qt::widgets::ColorCatalogWidget * | m_colorBar |
| Widget used to pick a color. More... | |
| te::map::AbstractLayerPtr | m_layer |
| TerraLib layer auto ptr. More... | |
| bool | m_manual |
| std::vector< te::se::Rule * > | m_rules |
| Grouping items. More... | |
| te::se::Style * | m_style |
| Current style from input layer. More... | |
| std::unique_ptr< Ui::GroupingWidgetForm > | m_ui |
| Widget form. More... | |
| te::qt::widgets::GroupingWidget::GroupingWidget | ( | 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 102 of file GroupingWidget.cpp.
References initialize(), m_colorBar, m_ui, onApplyPushButtonClicked(), onAttrComboBoxActivated(), onColorBarChanged(), onImportPushButtonClicked(), onLoadPushButtonClicked(), onSavePushButtonClicked(), onTableWidgetItemDoubleClicked(), and onTypeComboBoxActivated().
| te::qt::widgets::GroupingWidget::~GroupingWidget | ( | ) |
Destructor.
Definition at line 128 of file GroupingWidget.cpp.
References te::common::FreeContents(), m_cb, and m_rules.
|
signal |
Referenced by onApplyPushButtonClicked(), onImportPushButtonClicked(), onTableWidgetItemDoubleClicked(), and setGrouping().
|
protected |
Definition at line 1216 of file GroupingWidget.cpp.
References te::se::CreateSymbolizer(), te::qt::widgets::ColorCatalogWidget::getColorBar(), te::qt::widgets::colorbar::ColorBar::getColorBar(), getGeometryType(), te::color::ColorBar::getLowerMeanSlices(), te::color::ColorBar::getMeanSlice(), te::color::ColorBar::getSlices(), te::color::ColorBar::getUpperMeanSlices(), m_cb, m_colorBar, and m_rules.
Referenced by onApplyPushButtonClicked(), and onColorBarChanged().
|
protected |
Definition at line 1165 of file GroupingWidget.cpp.
References te::fe::CreateFilterByStep(), te::se::CreateSymbolizer(), getGeometryType(), m_rules, m_ui, NO_TITLE, te::se::Rule::setFilter(), te::se::Rule::setName(), te::se::Rule::setSymbolizers(), and te::common::Globals::sm_nanStr.
Referenced by onApplyPushButtonClicked().
|
protected |
Definition at line 1187 of file GroupingWidget.cpp.
References te::fe::CreateFilterByUniqueValue(), te::se::CreateSymbolizer(), getGeometryType(), m_rules, m_ui, NO_TITLE, te::se::Rule::setFilter(), te::se::Rule::setName(), te::se::Rule::setSymbolizers(), and te::common::Globals::sm_nanStr.
Referenced by onApplyPushButtonClicked().
|
protected |
Definition at line 796 of file GroupingWidget.cpp.
References te::dt::DOUBLE_TYPE, ds, te::dt::FLOAT_TYPE, getLinkedDataAsDouble(), te::da::HasLinkedTable(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, m_layer, m_ui, and te::dt::NUMERIC_TYPE.
Referenced by onApplyPushButtonClicked().
|
protected |
Definition at line 1014 of file GroupingWidget.cpp.
References ds, getLinkedDataAsString(), te::da::HasLinkedTable(), m_layer, and m_ui.
Referenced by onApplyPushButtonClicked().
|
protected |
Definition at line 1209 of file GroupingWidget.cpp.
References te::map::GetGeomType(), and m_layer.
Referenced by buildSymbolizer(), createDoubleNullGroupingItem(), and createStringNullGroupingItem().
| std::unique_ptr< te::map::Grouping > te::qt::widgets::GroupingWidget::getGrouping | ( | ) |
Definition at line 136 of file GroupingWidget.cpp.
References m_ui.
Referenced by te::qt::widgets::GroupingDialog::onPushButtonClicked().
|
protected |
Definition at line 855 of file GroupingWidget.cpp.
References te::da::Select::clone(), te::dt::DOUBLE_TYPE, ds, te::dt::FLOAT_TYPE, te::map::QueryLayer::getQuery(), te::da::GetSummarizedValue(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, m_layer, m_ui, te::dt::NUMERIC_TYPE, te::da::Select::setOrderBy(), and te::map::QueryLayer::setQuery().
Referenced by getDataAsDouble().
|
protected |
Definition at line 1050 of file GroupingWidget.cpp.
References te::da::Select::clone(), ds, te::map::QueryLayer::getQuery(), te::da::GetSummarizedValue(), m_layer, m_ui, te::da::Select::setOrderBy(), and te::map::QueryLayer::setQuery().
Referenced by getDataAsString().
|
protected |
Internal method to initialize the widget (e.g.: color, combos, icons, etc.)
Definition at line 217 of file GroupingWidget.cpp.
References te::map::EQUAL_STEPS, te::qt::widgets::ColorCatalogWidget::getColorBar(), m_colorBar, m_manual, m_ui, MAX_SLICES, onTypeComboBoxActivated(), PRECISION, te::map::QUANTIL, te::qt::widgets::colorbar::ColorBar::setHeight(), te::qt::widgets::colorbar::ColorBar::setScaleVisible(), te::map::STD_DEVIATION, and te::map::UNIQUE_VALUE.
Referenced by GroupingWidget().
|
protected |
Definition at line 1279 of file GroupingWidget.cpp.
References te::dt::DOUBLE_TYPE, te::map::EQUAL_STEPS, te::dt::FLOAT_TYPE, te::dt::Property::getName(), te::dt::Property::getType(), te::dt::INT16_TYPE, te::dt::INT32_TYPE, te::dt::INT64_TYPE, m_layer, m_ui, te::dt::NUMERIC_TYPE, p, te::map::QUANTIL, te::map::STD_DEVIATION, te::dt::STRING_TYPE, and te::map::UNIQUE_VALUE.
Referenced by onTypeComboBoxActivated(), and setDataSetType().
|
slot |
Definition at line 501 of file GroupingWidget.cpp.
References applyPushButtonClicked(), buildSymbolizer(), createDoubleNullGroupingItem(), createStringNullGroupingItem(), te::map::EQUAL_STEPS, te::common::FreeContents(), getDataAsDouble(), getDataAsString(), te::map::GroupingByEqualSteps(), te::map::GroupingByQuantil(), te::map::GroupingByStdDeviation(), te::map::GroupingByUniqueValues(), m_manual, m_rules, m_ui, te::map::QUANTIL, te::map::STD_DEVIATION, te::map::UNIQUE_VALUE, and updateUi().
Referenced by GroupingWidget().
|
slot |
Definition at line 634 of file GroupingWidget.cpp.
Referenced by GroupingWidget().
|
slot |
Definition at line 639 of file GroupingWidget.cpp.
References buildSymbolizer(), m_layer, and updateUi().
Referenced by GroupingWidget(), and updateUi().
|
slot |
Definition at line 1403 of file GroupingWidget.cpp.
References applyPushButtonClicked(), te::common::Convert2UCase(), dt, te::dt::Property::getName(), te::dt::Property::getType(), m_layer, m_manual, m_ui, setGrouping(), and updateUi().
Referenced by GroupingWidget().
|
slot |
Definition at line 1458 of file GroupingWidget.cpp.
References te::qt::widgets::ColorCatalogWidget::loadDefaultColorCatalog(), m_colorBar, m_ui, p, te::qt::widgets::ColorCatalogWidget::setCatalog(), te::qt::widgets::ColorCatalogWidget::setGroup(), and te::qt::widgets::ColorCatalogWidget::setSchema().
Referenced by GroupingWidget().
|
slot |
Definition at line 1555 of file GroupingWidget.cpp.
References saveLegend().
Referenced by GroupingWidget().
|
slot |
Definition at line 649 of file GroupingWidget.cpp.
References te::fe::CreateFilterByStep(), te::map::EQUAL_STEPS, te::fe::GetFilterStepValues(), m_manual, m_rules, m_ui, te::map::QUANTIL, and te::map::STD_DEVIATION.
Referenced by updateUi().
|
slot |
Definition at line 708 of file GroupingWidget.cpp.
References applyPushButtonClicked(), te::qt::widgets::SymbologyPreview::build(), te::qt::widgets::PointSymbolizerWidget::getSymbolizer(), te::qt::widgets::LineSymbolizerWidget::getSymbolizer(), te::qt::widgets::PolygonSymbolizerWidget::getSymbolizer(), te::se::Rule::getSymbolizers(), m_rules, m_ui, te::qt::widgets::PointSymbolizerWidget::setSymbolizer(), te::qt::widgets::LineSymbolizerWidget::setSymbolizer(), te::qt::widgets::PolygonSymbolizerWidget::setSymbolizer(), te::se::Rule::setSymbolizers(), and updateUi().
Referenced by GroupingWidget().
|
slot |
Definition at line 601 of file GroupingWidget.cpp.
References te::map::EQUAL_STEPS, listAttributes(), m_layer, m_ui, te::map::QUANTIL, te::map::STD_DEVIATION, and te::map::UNIQUE_VALUE.
Referenced by GroupingWidget(), initialize(), and setGrouping().
|
protected |
Definition at line 1563 of file GroupingWidget.cpp.
References te::color::RGBAColor::getBlue(), te::qt::widgets::ColorCatalogWidget::getCatalog(), te::se::Fill::getColor(), te::se::GetColor(), te::se::PolygonSymbolizer::getFill(), te::color::RGBAColor::getGreen(), te::qt::widgets::ColorCatalogWidget::getGroup(), te::color::RGBAColor::getRed(), te::qt::widgets::ColorCatalogWidget::getSchema(), te::se::Rule::getSymbolizers(), m_colorBar, m_rules, and m_ui.
Referenced by onSavePushButtonClicked().
|
protected |
Definition at line 420 of file GroupingWidget.cpp.
References listAttributes().
Referenced by setLayers().
|
protected |
Definition at line 425 of file GroupingWidget.cpp.
References applyPushButtonClicked(), and m_layer.
Referenced by onImportPushButtonClicked(), and setLayers().
|
protected |
Definition at line 440 of file GroupingWidget.cpp.
References te::se::Rule::clone(), te::common::FreeContents(), te::map::Grouping::getNumSlices(), te::map::Grouping::getPrecision(), te::map::Grouping::getPropertyName(), te::se::Style::getRule(), te::se::Style::getRules(), te::map::Grouping::getStdDeviation(), te::map::Grouping::getType(), m_rules, m_ui, onTypeComboBoxActivated(), and updateUi().
| void te::qt::widgets::GroupingWidget::setLayers | ( | te::map::AbstractLayerPtr | selectedLayer, |
| std::vector< te::map::AbstractLayerPtr > | allLayers | ||
| ) |
Definition at line 1348 of file GroupingWidget.cpp.
References dt, te::da::HasLinkedTable(), m_layer, m_ui, setDataSetType(), and setGrouping().
Referenced by te::qt::widgets::GroupingDialog::buildVectorialGroupingInteface().
| void te::qt::widgets::GroupingWidget::updateStyle | ( | ) |
Definition at line 172 of file GroupingWidget.cpp.
References ds, te::da::GetDataSource(), m_layer, m_rules, m_ui, te::se::Rule::setDescription(), and te::se::Description::setTitle().
Referenced by te::qt::widgets::GroupingDialog::onPushButtonClicked().
|
protected |
Updates the widget form based on internal fill element.
Definition at line 259 of file GroupingWidget.cpp.
References te::color::ColorBar::addColor(), te::qt::widgets::SymbologyPreview::build(), te::map::EQUAL_STEPS, te::se::SymbolizerColorFinder::find(), te::se::SymbolizerColorFinder::getColor(), te::qt::widgets::ColorCatalogWidget::getColorBar(), te::se::Rule::getFilter(), te::fe::GetFilterStepValues(), te::fe::GetFilterUniqueValue(), te::se::Rule::getName(), te::se::Rule::getSymbolizers(), m_colorBar, m_rules, m_ui, NO_TITLE, onColorBarChanged(), onTableWidgetItemChanged(), te::map::QUANTIL, te::qt::widgets::colorbar::ColorBar::setColorBar(), te::map::STD_DEVIATION, and te::map::UNIQUE_VALUE.
Referenced by onApplyPushButtonClicked(), onColorBarChanged(), onImportPushButtonClicked(), onTableWidgetItemDoubleClicked(), and setGrouping().
|
private |
Terralib color bar objetc.
Definition at line 164 of file GroupingWidget.h.
Referenced by buildSymbolizer(), and ~GroupingWidget().
|
private |
Widget used to pick a color.
Definition at line 166 of file GroupingWidget.h.
Referenced by buildSymbolizer(), GroupingWidget(), initialize(), onLoadPushButtonClicked(), saveLegend(), and updateUi().
|
private |
TerraLib layer auto ptr.
Definition at line 165 of file GroupingWidget.h.
Referenced by getDataAsDouble(), getDataAsString(), getGeometryType(), getLinkedDataAsDouble(), getLinkedDataAsString(), listAttributes(), onColorBarChanged(), onImportPushButtonClicked(), onTypeComboBoxActivated(), setGrouping(), setLayers(), and updateStyle().
|
private |
Definition at line 170 of file GroupingWidget.h.
Referenced by initialize(), onApplyPushButtonClicked(), onImportPushButtonClicked(), and onTableWidgetItemChanged().
|
private |
Grouping items.
Definition at line 167 of file GroupingWidget.h.
Referenced by buildSymbolizer(), createDoubleNullGroupingItem(), createStringNullGroupingItem(), onApplyPushButtonClicked(), onTableWidgetItemChanged(), onTableWidgetItemDoubleClicked(), saveLegend(), setGrouping(), updateStyle(), updateUi(), and ~GroupingWidget().
|
private |
Current style from input layer.
Definition at line 168 of file GroupingWidget.h.
|
private |
Widget form.
Definition at line 162 of file GroupingWidget.h.
Referenced by createDoubleNullGroupingItem(), createStringNullGroupingItem(), getDataAsDouble(), getDataAsString(), getGrouping(), getLinkedDataAsDouble(), getLinkedDataAsString(), GroupingWidget(), initialize(), listAttributes(), onApplyPushButtonClicked(), onImportPushButtonClicked(), onLoadPushButtonClicked(), onTableWidgetItemChanged(), onTableWidgetItemDoubleClicked(), onTypeComboBoxActivated(), saveLegend(), setGrouping(), setLayers(), updateStyle(), and updateUi().