27 #include "../../../vp/qt/GeometricOpWizard.h"
28 #include "../../af/ApplicationController.h"
29 #include "../../af/events/LayerEvents.h"
30 #include "../../af/Project.h"
35 #include <QMessageBox>
43 createAction(tr(
"Geometric Operation...").toStdString(),
"vector-processing-geometric-op");
44 m_action->setObjectName(
"Processing.Vector Processing.Gometric Operation");
55 std::list<te::map::AbstractLayerPtr> layersList = getLayers();
59 if(dlg.exec() != QDialog::Accepted)
62 std::vector<te::map::AbstractLayerPtr> layers = dlg.
getOutLayer();
67 int reply = QMessageBox::question(0, tr(
"Geometric Operation"), tr(
"The operation was concluded successfully. Would you like to add the layer to the project?"), QMessageBox::No, QMessageBox::Yes);
69 if(reply == QMessageBox::Yes)
71 for(std::size_t i = 0; i < layers.size(); ++i)
This event signals that a new layer was created.
void setList(std::list< te::map::AbstractLayerPtr > &layerList)
void createAction(std::string name, std::string pixmap="")
Create and set the actions parameters.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
QAction * m_action
Action used to call the process.
std::vector< te::map::AbstractLayerPtr > getOutLayer()
virtual void onActionActivated(bool checked)
This class is GUI used to define the wizard for the VP geometric operation.
This is an abstract class used to register actions into vp pluging.
virtual ~GeometricOpAction()
GeometricOpAction(QMenu *menu)