27 #include "../../../vp/qt/GeometricOpDialog.h" 28 #include "../../af/ApplicationController.h" 29 #include "../../af/events/LayerEvents.h" 34 #include <QMessageBox> 42 createAction(tr(
"Geometric Operation...").toUtf8().data(),
"vector-processing-geometric-op");
43 m_action->setObjectName(
"Processing.Vector Processing.Gometric Operation");
55 if(dlg.exec() != QDialog::Accepted)
58 std::vector<te::map::AbstractLayerPtr> layers = dlg.
getOutLayer();
63 int reply = QMessageBox::question(
nullptr, tr(
"Geometric Operation"), tr(
"The operation was concluded successfully. Would you like to add the layer to the project?"), QMessageBox::No, QMessageBox::Yes);
65 if(reply == QMessageBox::Yes)
67 for(std::size_t i = 0; i < layers.size(); ++i)
std::vector< te::map::AbstractLayerPtr > getOutLayer()
void createAction(std::string name, std::string pixmap="")
Create and set the actions parameters.
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
void addNewLayer(te::map::AbstractLayerPtr layer)
Add a new layer into layer explorer widget.
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.
This is an abstract class used to register actions into vp pluging.
virtual ~GeometricOpAction()
This class is GUI used to define the wizard for the VP geometric operation.
GeometricOpAction(QMenu *menu)