27 #include "../../../se/Rule.h"
28 #include "../../../se/Symbolizer.h"
29 #include "ui_StyleControllerWidgetForm.h"
35 #include <QtGui/QMessageBox>
42 m_ui(new Ui::StyleControllerWidgetForm)
48 QGridLayout* le =
new QGridLayout(
m_ui->m_explorerFrame);
49 le->setContentsMargins(0, 0, 0, 0);
69 m_explorer->setStyle(style);
79 m_ui->m_upSymbToolButton->setIcon(QIcon::fromTheme(
"go-up").pixmap(16,16));
80 m_ui->m_downSymbToolButton->setIcon(QIcon::fromTheme(
"go-down").pixmap(16,16));
81 m_ui->m_addSymbToolButton->setIcon(QIcon::fromTheme(
"list-add").pixmap(16,16));
82 m_ui->m_removeSymbToolButton->setIcon(QIcon::fromTheme(
"list-remove").pixmap(16,16));
83 m_ui->m_mapRefreshToolButton->setIcon(QIcon::fromTheme(
"map-draw").pixmap(16,16));
92 QMessageBox::information(
this, tr(
"Style"), tr(
"Select a rule first."));
110 m_explorer->updateStyleTree();
119 QMessageBox::information(
this, tr(
"Style"), tr(
"Select a symbol first."));
128 QMessageBox::information(
this, tr(
"Style"), tr(
"The rule must have at least one symbol."));
141 m_explorer->updateStyleTree();
150 QMessageBox::information(
this, tr(
"Style"), tr(
"Select a symbol first."));
154 m_explorer->goUpSymbolizer();
163 QMessageBox::information(
this, tr(
"Style"), tr(
"Select a symbol first."));
167 m_explorer->goDownSymbolizer();
177 m_explorer->setLegendIconSize(size);
void push_back(Symbolizer *s)
const Symbolizer * getSymbolizer(std::size_t i) const
StyleControllerWidget(QWidget *parent=0, Qt::WindowFlags f=0)
Constructs a StyleControllerWidget which is a child of parent, with widget flags set to f...
void setStyle(te::se::Style *style)
Sets a style element to this widget.
A widget used to preview symbol elements.
StyleExplorer * getStyleExplorer() const
A Symbolizer describes how a feature is to appear on a map.
void onDownSymbolizerClicked()
const std::vector< Symbolizer * > & getSymbolizers() const
void removeSymbolizer(std::size_t i)
A widget used to explore a style.
A widget used to explore a style.
A Rule is used to attach property/scale conditions to and group the individual symbols used for rende...
void updateUi()
Updates the widget form based on internal mark element.
void onMapRefreshClicked()
virtual Symbolizer * clone() const =0
It creates a new copy of this object.
te::qt::widgets::StyleExplorer * m_explorer
A style explorer used to explore the style.
void onUpSymbolizerClicked()
void onRemoveSymbolizerClicked()
void onAddSymbolizerClicked()
The Style defines the styling that is to be applied to a geographic dataset (vector geometries or cov...
A widget used to controll the style se element.
void changeLegendIconSize(int size)
~StyleControllerWidget()
Destructor.
std::auto_ptr< Ui::StyleControllerWidgetForm > m_ui
Widget form.