28 #include "../../../../common/Config.h" 29 #include "../../../../core/translator/Translator.h" 30 #include "../../../../core/logger/Logger.h" 31 #include "../../../../dataaccess/datasource/DataSourceInfoManager.h" 32 #include "../../../af/ApplicationController.h" 33 #include "../../../af/events/ApplicationEvents.h" 34 #include "../../../af/events/LayerEvents.h" 35 #include "../../../widgets/Utils.h" 36 #include "../../../widgets/datasource/core/DataSourceTypeManager.h" 37 #include "../../../widgets/layer/explorer/LayerItem.h" 38 #include "../../../widgets/layer/explorer/LayerItemView.h" 43 #include <boost/functional/factory.hpp> 44 #include <boost/bind.hpp> 48 QModelIndexList& layersIdx)
51 int cS = model->rowCount(parent);
53 for(
int i = 0; i < cS; i++)
55 QModelIndex idx = model->index(i, 0, parent);
60 if(child->
getType() ==
"FOLDER")
62 else if(child->
getType() ==
"LAYER")
65 layersIdx.push_back(idx);
70 std::list<te::map::AbstractLayerPtr>
GetLayers(
const QModelIndexList& lst)
72 std::list<te::map::AbstractLayerPtr> res;
74 for(QModelIndexList::const_iterator it = lst.begin(); it != lst.end(); ++it)
76 QModelIndex idx = *it;
86 te::core::CppPlugin(pluginInfo),
138 std::list<te::map::AbstractLayerPtr> lst =
GetLayers(wls);
void startup()
This method will be called by applications to startup some plugin's functionality.
void updateDelegate(const bool &add)
te::qt::widgets::LayerItemView * m_layerExplorer
Basic information about a plugin.
#define TE_TR(message)
It marks a string in order to get translated.
WMSItemDelegate * m_delegate
static DataSourceTypeManager & getInstance()
It returns a reference to the singleton instance.
Plugin(const te::core::PluginInfo &pluginInfo)
std::list< te::map::AbstractLayerPtr > GetLayers(const QModelIndexList &lst)
#define TERRALIB_PLUGIN_CALL_BACK_IMPL(PLUGIN_CLASS_NAME)
This macro should be used by C++ plugins in order to declare the exportable/callable DLL function...
void GetAllWMSLayers(te::qt::widgets::LayerItemView *view, const QModelIndex &parent, QModelIndexList &layersIdx)
#define TE_LOG_TRACE(message)
Use this tag in order to log a message to the TerraLib default logger with the TRACE level...
void shutdown()
This method will be called by applicatons to shutdown plugin's functionality.
void triggered(te::qt::af::evt::Event *e)