27 #include "../../af/events/LayerEvents.h"
28 #include "../../af/ApplicationController.h"
29 #include "../../af/Project.h"
37 m_popupMenu(popupMenu),
56 m_action =
new QAction(m_menu);
58 m_action->setText(name.c_str());
60 if(pixmap.empty() ==
false)
61 m_action->setIcon(QIcon::fromTheme(pixmap.c_str()));
63 connect(m_action, SIGNAL(triggered(
bool)),
this, SLOT(onActionActivated(
bool)));
65 m_menu->addAction(m_action);
72 m_popupAction =
new QAction(m_popupMenu);
74 m_popupAction->setText(name.c_str());
76 if(pixmap.empty() ==
false)
77 m_popupAction->setIcon(QIcon::fromTheme(pixmap.c_str()));
79 connect(m_popupAction, SIGNAL(triggered(
bool)),
this, SLOT(onPopUpActionActivated(
bool)));
81 m_popupMenu->addAction(m_popupAction);
101 std::auto_ptr<te::da::DataSetType> dsType = evt.
m_layer->getSchema();
103 if(dsType.get() && dsType->hasRaster())
112 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.
void createPopUpAction(std::string name, std::string pixmap="")
Create and set the actions parameters.
This file defines the abstract class AbstractAction.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
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.
std::list< te::map::AbstractLayerPtr > getSingleLayers(bool invalid=true)
It gets all the single layers of the project.
virtual void onPopUpActionActivated(bool checked)
Slot function used when a action was selected from layer pop up.
virtual ~AbstractAction()
Destructor.
AbstractAction(QMenu *menu, QMenu *popupMenu)
Constructor.
This class models the concept of a project for the TerraLib Application Framework.
void addNewLayer(te::map::AbstractLayerPtr layer)
Add a new layer into layer explorer widget.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
std::list< te::map::AbstractLayerPtr > getLayers()
Get the list of layers from app.