te::se::SymbolizerColorFinder Class Reference

A Symbology Enconding visitor that finds a color given a symbolizer element. If you want to use this visitor, use a command like: te::se::SymbolizerColorFinder scf; scf.find(symbolizer); te::color::RGBAColor color = scf.getColor(); More...

#include <SymbolizerColorFinder.h>

Inheritance diagram for te::se::SymbolizerColorFinder:
te::se::Visitor

Public Member Functions

Initializer Methods
 SymbolizerColorFinder ()
 Constructor. More...
 
 ~SymbolizerColorFinder ()
 Destructor. More...
 
Find Method

Method that can be used to find a color based on Symbology Enconding symbolizer elements.

void find (const te::se::Symbolizer *symbolizer)
 It find the color based on given symbolizer. More...
 
te::color::RGBAColor getColor ()
 Get the color. More...
 
Visitor Methods

All concrete visitors must implement these methods.

void visit (const te::se::Style &visited)
 
void visit (const te::se::FeatureTypeStyle &visited)
 
void visit (const te::se::CoverageStyle &visited)
 
void visit (const te::se::Symbolizer &visited)
 
void visit (const te::se::PolygonSymbolizer &visited)
 
void visit (const te::se::LineSymbolizer &visited)
 
void visit (const te::se::PointSymbolizer &visited)
 
void visit (const te::se::TextSymbolizer &visited)
 
void visit (const te::se::RasterSymbolizer &visited)
 

Protected Attributes

te::color::RGBAColor m_color
 Color found given a symbolizer. More...
 

Private Member Functions

void find (const te::se::Stroke *stroke)
 Internal method that finds the color based on given Stroke element. More...
 
void find (const te::se::Fill *fill)
 Internal method that finds the color based on given Fill element. More...
 
void find (const te::se::Mark *mark)
 Internal method that finds the color based on given Mark element. More...
 

Detailed Description

A Symbology Enconding visitor that finds a color given a symbolizer element. If you want to use this visitor, use a command like: te::se::SymbolizerColorFinder scf; scf.find(symbolizer); te::color::RGBAColor color = scf.getColor();

See also
te::se::Visitor

Definition at line 60 of file SymbolizerColorFinder.h.

Constructor & Destructor Documentation

te::se::SymbolizerColorFinder::SymbolizerColorFinder ( )
default

Constructor.

te::se::SymbolizerColorFinder::~SymbolizerColorFinder ( )
default

Destructor.

Member Function Documentation

void te::se::SymbolizerColorFinder::find ( const te::se::Symbolizer symbolizer)

It find the color based on given symbolizer.

Parameters
symbolizerThe symbolizer that will be used searched.

Definition at line 46 of file SymbolizerColorFinder.cpp.

References te::common::BaseVisitable< T, R >::accept().

Referenced by find(), te::qt::widgets::RasterizationWizardPage::updateUi(), te::qt::widgets::GroupingWidget::updateUi(), te::qt::plugins::tv::TimeViewerEditLegendDialog::updateUi(), and visit().

void te::se::SymbolizerColorFinder::find ( const te::se::Stroke stroke)
private

Internal method that finds the color based on given Stroke element.

Parameters
strokeThe Stroke element that will be used to find the color.

Definition at line 103 of file SymbolizerColorFinder.cpp.

References te::se::GetColor(), and m_color.

void te::se::SymbolizerColorFinder::find ( const te::se::Fill fill)
private

Internal method that finds the color based on given Fill element.

Parameters
fillThe Fill element that will be used to find the color.

Definition at line 108 of file SymbolizerColorFinder.cpp.

References te::se::GetColor(), and m_color.

void te::se::SymbolizerColorFinder::find ( const te::se::Mark mark)
private

Internal method that finds the color based on given Mark element.

Parameters
markThe mark element that will be used to find the color.

Definition at line 113 of file SymbolizerColorFinder.cpp.

References find(), and te::se::Mark::getFill().

te::color::RGBAColor te::se::SymbolizerColorFinder::getColor ( )
inline
void te::se::SymbolizerColorFinder::visit ( const te::se::Style visited)
virtual

Implements te::se::Visitor.

Definition at line 51 of file SymbolizerColorFinder.cpp.

void te::se::SymbolizerColorFinder::visit ( const te::se::FeatureTypeStyle visited)
virtual

Implements te::se::Visitor.

Definition at line 55 of file SymbolizerColorFinder.cpp.

void te::se::SymbolizerColorFinder::visit ( const te::se::CoverageStyle visited)
virtual

Implements te::se::Visitor.

Definition at line 60 of file SymbolizerColorFinder.cpp.

void te::se::SymbolizerColorFinder::visit ( const te::se::Symbolizer visited)
virtual

Implements te::se::Visitor.

Definition at line 65 of file SymbolizerColorFinder.cpp.

void te::se::SymbolizerColorFinder::visit ( const te::se::PolygonSymbolizer visited)
virtual

Implements te::se::Visitor.

Definition at line 69 of file SymbolizerColorFinder.cpp.

References find(), and te::se::PolygonSymbolizer::getFill().

void te::se::SymbolizerColorFinder::visit ( const te::se::LineSymbolizer visited)
virtual

Implements te::se::Visitor.

Definition at line 77 of file SymbolizerColorFinder.cpp.

References find(), and te::se::LineSymbolizer::getStroke().

void te::se::SymbolizerColorFinder::visit ( const te::se::PointSymbolizer visited)
virtual
void te::se::SymbolizerColorFinder::visit ( const te::se::TextSymbolizer visited)
virtual

Implements te::se::Visitor.

Definition at line 93 of file SymbolizerColorFinder.cpp.

void te::se::SymbolizerColorFinder::visit ( const te::se::RasterSymbolizer visited)
virtual

Implements te::se::Visitor.

Definition at line 98 of file SymbolizerColorFinder.cpp.

Member Data Documentation

te::color::RGBAColor te::se::SymbolizerColorFinder::m_color
protected

Color found given a symbolizer.

Definition at line 139 of file SymbolizerColorFinder.h.

Referenced by find().


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