27 #include "../../../vp/qt/IdentityDialog.h" 28 #include "../../af/ApplicationController.h" 29 #include "../../af/events/LayerEvents.h" 34 #include <QMessageBox> 43 createAction(tr(
"Identity...").toUtf8().data(),
"vector-processing-identity");
44 m_action->setObjectName(
"Processing.Vector Processing.Identity");
57 if(dlg.exec() != QDialog::Accepted)
67 std::vector<std::string> warnings = dlg.
getWarnings();
72 for(std::size_t w = 0; w < warnings.size(); ++w)
73 details += warnings[w] +
"\n";
76 QMessageBox::Warning, tr(
"Identity Result"),
77 tr(
"The operation was concluded successfully. But it has warning(s). " 78 "Would you like to add the layer to the project?"));
79 question.addButton(QMessageBox::No);
80 question.addButton(QMessageBox::Yes);
81 question.setDetailedText(QString(details.c_str()));
83 reply = question.exec();
87 reply = QMessageBox::question(
88 nullptr, tr(
"Identity Result"),
89 tr(
"The operation was concluded successfully. Would you like to add " 90 "the layer to the project?"),
91 QMessageBox::No, QMessageBox::Yes);
94 if(reply == QMessageBox::Yes)
A dialog used to execute vector identity.
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
void createAction(std::string name, std::string pixmap="")
Create and set the actions parameters.
std::vector< std::string > getWarnings()
te::map::AbstractLayerPtr getLayer()
IdentityAction(QMenu *menu)
virtual void onActionActivated(bool checked)
This file defines the Identity class.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
virtual ~IdentityAction()
void addNewLayer(te::map::AbstractLayerPtr layer)
Add a new layer into layer explorer widget.
QAction * m_action
Action used to call the process.
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.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr