All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 ( )

Constructor.

Definition at line 42 of file SymbolizerColorFinder.cpp.

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

Destructor.

Definition at line 46 of file SymbolizerColorFinder.cpp.

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 50 of file SymbolizerColorFinder.cpp.

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

Referenced by te::qt::widgets::GroupingWidget::updateUi().

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().

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().

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 te::se::Mark::getFill().

te::color::RGBAColor te::se::SymbolizerColorFinder::getColor ( )
inline

Get the color.

Returns
Color found given a symbolizer

Definition at line 93 of file SymbolizerColorFinder.h.

Referenced by te::qt::widgets::GroupingWidget::updateUi().

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

Implements te::se::Visitor.

Definition at line 55 of file SymbolizerColorFinder.cpp.

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

Implements te::se::Visitor.

Definition at line 59 of file SymbolizerColorFinder.cpp.

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

Implements te::se::Visitor.

Definition at line 63 of file SymbolizerColorFinder.cpp.

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

Implements te::se::Visitor.

Definition at line 67 of file SymbolizerColorFinder.cpp.

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

Implements te::se::Visitor.

Definition at line 71 of file SymbolizerColorFinder.cpp.

References te::se::PolygonSymbolizer::getFill().

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

Implements te::se::Visitor.

Definition at line 79 of file SymbolizerColorFinder.cpp.

References 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 95 of file SymbolizerColorFinder.cpp.

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

Implements te::se::Visitor.

Definition at line 99 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.


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