27 #include "../../../dataaccess/dataset/DataSet.h"
28 #include "../../../dataaccess/dataset/DataSetType.h"
29 #include "../../../dataaccess/utils/Utils.h"
30 #include "../../../maptools/DataSetLayer.h"
31 #include "../../../maptools/RasterLayer.h"
32 #include "../../../se/ChannelSelection.h"
33 #include "../../../se/ColorMap.h"
34 #include "../../../se/CoverageStyle.h"
35 #include "../../../se/RasterSymbolizer.h"
36 #include "../../../se/SelectedChannel.h"
37 #include "../../../se/Utils.h"
41 #include "ui_GroupingDialogForm.h"
45 m_ui(new Ui::GroupingDialogForm),
52 m_ui->m_okPushButton->setEnabled(
false);
56 m_ui->m_helpPushButton->setPageReference(
"widgets/grouping/grouping.html");
65 m_layer = selectedLayer;
66 m_allLayers = allLayers;
68 setWindowTitle(windowTitle() +
" (" + tr(
"Layer") +
":" + selectedLayer->getTitle().c_str() +
")");
71 std::auto_ptr<te::map::LayerSchema> dsType(selectedLayer->getSchema());
75 buildVectorialGroupingInteface();
77 else if(dsType->hasRaster())
79 buildRasterGroupingInteface();
81 if(selectedLayer->getType() ==
"DATASETLAYER")
89 std::auto_ptr<te::da::DataSet> ds = m_layer->getData();
94 m_raster.reset(ds->getRaster(rpos).release());
98 else if(selectedLayer->getType() ==
"RASTERLAYER")
112 if(m_rasterSymb->getColorMap())
114 m_colorMapWidget->
setColorMap(m_rasterSymb->getColorMap());
120 m_colorMapWidget->setColorMap(cm);
126 m_colorMapWidget->setRaster(m_raster.get());
136 m_groupingWidget->setLayers(m_layer, m_allLayers);
138 connect(m_groupingWidget, SIGNAL(applyPushButtonClicked()),
this, SLOT(onApplyClicked()));
141 QGridLayout* layout =
new QGridLayout(m_ui->m_widget);
142 layout->setContentsMargins(0,0,0,0);
143 layout->addWidget(m_groupingWidget);
151 m_colorMapWidget->setLayers(m_layer, m_allLayers);
153 connect(m_colorMapWidget, SIGNAL(applyPushButtonClicked()),
this, SLOT(onApplyClicked()));
156 QGridLayout* layout =
new QGridLayout(m_ui->m_widget);
157 layout->setContentsMargins(0,0,0,0);
158 layout->addWidget(m_colorMapWidget);
167 m_layer->setGrouping(g);
174 m_rasterSymb->setColorMap(cm);
176 std::string band = m_colorMapWidget->getCurrentBand();
203 m_ui->m_okPushButton->setEnabled(
true);
A selected channel to be display.
TESEEXPORT RasterSymbolizer * GetRasterSymbolizer(Style *s)
Try to get raster symbolizer from a style.
te::rst::Raster * getRaster() const
void setGrayChannel(SelectedChannel *c)
A dialog used to build a grouping.
This class contains the parameters needed for grouping the values of a Property.
A layer with reference to a raster.
virtual te::se::Style * getStyle() const
It returns the Style associated to the layer.
void setColorCompositionType(ColorCompositionType cct)
void setColorMap(ColorMap *c)
void setSourceChannelName(const std::string &name)
A layer with reference to a dataset.
TEDATAACCESSEXPORT std::size_t GetFirstPropertyPos(const te::da::DataSet *dataset, int datatype)
SelectedChannel * getGrayChannel() const
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
A ColorMap defines either the colors of a pallette-type raster source or the mapping of numeric pixel...
ChannelSelection specifies the false-color channel selection for a multi-spectral raster source (such...