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 | ( | ) |
void te::se::Rule::clearSymbolizers | ( | ) |
Definition at line 178 of file Rule.cpp.
References te::common::FreeContents().
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 disableElseFilter(), enableElseFilter(), m_symbolizers, setDescription(), setFilter(), setLegendGraphic(), setMaxScaleDenominator(), setMinScaleDenominator(), and setName().
void te::se::Rule::disableElseFilter | ( | ) |
void te::se::Rule::enableElseFilter | ( | ) |
const te::se::Description * te::se::Rule::getDescription | ( | ) | const |
Definition at line 75 of file Rule.cpp.
Referenced by te::se::serialize::Save().
const te::fe::Filter * te::se::Rule::getFilter | ( | ) | const |
Definition at line 97 of file Rule.cpp.
Referenced by te::map::DrawGeometries(), te::map::QueryLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGeometries(), and te::se::serialize::Save().
const te::se::Graphic * te::se::Rule::getLegendGraphic | ( | ) | const |
Definition at line 86 of file Rule.cpp.
Referenced by te::se::serialize::Save().
const double & te::se::Rule::getMaxScaleDenominator | ( | ) | const |
Definition at line 133 of file Rule.cpp.
Referenced by te::se::serialize::Save().
const double & te::se::Rule::getMinScaleDenominator | ( | ) | const |
Definition at line 123 of file Rule.cpp.
Referenced by te::se::serialize::Save().
const std::string * te::se::Rule::getName | ( | ) | const |
Definition at line 64 of file Rule.cpp.
Referenced by te::layout::LegendModel::drawStyleLegend(), and te::se::serialize::Save().
const te::se::Symbolizer * te::se::Rule::getSymbolizer | ( | std::size_t | i | ) | const |
Definition at line 163 of file Rule.cpp.
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.
Referenced by te::qt::widgets::SymbologyPreview::build(), te::qt::widgets::ChartConfigurer::config(), te::graph::LayerRenderer::draw(), te::map::DrawGeometries(), te::map::QueryLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGeometries(), te::map::QueryLayerRenderer::drawLayerGroupingMem(), te::map::AbstractLayerRenderer::drawLayerGroupingMem(), te::map::QueryLayerRenderer::drawLayerLinkedGroupingMem(), te::wms::WMSLayerRenderer::drawRaster(), te::map::DrawRaster(), te::layout::LegendModel::drawStyleLegend(), te::qt::widgets::RasterNavigatorWidget::getCompositionInfo(), te::se::GetRasterSymbolizer(), 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::se::serialize::Save(), and te::qt::widgets::StyleExplorer::updateStyleTree().
bool te::se::Rule::hasElseFilter | ( | ) | const |
Definition at line 113 of file Rule.cpp.
Referenced by te::se::serialize::Save().
void te::se::Rule::push_back | ( | Symbolizer * | s | ) |
Definition at line 138 of file Rule.cpp.
Referenced by te::qt::plugins::terralib4::Convert2TerraLib5(), te::se::CreateCoverageStyle(), te::se::CreateFeatureTypeStyle(), te::map::QueryLayerRenderer::drawLayerGeometries(), te::map::AbstractLayerRenderer::drawLayerGeometries(), and te::qt::widgets::StyleControllerWidget::onAddSymbolizerClicked().
void te::se::Rule::removeLegendGraphic | ( | ) |
void te::se::Rule::removeSymbolizer | ( | std::size_t | i | ) |
Definition at line 169 of file Rule.cpp.
Referenced by te::qt::widgets::StyleControllerWidget::onRemoveSymbolizerClicked().
void te::se::Rule::setDescription | ( | Description * | d | ) |
void te::se::Rule::setFilter | ( | te::fe::Filter * | f | ) |
void te::se::Rule::setLegendGraphic | ( | Graphic * | legendGraphic | ) |
void te::se::Rule::setMaxScaleDenominator | ( | const double & | maxScaleDenominator | ) |
void te::se::Rule::setMinScaleDenominator | ( | const double & | minScaleDenominator | ) |
void te::se::Rule::setName | ( | std::string * | name | ) |
void te::se::Rule::setSymbolizer | ( | std::size_t | i, |
Symbolizer * | s | ||
) |
Definition at line 144 of file Rule.cpp.
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.
Referenced by te::qt::widgets::StyleControllerWidget::onLibraryManagerClicked().
|
private |
|
private |
|
private |
|
private |
It allows an optional explicit Graphic Symbolizer to be displayed in a legend for this rule. (Optional)
|
private |
|
private |
|
private |
|
private |
A Symbolizer describes how a feature/coverage is to appear on a map. (Mandatory)
Definition at line 170 of file Rule.h.
Referenced by clone().