A widget used to explore a style. More...
#include <StyleExplorer.h>
Public Slots | |
| void | onSymbolizerChanged (te::se::Symbolizer *symb) |
Signals | |
| void | ruleClicked (te::se::Rule *rule) |
| void | styleImported (te::se::Style *style, bool isVisual) |
| 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 | importStyle (te::se::Style *style, bool isVisual) |
| void | setLegendIconSize (int size) |
| 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... | |
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) |
| 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) |
| 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 widgets/se/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 widgets/se/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 widgets/se/StyleExplorer.cpp.
References m_symbolizerNames, onItemClicked(), and ~StyleExplorer().
|
default |
Destructor.
Referenced by StyleExplorer().
| te::se::Rule * te::qt::widgets::StyleExplorer::getCurrentRule | ( | ) |
Gets the current rule.
Definition at line 142 of file widgets/se/StyleExplorer.cpp.
References getRule(), getSelectedItem(), RULE, and SYMBOLIZER.
Referenced by goDownSymbolizer(), goUpSymbolizer(), and onSymbolizerChanged().
| te::se::Symbolizer * te::qt::widgets::StyleExplorer::getCurrentSymbolizer | ( | ) |
Gets the current symbolizer.
Definition at line 158 of file widgets/se/StyleExplorer.cpp.
References getSelectedItem(), getSymbolizer(), and SYMBOLIZER.
|
private |
Auxiliary internal method to retrieve a rule from a QTreeWidgetItem.
Definition at line 241 of file widgets/se/StyleExplorer.cpp.
References te::se::Style::getRule(), m_style, and RULE.
Referenced by getCurrentRule(), getSymbolizer(), and onItemClicked().
|
private |
Auxiliary internal method to retrieve the selected item on Style Explorer.
Definition at line 273 of file widgets/se/StyleExplorer.cpp.
Referenced by getCurrentRule(), getCurrentSymbolizer(), goDownSymbolizer(), goUpSymbolizer(), and onSymbolizerChanged().
|
private |
Auxiliary internal method to retrieve a symbolizer from a QTreeWidgetItem.
Definition at line 252 of file widgets/se/StyleExplorer.cpp.
References getRule(), te::se::Rule::getSymbolizers(), and SYMBOLIZER.
Referenced by getCurrentSymbolizer(), onItemClicked(), and updateStyleTree().
| void te::qt::widgets::StyleExplorer::goDownSymbolizer | ( | ) |
Definition at line 190 of file widgets/se/StyleExplorer.cpp.
References getCurrentRule(), getSelectedItem(), te::se::Rule::getSymbolizers(), swapSymbolizers(), SYMBOLIZER, and updateStyleTree().
| void te::qt::widgets::StyleExplorer::goUpSymbolizer | ( | ) |
Definition at line 168 of file widgets/se/StyleExplorer.cpp.
References getCurrentRule(), getSelectedItem(), swapSymbolizers(), SYMBOLIZER, and updateStyleTree().
| void te::qt::widgets::StyleExplorer::importStyle | ( | te::se::Style * | style, |
| bool | isVisual | ||
| ) |
Definition at line 219 of file widgets/se/StyleExplorer.cpp.
References styleImported().
|
privateslot |
Definition at line 296 of file widgets/se/StyleExplorer.cpp.
References getRule(), getSymbolizer(), RULE, ruleClicked(), STYLE, SYMBOLIZER, and symbolizerClicked().
Referenced by StyleExplorer().
|
slot |
Definition at line 224 of file widgets/se/StyleExplorer.cpp.
References te::qt::widgets::SymbologyPreview::build(), getCurrentRule(), getSelectedItem(), and te::se::Rule::getSymbolizers().
|
signal |
This signal is emitted when a rule is clicked.
Referenced by onItemClicked().
| void te::qt::widgets::StyleExplorer::setLegendIconSize | ( | int | size | ) |
Definition at line 212 of file widgets/se/StyleExplorer.cpp.
References updateStyleTree().
| void te::qt::widgets::StyleExplorer::setStyle | ( | te::se::Style * | style, |
| te::se::Rule * | currentRule = 0 |
||
| ) |
Sets a style element to this widget.
| style | A valid style element. |
Definition at line 59 of file widgets/se/StyleExplorer.cpp.
References m_style, and updateStyleTree().
|
signal |
Referenced by importStyle().
|
private |
Definition at line 283 of file widgets/se/StyleExplorer.cpp.
References te::se::Symbolizer::clone(), te::se::Rule::getSymbolizer(), and te::se::Rule::setSymbolizer().
Referenced by goDownSymbolizer(), and goUpSymbolizer().
|
signal |
This signal is emitted when a symbolizer is clicked.
Referenced by onItemClicked(), and updateStyleTree().
| void te::qt::widgets::StyleExplorer::updateStyleTree | ( | te::se::Rule * | currentRule = 0 | ) |
This method updates the Style Explorer.
Definition at line 66 of file widgets/se/StyleExplorer.cpp.
References te::qt::widgets::SymbologyPreview::build(), te::se::Rule::getName(), te::se::Style::getRule(), te::se::Style::getRules(), getSymbolizer(), te::se::Rule::getSymbolizers(), m_style, m_symbolizerNames, RULE, STYLE, SYMBOLIZER, and symbolizerClicked().
Referenced by goDownSymbolizer(), goUpSymbolizer(), setLegendIconSize(), and setStyle().
|
private |
Style element that will be explored by this widget.
Definition at line 173 of file widgets/se/StyleExplorer.h.
Referenced by getRule(), setStyle(), and updateStyleTree().
|
private |
A map of symbolizers names to user interface names.
Definition at line 174 of file widgets/se/StyleExplorer.h.
Referenced by StyleExplorer(), and updateStyleTree().