27 #include "../../../qt/widgets/rp/CloudDetectionDialog.h" 28 #include "../../af/ApplicationController.h" 29 #include "../../af/BaseApplication.h" 30 #include "../../af/events/LayerEvents.h" 35 #include <QMessageBox> 36 #include <QActionGroup> 43 createAction(tr(
"Cloud Detection...").toUtf8().data(),
"cloudDetection");
44 m_action->setObjectName(
"Processing.Raster Processing.Cloud Detection");
74 assert(mapEditionTools);
76 m_dlg->setMapDisplay(ba->getMapDisplay());
77 m_dlg->setActionGroup(mapEditionTools);
79 m_dlg->setModal(
false);
106 std::list<te::map::AbstractLayerPtr> layers = e.
m_layers;
112 std::list<te::map::AbstractLayerPtr> result;
114 result.push_back(selectedlayer);
116 for (std::list<te::map::AbstractLayerPtr>::iterator it = layers.begin(); it != layers.end(); ++it)
118 if ((*it)->getId() != selectedlayer->getId())
119 result.push_back(*it);
127 m_dlg.reset(
nullptr);
This event signals that a new layer was created.
This is an abstract class used to register actions into rp pluging.
te::map::AbstractLayerPtr m_layer
Layer selected.
This event is used to get a single layer selected in layer tree.
CloudDetectionAction(QMenu *menu, QMenu *popupMenu)
void addLayer(te::map::AbstractLayerPtr outputLayer)
void addNewLayer(te::map::AbstractLayerPtr layer)
Add a new layer into layer explorer widget.
std::unique_ptr< te::qt::widgets::CloudDetectionDialog > m_dlg
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
void createAction(std::string name, std::string pixmap="")
Create and set the actions parameters.
te::map::AbstractLayerPtr getCurrentLayer()
Get the selected layer from layer explorer in app.
QAction * m_action
Action used to call the process.
virtual void onActionActivated(bool checked)
std::list< te::map::AbstractLayerPtr > getLayers()
Get the list of layers from app.
void triggered(te::qt::af::evt::Event *e)
virtual ~CloudDetectionAction()
std::list< te::map::AbstractLayerPtr > m_layers
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr