te::qt::widgets::Symbol Class Reference

This class represents a symbol. TODO: More description! More...

#include <Symbol.h>

Public Member Functions

void addSymbolizer (te::se::Symbolizer *symb)
 It adds the given Symbolizer to the list of Symbolizers of the symbol. More...
 
Symbolclone () const
 It creates a new copy of this object. More...
 
const SymbolInfogetInfo () const
 It return the information associated to the symbol. More...
 
te::se::SymbolizergetSymbolizer (const std::size_t &i) const
 It returns the n-th Symbolizer. More...
 
const std::vector< te::se::Symbolizer * > & getSymbolizers () const
 It returns the list of Symbolizers that compose the symbol. More...
 
std::size_t getSymbolizersCount () const
 It returns the number of Symbolizers that compose of the symbol. More...
 
te::se::Symbolizeroperator[] (const std::size_t &i) const
 It returns the n-th Symbolizer. More...
 
void removeSymbolizer (const std::size_t &i)
 It removes the specified Symbolizer from the list of Symbolizers of the symbol. More...
 
void setInfo (const SymbolInfo &info)
 It sets the information associated to the symbol. More...
 
void setSymbolizer (const std::size_t &i, te::se::Symbolizer *symb)
 It sets the given Symbolizer at the given position. More...
 
void swapSymbolizers (const std::size_t &first, const std::size_t &second)
 It swaps the position of the Symbolizers. More...
 
Initializer Methods

Methods related to instantiation and destruction.

 Symbol ()
 Default constructor. More...
 
 Symbol (const Symbol &rhs)
 Copy constructor. More...
 
 ~Symbol ()
 Destructor. More...
 

Private Attributes

SymbolInfo m_info
 Information about the symbol. More...
 
std::vector< te::se::Symbolizer * > m_symbs
 Set of symbolizers that compose the symbol. More...
 

Detailed Description

This class represents a symbol. TODO: More description!

Definition at line 54 of file Symbol.h.

Constructor & Destructor Documentation

te::qt::widgets::Symbol::Symbol ( )
default

Default constructor.

Referenced by clone().

te::qt::widgets::Symbol::Symbol ( const Symbol rhs)

Copy constructor.

Definition at line 36 of file Symbol.cpp.

References addSymbolizer(), getInfo(), m_info, and m_symbs.

te::qt::widgets::Symbol::~Symbol ( )

Destructor.

Definition at line 43 of file Symbol.cpp.

References te::common::FreeContents(), and m_symbs.

Member Function Documentation

void te::qt::widgets::Symbol::addSymbolizer ( te::se::Symbolizer symb)

It adds the given Symbolizer to the list of Symbolizers of the symbol.

Parameters
symbThe Symbolizer that will be added.
Note
The symbol will take the ownership of the given Symbolizer.

Definition at line 80 of file Symbol.cpp.

References m_symbs.

Referenced by te::qt::widgets::SymbolEditorWidget::createNewSymbolizer(), PreviewWidgets(), and Symbol().

te::qt::widgets::Symbol * te::qt::widgets::Symbol::clone ( ) const

It creates a new copy of this object.

Definition at line 118 of file Symbol.cpp.

References Symbol().

Referenced by te::qt::widgets::SymbolSelectorDialog::getSymbol().

const te::qt::widgets::SymbolInfo & te::qt::widgets::Symbol::getInfo ( ) const

It return the information associated to the symbol.

Returns
The information associated to the symbol.

Definition at line 48 of file Symbol.cpp.

References m_info.

Referenced by te::qt::widgets::SymbolSelectorDialog::initialize(), te::qt::widgets::SymbolLibrary::insert(), te::qt::widgets::SymbolSelectorDialog::onShowSymbolInfoPushButtonPressed(), te::qt::widgets::SymbolLibrary::remove(), Symbol(), and SymbolSelector().

te::se::Symbolizer * te::qt::widgets::Symbol::getSymbolizer ( const std::size_t &  i) const

It returns the n-th Symbolizer.

Parameters
iThe Symbolizer index.
Returns
It returns a pointer to the specified Symbolizer.
Note
The caller of this method will NOT take the ownership of the symbolizer.

Definition at line 63 of file Symbol.cpp.

References m_symbs.

Referenced by te::qt::widgets::StyleControllerWidget::onLibraryManagerClicked(), operator[](), and te::qt::widgets::SymbolTableWidget::updatePreview().

const std::vector< te::se::Symbolizer * > & te::qt::widgets::Symbol::getSymbolizers ( ) const

It returns the list of Symbolizers that compose the symbol.

Returns
The list of Symbolizers that compose the symbol.
Note
The caller of this method will NOT take the ownership of the symbolizers.

Definition at line 75 of file Symbol.cpp.

References m_symbs.

Referenced by te::qt::widgets::SymbologyPreview::build(), te::qt::widgets::SymbolSelectorDialog::initialize(), and te::qt::widgets::SymbolPreviewWidget::updatePreview().

te::se::Symbolizer * te::qt::widgets::Symbol::operator[] ( const std::size_t &  i) const

It returns the n-th Symbolizer.

Parameters
iThe Symbolizer index.
Returns
It returns a pointer to the specified Symbolizer.
Note
The caller of this method will NOT take the ownership of the symbolizer.

Definition at line 70 of file Symbol.cpp.

References getSymbolizer().

void te::qt::widgets::Symbol::removeSymbolizer ( const std::size_t &  i)

It removes the specified Symbolizer from the list of Symbolizers of the symbol.

Parameters
iThe Symbolizer index.

Definition at line 96 of file Symbol.cpp.

References m_symbs.

Referenced by te::qt::widgets::SymbolEditorWidget::onRemoveToolButtonClicked().

void te::qt::widgets::Symbol::setInfo ( const SymbolInfo info)

It sets the information associated to the symbol.

Parameters
infoThe information that will be associated to this symbol.

Definition at line 53 of file Symbol.cpp.

References m_info.

void te::qt::widgets::Symbol::setSymbolizer ( const std::size_t &  i,
te::se::Symbolizer symb 
)

It sets the given Symbolizer at the given position.

Parameters
iThe Symbolizer position.
symbThe Symbolizer that will be added.
Note
The symbol will take the ownership of the given Symbolizer.

Definition at line 87 of file Symbol.cpp.

References m_symbs.

Referenced by te::qt::widgets::SymbolEditorWidget::onSymbolizerChanged().

void te::qt::widgets::Symbol::swapSymbolizers ( const std::size_t &  first,
const std::size_t &  second 
)

It swaps the position of the Symbolizers.

Parameters
firstThe first Symbolizer index.
secondThe second Symbolizer index.

Definition at line 104 of file Symbol.cpp.

References m_symbs.

Referenced by te::qt::widgets::SymbolEditorWidget::swapSymbolizers().

Member Data Documentation

SymbolInfo te::qt::widgets::Symbol::m_info
private

Information about the symbol.

Definition at line 167 of file Symbol.h.

Referenced by getInfo(), setInfo(), and Symbol().

std::vector<te::se::Symbolizer*> te::qt::widgets::Symbol::m_symbs
private

Set of symbolizers that compose the symbol.

Definition at line 168 of file Symbol.h.

Referenced by addSymbolizer(), getSymbolizer(), getSymbolizers(), getSymbolizersCount(), removeSymbolizer(), setSymbolizer(), swapSymbolizers(), Symbol(), and ~Symbol().


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