A widget used to explore a style. More...
#include <StyleExplorer.h>
Public Slots | |
void | onSymbolizerChanged (te::se::Symbolizer *symb) |
Signals | |
void | ruleClicked (const te::se::Rule *rule) |
void | symbolizerClicked (te::se::Symbolizer *symb) |
Public Member Functions | |
te::se::Rule * | getCurrentRule () |
Gets the current rule. More... | |
te::se::Symbolizer * | getCurrentSymbolizer () |
Gets the current symbolizer. More... | |
void | goDownSymbolizer () |
void | goUpSymbolizer () |
void | setLegendIconSize (int size) |
void | setStyle (te::se::Style *style) |
Sets a style element to this widget. More... | |
void | updateStyleTree () |
This method updates the Style Explorer. More... | |
Initializer Methods | |
Methods related to instantiation and destruction. | |
StyleExplorer (QWidget *parent=0) | |
Constructs a style explorer widget which is a child of parent. More... | |
~StyleExplorer () | |
Destructor. More... | |
Private Types | |
enum | NodeType { STYLE = 0, RULE = 1, SYMBOLIZER = 2 } |
Auxiliary internal enumeration to control the StyleExplorer tree nodes. More... | |
Private Slots | |
void | onItemClicked (QTreeWidgetItem *item, int column) |
Private Member Functions | |
te::se::Rule * | getRule (QTreeWidgetItem *item) const |
Auxiliary internal method to retrieve a rule from a QTreeWidgetItem. More... | |
QTreeWidgetItem * | getSelectedItem () const |
Auxiliary internal method to retrieve the selected item on Style Explorer. More... | |
te::se::Symbolizer * | getSymbolizer (QTreeWidgetItem *item) const |
Auxiliary internal method to retrieve a symbolizer from a QTreeWidgetItem. More... | |
void | swapSymbolizers (te::se::Rule *r, int indexFirst, int indexSecond) |
Private Attributes | |
te::se::Style * | m_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... | |
A widget used to explore a style.
Definition at line 60 of file StyleExplorer.h.
|
private |
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.
te::qt::widgets::StyleExplorer::StyleExplorer | ( | QWidget * | parent = 0 | ) |
Constructs a style explorer widget which is a child of parent.
Definition at line 37 of file StyleExplorer.cpp.
References m_symbolizerNames, and onItemClicked().
te::qt::widgets::StyleExplorer::~StyleExplorer | ( | ) |
Destructor.
Definition at line 56 of file StyleExplorer.cpp.
te::se::Rule * te::qt::widgets::StyleExplorer::getCurrentRule | ( | ) |
Gets the current rule.
Definition at line 121 of file StyleExplorer.cpp.
te::se::Symbolizer * te::qt::widgets::StyleExplorer::getCurrentSymbolizer | ( | ) |
Gets the current symbolizer.
Definition at line 137 of file StyleExplorer.cpp.
|
private |
Auxiliary internal method to retrieve a rule from a QTreeWidgetItem.
Definition at line 215 of file StyleExplorer.cpp.
|
private |
Auxiliary internal method to retrieve the selected item on Style Explorer.
Definition at line 247 of file StyleExplorer.cpp.
|
private |
Auxiliary internal method to retrieve a symbolizer from a QTreeWidgetItem.
Definition at line 226 of file StyleExplorer.cpp.
References te::se::Rule::getSymbolizers().
void te::qt::widgets::StyleExplorer::goDownSymbolizer | ( | ) |
Definition at line 169 of file StyleExplorer.cpp.
References te::se::Rule::getSymbolizers().
void te::qt::widgets::StyleExplorer::goUpSymbolizer | ( | ) |
Definition at line 147 of file StyleExplorer.cpp.
|
privateslot |
Definition at line 270 of file StyleExplorer.cpp.
Referenced by StyleExplorer().
|
slot |
Definition at line 198 of file StyleExplorer.cpp.
References te::qt::widgets::SymbologyPreview::build(), and te::se::Rule::getSymbolizers().
|
signal |
This signal is emitted when a rule is clicked.
void te::qt::widgets::StyleExplorer::setLegendIconSize | ( | int | size | ) |
Definition at line 191 of file StyleExplorer.cpp.
void te::qt::widgets::StyleExplorer::setStyle | ( | te::se::Style * | style | ) |
Sets a style element to this widget.
style | A valid style element. |
Definition at line 60 of file StyleExplorer.cpp.
|
private |
Definition at line 257 of file StyleExplorer.cpp.
References te::se::Symbolizer::clone(), te::se::Rule::getSymbolizer(), and te::se::Rule::setSymbolizer().
|
signal |
This signal is emitted when a symbolizer is clicked.
void te::qt::widgets::StyleExplorer::updateStyleTree | ( | ) |
This method updates the Style Explorer.
Definition at line 69 of file StyleExplorer.cpp.
References te::qt::widgets::SymbologyPreview::build(), and te::se::Rule::getSymbolizers().
|
private |
Style element that will be explored by this widget.
Definition at line 169 of file StyleExplorer.h.
|
private |
A map of symbolizers names to user interface names.
Definition at line 170 of file StyleExplorer.h.
Referenced by StyleExplorer().