27 #include "../../af/events/LayerEvents.h"
28 #include "../../af/ApplicationController.h"
29 #include "../../af/Project.h"
47 m_action =
new QAction(m_menu);
49 m_action->setText(name.c_str());
51 if(pixmap.empty() ==
false)
52 m_action->setIcon(QIcon::fromTheme(pixmap.c_str()));
54 connect(m_action, SIGNAL(triggered(
bool)),
this, SLOT(onActionActivated(
bool)));
56 m_menu->addAction(m_action);
76 std::auto_ptr<te::da::DataSetType> dsType = evt.
m_layer->getSchema();
78 if(dsType.get() && dsType->hasRaster())
87 std::list<te::map::AbstractLayerPtr> list;
This event signals that a new layer was created.
te::map::AbstractLayerPtr m_layer
Layer selected.
This event is used to get a single layer selected in layer tree.
virtual ~AbstractAction()
Destructor.
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.
void addNewLayer(te::map::AbstractLayerPtr layer)
Add a new layer into layer explorer widget.
std::list< te::map::AbstractLayerPtr > getAllLayers(bool invalid=true)
It gets all the layers (single and folder layers) of the project.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
AbstractAction(QMenu *menu)
Constructor.
This class models the concept of a project for the TerraLib Application Framework.
std::list< te::map::AbstractLayerPtr > getLayers()
Get the list of layers from app.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr