28 #include "../../../vp/qt/DissolveDialog.h" 29 #include "../../af/ApplicationController.h" 30 #include "../../af/events/LayerEvents.h" 35 #include <QMessageBox> 44 "vector-processing-dissolve");
45 m_action->setObjectName(
"Processing.Vector Processing.Dissolve");
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(
"Dissolve 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(
"Dissolve 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)
void createAction(std::string name, std::string pixmap="")
Create and set the actions parameters.
std::vector< std::string > getWarnings()
Get warning messages.
void setLayers(std::list< te::map::AbstractLayerPtr > layers)
Set the layer that can be used.
virtual void onActionActivated(bool checked)
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
virtual ~DissolveAction()
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.
DissolveAction(QMenu *menu)
This file defines the Dissolve class.
This is an abstract class used to register actions into vp pluging.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
te::map::AbstractLayerPtr getLayer()
Get the generated layer.