A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering. More...
#include <Rule.h>
Public Member Functions | |
| Rule * | clone () const |
| It creates a new copy of this object. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
| Rule () | |
| It initializes a new Rule. More... | |
| ~Rule () | |
| Destructor. More... | |
Accessor methods | |
Methods used to get or set properties. | |
| void | setName (std::string *name) |
| const std::string * | getName () const |
| void | setDescription (Description *d) |
| const Description * | getDescription () const |
| void | setLegendGraphic (Graphic *legendGraphic) |
| const Graphic * | getLegendGraphic () const |
| void | removeLegendGraphic () |
| void | setFilter (te::fe::Filter *f) |
| const te::fe::Filter * | getFilter () const |
| void | enableElseFilter () |
| void | disableElseFilter () |
| bool | hasElseFilter () const |
| void | setMinScaleDenominator (const double &minScaleDenominator) |
| const double & | getMinScaleDenominator () const |
| void | setMaxScaleDenominator (const double &maxScaleDenominator) |
| const double & | getMaxScaleDenominator () const |
| void | push_back (Symbolizer *s) |
| void | setSymbolizer (std::size_t i, Symbolizer *s) |
| void | setSymbolizers (const std::vector< Symbolizer * > &symbs) |
| const std::vector< Symbolizer * > & | getSymbolizers () const |
| const Symbolizer * | getSymbolizer (std::size_t i) const |
| void | removeSymbolizer (std::size_t i) |
| void | clearSymbolizers () |
Private Attributes | |
| Description * | m_description |
| It gives the familiar short title for display lists and longer description for the rule. (Optional) More... | |
| bool | m_elseFilter |
| It allows rules to be specified that are activated for features that are not selected by any other rule in a feature-type style. Default: false. If true, this is a Else filter rule. (Optional) More... | |
| te::fe::Filter * | m_filter |
| It allows the selection of features in rules to be controlled by attribute conditions. (Optional) More... | |
| Graphic * | m_legendGraphic |
| It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional) More... | |
| double | m_maxScaleDenominator |
| It defines the range of map-rendering scales for which the rule should be applied. Default: TE_DOUBLE_INFINITY. (Optional) More... | |
| double | m_minScaleDenominator |
| It defines the range of map-rendering scales for which the rule should be applied. Default: 0.0. (Optional) More... | |
| std::string * | m_name |
| It allows the rule to be referenced externally, which is needed in some methods of SE usage. (Optional) More... | |
| std::vector< Symbolizer * > | m_symbolizers |
| A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory) More... | |
A Rule is used to attach property/scale conditions to and group the individual symbols used for rendering.
Rules are used to group rendering instructions by feature-property conditions and map scales. Rule definitions are placed immediately inside of featuretype- or coverage-style definitions. If a rule has no Filter element, the interpretation is that the rule condition is always true, i.e., all features are accepted and styled by the rule. The ElseFilter has a more complicated interpretation than the Filter element, and is interpreted as follows. The nominal scale of the map to be portrayed is computed (as described in the previous subclause) and all rules for scale ranges that do not include the computed nominal scale are discarded from further processing. Then, the specific condition for the ElseFilter is computed by "or-ing" together all of the other filter conditions and take the global "not" of that condition.
| te::se::Rule::Rule | ( | ) |
| te::se::Rule::~Rule | ( | ) |
Destructor.
Definition at line 49 of file Rule.cpp.
References te::common::FreeContents(), m_description, m_filter, m_legendGraphic, m_name, and m_symbolizers.
| void te::se::Rule::clearSymbolizers | ( | ) |
Definition at line 178 of file Rule.cpp.
References te::common::FreeContents(), and m_symbolizers.
Referenced by setSymbolizers().
| te::se::Rule * te::se::Rule::clone | ( | ) | const |
It creates a new copy of this object.
Definition at line 184 of file Rule.cpp.
References te::se::Description::clone(), te::fe::Filter::clone(), te::se::Graphic::clone(), disableElseFilter(), enableElseFilter(), getMaxScaleDenominator(), getMinScaleDenominator(), m_description, m_elseFilter, m_filter, m_legendGraphic, m_name, m_symbolizers, Rule(), setDescription(), setFilter(), setLegendGraphic(), setMaxScaleDenominator(), setMinScaleDenominator(), and setName().
Referenced by te::qt::widgets::GroupingWidget::setGrouping().
| void te::se::Rule::disableElseFilter | ( | ) |
| void te::se::Rule::enableElseFilter | ( | ) |
Definition at line 102 of file Rule.cpp.
References m_elseFilter, and m_filter.
Referenced by clone().
| const te::se::Description * te::se::Rule::getDescription | ( | ) | const |
Definition at line 75 of file Rule.cpp.
References m_description.
Referenced by te::qt::widgets::RuleItem::getToolTip(), te::qt::widgets::LegendItem::LegendItem(), and te::se::serialize::Save().
| const te::fe::Filter * te::se::Rule::getFilter | ( | ) | const |
Definition at line 97 of file Rule.cpp.
References m_filter.
Referenced by te::map::DrawGeometries(), te::map::QueryLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGrouping(), te::map::QueryLayerRenderer::drawLayerGroupingMem(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::se::serialize::Save(), te::qt::widgets::RasterizationWizardPage::updateUi(), te::qt::widgets::GroupingWidget::updateUi(), and te::qt::plugins::tv::TimeViewerEditLegendDialog::updateUi().
| const te::se::Graphic * te::se::Rule::getLegendGraphic | ( | ) | const |
Definition at line 86 of file Rule.cpp.
References m_legendGraphic.
Referenced by te::se::serialize::Save().
| const double & te::se::Rule::getMaxScaleDenominator | ( | ) | const |
Definition at line 133 of file Rule.cpp.
References m_maxScaleDenominator.
Referenced by clone(), te::map::AbstractLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::DrawRaster(), te::qt::widgets::RuleItem::isVisible(), te::se::serialize::Save(), and te::qt::widgets::RuleProperty::setRule().
| const double & te::se::Rule::getMinScaleDenominator | ( | ) | const |
Definition at line 123 of file Rule.cpp.
References m_minScaleDenominator.
Referenced by clone(), te::map::AbstractLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::DrawRaster(), te::se::serialize::Save(), and te::qt::widgets::RuleProperty::setRule().
| const std::string * te::se::Rule::getName | ( | ) | const |
Definition at line 64 of file Rule.cpp.
References m_name.
Referenced by te::qt::widgets::LegendItem::LegendItem(), te::qt::widgets::RuleItem::RuleItem(), te::se::serialize::Save(), te::qt::widgets::StyleExplorer::updateStyleTree(), te::qt::widgets::GroupingWidget::updateUi(), and te::qt::plugins::tv::TimeViewerEditLegendDialog::updateUi().
| const te::se::Symbolizer * te::se::Rule::getSymbolizer | ( | std::size_t | i | ) | const |
Definition at line 163 of file Rule.cpp.
References m_symbolizers.
Referenced by te::qt::widgets::ChartConfigurer::config(), te::qt::widgets::StyleControllerWidget::onAddSymbolizerClicked(), te::qt::widgets::StyleControllerWidget::onRemoveSymbolizerClicked(), te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), and te::qt::widgets::StyleExplorer::swapSymbolizers().
| const std::vector< te::se::Symbolizer * > & te::se::Rule::getSymbolizers | ( | ) | const |
Definition at line 158 of file Rule.cpp.
References m_symbolizers.
Referenced by te::qt::widgets::SymbologyPreview::build(), te::qt::widgets::ChartConfigurer::config(), te::graph::LayerRenderer::draw(), te::qt::af::MapDisplay::drawDataSet(), te::map::DrawGeometries(), te::map::QueryLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGrouping(), te::map::QueryLayerRenderer::drawLayerGroupingMem(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::wms::WMSLayerRenderer::drawRaster(), te::map::DrawRaster(), te::qt::widgets::ContrastDialogForm::getChannelSelection(), te::qt::widgets::FilterDialogForm::getChannelSelection(), te::qt::widgets::RasterNavigatorWidget::getCompositionInfo(), GetIcon(), te::map::GetRaster(), te::se::GetRasterSymbolizer(), GetRuleIcon(), te::qt::widgets::StyleExplorer::getSymbolizer(), te::qt::widgets::StyleExplorer::goDownSymbolizer(), te::qt::widgets::ReadPixelTool::mouseReleaseEvent(), te::qt::widgets::StyleControllerWidget::onAddSymbolizerClicked(), te::qt::widgets::StyleControllerWidget::onRemoveSymbolizerClicked(), te::qt::widgets::StyleExplorer::onSymbolizerChanged(), te::qt::widgets::RasterizationWizardPage::onTableWidgetItemDoubleClicked(), te::qt::widgets::GroupingWidget::onTableWidgetItemDoubleClicked(), te::qt::widgets::RuleItem::RuleItem(), te::se::serialize::Save(), te::qt::widgets::GroupingWidget::saveLegend(), te::qt::widgets::StyleExplorer::updateStyleTree(), te::qt::widgets::RasterizationWizardPage::updateUi(), te::qt::widgets::GroupingWidget::updateUi(), and te::qt::plugins::tv::TimeViewerEditLegendDialog::updateUi().
| bool te::se::Rule::hasElseFilter | ( | ) | const |
Definition at line 113 of file Rule.cpp.
References m_elseFilter.
Referenced by te::se::serialize::Save().
| void te::se::Rule::push_back | ( | Symbolizer * | s | ) |
Definition at line 138 of file Rule.cpp.
References m_symbolizers.
Referenced by DisplayWindow::addVectorialLayer(), te::qt::plugins::terralib4::Convert2TerraLib5(), te::se::CreateCoverageStyle(), te::se::CreateFeatureTypeStyle(), DashedLineStyle(), te::map::QueryLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGeometries(), EncodeStyle(), getLDDGraphStyle(), getMSTGraphStyle(), GraphicFillContourPolygonStyle(), GraphicFillPolygonStyle(), LineWithBorderStyle(), MarkPointStyle(), MONO_0_Style(), MONO_2_Style(), te::qt::widgets::StyleControllerWidget::onAddSymbolizerClicked(), te::qt::widgets::StyleControllerWidget::onAddTextSymbolizerClicked(), MainWindow::onSymbolizerUpdated(), RED_Style(), RGB_012_G_Contrast_Style(), RGB_012_RGB_Contrast_Style(), RGB_012_Style(), RGB_012_Transp_Style(), RGB_102_Style(), RoadStyleOne(), RoadStyleTwo(), te::qt::widgets::StyleControllerWidget::setLayer(), SimpleLineStyle(), SimplePolygonStyle(), SimplePolygonStyleWithStroke(), TransparentPolygonStyle(), and TreePolygonStyle().
| void te::se::Rule::removeLegendGraphic | ( | ) |
| void te::se::Rule::removeSymbolizer | ( | std::size_t | i | ) |
Definition at line 169 of file Rule.cpp.
References m_symbolizers.
Referenced by te::qt::widgets::StyleControllerWidget::onRemoveSymbolizerClicked().
| void te::se::Rule::setDescription | ( | Description * | d | ) |
Definition at line 69 of file Rule.cpp.
References d, and m_description.
Referenced by clone(), EncodeStyle(), te::qt::plugins::terralib4::GetGrouping(), and te::qt::widgets::GroupingWidget::updateStyle().
| void te::se::Rule::setFilter | ( | te::fe::Filter * | f | ) |
Definition at line 91 of file Rule.cpp.
References m_filter.
Referenced by clone(), te::sa::CreateBayesGrouping(), te::qt::widgets::GroupingWidget::createDoubleNullGroupingItem(), te::sa::CreateKernelGrouping(), te::qt::widgets::RasterizationWizardPage::createStringNullGroupingItem(), te::qt::widgets::GroupingWidget::createStringNullGroupingItem(), EncodeStyle(), te::qt::plugins::terralib4::GetGrouping(), te::map::GroupingByEqualSteps(), te::map::GroupingByQuantil(), te::map::GroupingByStdDeviation(), te::map::GroupingByUniqueValues(), and te::qt::plugins::tv::TimeViewerDockWidget::onSliderChanged().
| void te::se::Rule::setLegendGraphic | ( | Graphic * | legendGraphic | ) |
| void te::se::Rule::setMaxScaleDenominator | ( | const double & | maxScaleDenominator | ) |
Definition at line 128 of file Rule.cpp.
References m_maxScaleDenominator.
Referenced by clone(), EncodeStyle(), te::qt::widgets::RuleProperty::onScaleMaxChanged(), and te::qt::widgets::RuleItem::setVisible().
| void te::se::Rule::setMinScaleDenominator | ( | const double & | minScaleDenominator | ) |
Definition at line 118 of file Rule.cpp.
References m_minScaleDenominator.
Referenced by clone(), EncodeStyle(), te::qt::widgets::RuleProperty::onScaleMinChanged(), and te::qt::widgets::RuleItem::setVisible().
| void te::se::Rule::setName | ( | std::string * | name | ) |
Definition at line 58 of file Rule.cpp.
References m_name.
Referenced by clone(), te::sa::CreateBayesGrouping(), te::qt::widgets::GroupingWidget::createDoubleNullGroupingItem(), te::sa::CreateKernelGrouping(), te::qt::widgets::RasterizationWizardPage::createStringNullGroupingItem(), te::qt::widgets::GroupingWidget::createStringNullGroupingItem(), EncodeStyle(), te::qt::plugins::terralib4::GetGrouping(), te::map::GroupingByEqualSteps(), te::map::GroupingByQuantil(), te::map::GroupingByStdDeviation(), and te::map::GroupingByUniqueValues().
| void te::se::Rule::setSymbolizer | ( | std::size_t | i, |
| Symbolizer * | s | ||
| ) |
Definition at line 144 of file Rule.cpp.
References m_symbolizers.
Referenced by te::qt::widgets::ROIManagerWidget::onVectorLayerToolButtonClicked(), te::qt::widgets::StyleExplorer::swapSymbolizers(), and te::qt::widgets::ROIManagerWidget::~ROIManagerWidget().
| void te::se::Rule::setSymbolizers | ( | const std::vector< Symbolizer * > & | symbs | ) |
Definition at line 152 of file Rule.cpp.
References clearSymbolizers(), and m_symbolizers.
Referenced by te::sa::CreateBayesGrouping(), te::qt::widgets::GroupingWidget::createDoubleNullGroupingItem(), te::sa::CreateKernelGrouping(), te::qt::widgets::RasterizationWizardPage::createStringNullGroupingItem(), te::qt::widgets::GroupingWidget::createStringNullGroupingItem(), te::qt::plugins::terralib4::GetGrouping(), te::qt::widgets::StyleControllerWidget::onLibraryManagerClicked(), te::qt::plugins::tv::TimeViewerDockWidget::onSliderChanged(), te::qt::widgets::RasterizationWizardPage::onTableWidgetItemDoubleClicked(), and te::qt::widgets::GroupingWidget::onTableWidgetItemDoubleClicked().
|
private |
It gives the familiar short title for display lists and longer description for the rule. (Optional)
Definition at line 162 of file Rule.h.
Referenced by clone(), getDescription(), setDescription(), and ~Rule().
|
private |
It allows rules to be specified that are activated for features that are not selected by any other rule in a feature-type style. Default: false. If true, this is a Else filter rule. (Optional)
Definition at line 165 of file Rule.h.
Referenced by clone(), disableElseFilter(), enableElseFilter(), and hasElseFilter().
|
private |
It allows the selection of features in rules to be controlled by attribute conditions. (Optional)
Definition at line 164 of file Rule.h.
Referenced by clone(), enableElseFilter(), getFilter(), setFilter(), and ~Rule().
|
private |
It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional)
Definition at line 163 of file Rule.h.
Referenced by clone(), getLegendGraphic(), setLegendGraphic(), and ~Rule().
|
private |
It defines the range of map-rendering scales for which the rule should be applied. Default: TE_DOUBLE_INFINITY. (Optional)
Definition at line 167 of file Rule.h.
Referenced by getMaxScaleDenominator(), and setMaxScaleDenominator().
|
private |
It defines the range of map-rendering scales for which the rule should be applied. Default: 0.0. (Optional)
Definition at line 166 of file Rule.h.
Referenced by getMinScaleDenominator(), and setMinScaleDenominator().
|
private |
|
private |
A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory)
Definition at line 168 of file Rule.h.
Referenced by clearSymbolizers(), clone(), getSymbolizer(), getSymbolizers(), push_back(), removeSymbolizer(), setSymbolizer(), setSymbolizers(), and ~Rule().