21 #include "../../../se/ColorMap.h"
22 #include "../../../se/RasterSymbolizer.h"
23 #include "../../../se/Utils.h"
24 #include "../../widgets/layer/explorer/AbstractTreeItem.h"
25 #include "../../widgets/layer/explorer/LayerExplorer.h"
26 #include "../../widgets/layer/explorer/LayerTreeModel.h"
27 #include "../../widgets/layer/explorer/LayerTreeView.h"
28 #include "../../widgets/layer/explorer/LegendItem.h"
29 #include "../events/Event.h"
30 #include "../events/ProjectEvents.h"
31 #include "../events/LayerEvents.h"
32 #include "../ApplicationController.h"
33 #include "../Project.h"
59 for(std::list<te::qt::widgets::AbstractTreeItem*>::const_iterator it = layers.begin(); it != layers.end(); ++it)
63 m_explorer->remove(*it);
86 if(projectAdded == 0 || projectAdded->
m_proj == 0)
105 m_explorer->add(e->
m_layer, parentItem);
108 m_explorer->expand(parentItem);
142 m_explorer->collapse(parentItem);
149 parentLayer->setChart(0);
154 parentLayer->setGrouping(0);
167 m_explorer->remove(item);
188 m_explorer->getTreeView()->remove(e->
m_action);
196 std::list<te::map::AbstractLayerPtr> list = m_explorer->getSelectedSingleLayers();
198 if(list.empty() ==
false)
210 if(selectedLayers.empty())
215 std::list<te::map::AbstractLayerPtr>::const_iterator it;
216 for(it = selectedLayers.begin(); it != selectedLayers.end(); ++it)
LayerExplorer(te::qt::widgets::LayerExplorer *explorer, QObject *parent=0)
Constructor.
A connector for the te::qt::widgets::LayerExplorer class to the Application Framework.
This event signals that a new layer was created.
te::map::AbstractLayerPtr m_layer
Layer selected.
This event is used to get a single layer selected in layer tree.
void onLayerVisibilityChanged(te::map::AbstractLayerPtr layer)
void add(const te::map::AbstractLayerPtr &layer, const te::map::AbstractLayerPtr &parentLayer=te::map::AbstractLayerPtr())
It adds the specified layer to the list of layers of the parent layer. If the parent layer is not spe...
This is the base class for layers.
It indicates that a new project was created.
Project * m_proj
Pointer to the new project.
A base class for application events.
TESEEXPORT RasterSymbolizer * GetRasterSymbolizer(Style *s)
Try to get raster symbolizer from a style.
This event indicates that the layer style was selected on the layer explorer.
void removeLayers(const std::list< te::qt::widgets::AbstractTreeItem * > &items)
const std::list< te::map::AbstractLayerPtr > & getTopLayers() const
It gets all the top layers of the project (folder and single layers).
This event indicates that the layer has been selected.
te::map::AbstractLayerPtr m_parentLayer
The parent layer where the layer will be added.
void onLayerOrderChanged()
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
This event signals that the layer visibility has changed.
void setTopLayers(const std::list< te::map::AbstractLayerPtr > &layers)
It sets the top layers of the project.
The RasterSymbolizer describes how to render raster/matrix-coverage data (e.g., satellite photos...
void onTreeItemDoubleClicked(te::qt::widgets::AbstractTreeItem *item)
This event signals that a item belonging to a layer will be removed from the layer explorer...
void onApplicationTriggered(te::qt::af::evt::Event *evt)
Listener to the application framewrork events.
~LayerExplorer()
Destructor.
It indicates that the project has unsaved changes.
void broadcast(te::qt::af::evt::Event *evt)
Send events in broadcast for all registered components.
te::qt::widgets::LayerExplorer * getExplorer() const
te::qt::af::Project * getProject()
Get the current project.
void setSelectedLayers(const std::list< te::map::AbstractLayerPtr > &selectedLayers)
It sets all the layers that are selected.
void setColorMap(ColorMap *c)
This event signals that a layer is to be removed from the layer explorer.
te::map::AbstractLayerPtr m_layer
Tha layer to be added.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::qt::widgets::AbstractTreeItem * m_item
Item of the layer to be removed.
void onSelectedLayersChanged(const std::list< te::map::AbstractLayerPtr > &selectedLayers)
It indicates whenever there are changes in the selection of layers in the layer explorer.
te::qt::widgets::LayerExplorer * m_explorer
Pointer to a component te::qt::widgets::LayerExplorer.
void remove(const te::map::AbstractLayerPtr &layer)
It removes the specified layer from the project.