5 #include "../../../../common/GenericQueue.h" 8 #include "../../../../maptools/AbstractLayer.h" 11 #include <QContextMenuEvent> 17 if(acts !=
nullptr && acts->
getSize() == 0 && allActs !=
nullptr && allActs->
getSize() == 0)
20 unsigned int s = (allActs !=
nullptr) ? allActs->
getSize() : 0;
22 for(
unsigned int i = 0; i < s; i++)
23 mnu->addAction(allActs->
getValue(i));
33 for(
unsigned int i = 0; i < s; i++)
98 q->
insert(act, (
unsigned int) pos);
109 switch(event->type())
111 case QEvent::ContextMenu:
113 QContextMenuEvent* evt =
static_cast<QContextMenuEvent*
>(event);
114 QPoint pos = evt->globalPos();
116 int rows =
m_view->model()->rowCount();
117 QModelIndex idx =
m_view->indexAt(
m_view->viewport()->mapFromGlobal(pos));
118 QModelIndexList ls =
m_view->selectionModel()->selectedIndexes();
151 if (item->
getType() ==
"FOLDER")
155 else if (item->
getType() ==
"LAYER")
159 if (!layer->isValid())
163 else if (layer->getSchema()->hasRaster())
167 else if (layer->getSchema()->hasGeom())
171 else if (layer->getType() ==
"DATASETADAPTERLAYER" 172 || layer->getType() ==
"DATASETLAYER" 173 || layer->getType() ==
"QUERYLAYER")
198 return QObject::eventFilter(watched, event);
unsigned int getSize() const
Returns the size of the queue.
Struct that implements the generic queue.
T getValue(const unsigned int &pos) const
Returns the value stored at pos position of the queue.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
Defines a layer item view for Qt5.
void insert(const T &v, const unsigned int &pos)
Inserts a data at a specific position.
void add(const T &v)
Adds an element to the end of the queue.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr