te::qt::widgets::StyleExplorer Class Reference

A widget used to explore a style. More...

#include <StyleExplorer.h>

Inheritance diagram for te::qt::widgets::StyleExplorer:

Private Types

enum  NodeType { STYLE = 0, RULE = 1, SYMBOLIZER = 2 }
 Auxiliary internal enumeration to control the StyleExplorer tree nodes. More...
 

Initializer Methods

Methods related to instantiation and destruction.

te::se::Stylem_style
 Style element that will be explored by this widget. More...
 
std::map< QString, QString > m_symbolizerNames
 A map of symbolizers names to user interface names. More...
 
 StyleExplorer (QWidget *parent=0)
 Constructs a style explorer widget which is a child of parent. More...
 
 ~StyleExplorer ()
 Destructor. More...
 
void setStyle (te::se::Style *style, te::se::Rule *currentRule=0)
 Sets a style element to this widget. More...
 
void updateStyleTree (te::se::Rule *currentRule=0)
 This method updates the Style Explorer. More...
 
te::se::RulegetCurrentRule ()
 Gets the current rule. More...
 
te::se::SymbolizergetCurrentSymbolizer ()
 Gets the current symbolizer. More...
 
void goUpSymbolizer ()
 
void goDownSymbolizer ()
 
void setLegendIconSize (int size)
 
void importStyle (te::se::Style *style, bool isVisual)
 
void onSymbolizerChanged (te::se::Symbolizer *symb)
 
te::se::RulegetRule (QTreeWidgetItem *item)
 Auxiliary internal method to retrieve a rule from a QTreeWidgetItem. More...
 
te::se::SymbolizergetSymbolizer (QTreeWidgetItem *item)
 Auxiliary internal method to retrieve a symbolizer from a QTreeWidgetItem. More...
 
QTreeWidgetItem * getSelectedItem () const
 Auxiliary internal method to retrieve the selected item on Style Explorer. More...
 
void swapSymbolizers (te::se::Rule *r, int indexFirst, int indexSecond)
 
void onItemClicked (QTreeWidgetItem *item, int column)
 
void ruleClicked (te::se::Rule *rule)
 
void symbolizerClicked (te::se::Symbolizer *symb)
 
void styleImported (te::se::Style *style, bool isVisual)
 

Detailed Description

A widget used to explore a style.

Definition at line 60 of file StyleExplorer.h.

Member Enumeration Documentation

◆ NodeType

Auxiliary internal enumeration to control the StyleExplorer tree nodes.

Enumerator
STYLE 

Style root node.

RULE 

Rule node.

SYMBOLIZER 

Symbolizer node.

Definition at line 71 of file StyleExplorer.h.

Constructor & Destructor Documentation

◆ StyleExplorer()

te::qt::widgets::StyleExplorer::StyleExplorer ( QWidget *  parent = 0)

Constructs a style explorer widget which is a child of parent.

◆ ~StyleExplorer()

te::qt::widgets::StyleExplorer::~StyleExplorer ( )

Destructor.

Member Function Documentation

◆ getCurrentRule()

te::se::Rule* te::qt::widgets::StyleExplorer::getCurrentRule ( )

Gets the current rule.

Returns
The current rule on Style Explorer.
Note
If there is not a current rule a NULL point will be returned.

◆ getCurrentSymbolizer()

te::se::Symbolizer* te::qt::widgets::StyleExplorer::getCurrentSymbolizer ( )

Gets the current symbolizer.

Returns
The current symbolizer on Style Explorer.
Note
If there is not a current symbolizer a NULL point will be returned.

◆ getRule()

te::se::Rule* te::qt::widgets::StyleExplorer::getRule ( QTreeWidgetItem *  item)
private

Auxiliary internal method to retrieve a rule from a QTreeWidgetItem.

◆ getSelectedItem()

QTreeWidgetItem* te::qt::widgets::StyleExplorer::getSelectedItem ( ) const
private

Auxiliary internal method to retrieve the selected item on Style Explorer.

Returns
The selected QTreeWidgetItem on Style Explorer.
Note
If there is not a selected QTreeWidgetItem a NULL point will be returned.

◆ getSymbolizer()

te::se::Symbolizer* te::qt::widgets::StyleExplorer::getSymbolizer ( QTreeWidgetItem *  item)
private

Auxiliary internal method to retrieve a symbolizer from a QTreeWidgetItem.

◆ goDownSymbolizer()

void te::qt::widgets::StyleExplorer::goDownSymbolizer ( )

◆ goUpSymbolizer()

void te::qt::widgets::StyleExplorer::goUpSymbolizer ( )

◆ importStyle()

void te::qt::widgets::StyleExplorer::importStyle ( te::se::Style style,
bool  isVisual 
)

◆ onItemClicked

void te::qt::widgets::StyleExplorer::onItemClicked ( QTreeWidgetItem *  item,
int  column 
)
privateslot

◆ onSymbolizerChanged

void te::qt::widgets::StyleExplorer::onSymbolizerChanged ( te::se::Symbolizer symb)
slot

◆ ruleClicked

void te::qt::widgets::StyleExplorer::ruleClicked ( te::se::Rule rule)
signal

This signal is emitted when a rule is clicked.

◆ setLegendIconSize()

void te::qt::widgets::StyleExplorer::setLegendIconSize ( int  size)

◆ setStyle()

void te::qt::widgets::StyleExplorer::setStyle ( te::se::Style style,
te::se::Rule currentRule = 0 
)

Sets a style element to this widget.

Parameters
styleA valid style element.
Note
The widget will NOT take the ownership of the given style.
The widget will be update based on given style parameters.

◆ styleImported

void te::qt::widgets::StyleExplorer::styleImported ( te::se::Style style,
bool  isVisual 
)
signal

◆ swapSymbolizers()

void te::qt::widgets::StyleExplorer::swapSymbolizers ( te::se::Rule r,
int  indexFirst,
int  indexSecond 
)
private

◆ symbolizerClicked

void te::qt::widgets::StyleExplorer::symbolizerClicked ( te::se::Symbolizer symb)
signal

This signal is emitted when a symbolizer is clicked.

◆ updateStyleTree()

void te::qt::widgets::StyleExplorer::updateStyleTree ( te::se::Rule currentRule = 0)

This method updates the Style Explorer.

Member Data Documentation

◆ m_style

te::se::Style* te::qt::widgets::StyleExplorer::m_style
private

Style element that will be explored by this widget.

Definition at line 173 of file StyleExplorer.h.

◆ m_symbolizerNames

std::map<QString, QString> te::qt::widgets::StyleExplorer::m_symbolizerNames
private

A map of symbolizers names to user interface names.

Definition at line 174 of file StyleExplorer.h.


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