27 #include "../../../../common/Config.h" 28 #include "../../../../core/translator/Translator.h" 29 #include "../../../../core/logger/Logger.h" 30 #include "../../../../dataaccess/datasource/DataSourceInfoManager.h" 31 #include "../../../../maptools/AbstractLayer.h" 32 #include "../../../af/ApplicationController.h" 33 #include "../../../af/events/ApplicationEvents.h" 34 #include "../../../af/events/LayerEvents.h" 35 #include "../../../widgets/datasource/core/DataSourceTypeManager.h" 36 #include "../../../widgets/layer/explorer/LayerItem.h" 37 #include "../../../widgets/layer/explorer/LayerItemView.h" 41 #include "../../../../wfs/Utils.h" 44 QModelIndexList& layersIdx)
47 int cS = model->rowCount(parent);
49 for(
int i = 0; i < cS; i++)
51 QModelIndex idx = model->index(i, 0, parent);
56 if(child->
getType() ==
"FOLDER")
58 else if(child->
getType() ==
"LAYER")
61 layersIdx.push_back(idx);
66 std::list<te::map::AbstractLayerPtr>
GetLayers(
const QModelIndexList& lst)
68 std::list<te::map::AbstractLayerPtr> res;
70 for(QModelIndexList::const_iterator it = lst.begin(); it != lst.end(); ++it)
72 QModelIndex idx = *it;
81 :
te::core::CppPlugin(pluginInfo), m_delegate(nullptr)
108 TE_LOG_TRACE(
TE_TR(
"TerraLib Qt OGC Web Feature Service (WFS) widget shutdown!"));
127 std::list<te::map::AbstractLayerPtr> lst =
GetLayers(wls);
WFSItemDelegate * m_delegate
Plugin(const te::core::PluginInfo &pluginInfo)
te::qt::widgets::LayerItemView * m_layerExplorer
void GetAllWFSLayers(te::qt::widgets::LayerItemView *view, const QModelIndex &parent, QModelIndexList &layersIdx)
Basic information about a plugin.
#define TE_TR(message)
It marks a string in order to get translated.
std::list< te::map::AbstractLayerPtr > GetLayers(const QModelIndexList &lst)
void updateDelegate(const bool &add)
static DataSourceTypeManager & getInstance()
It returns a reference to the singleton instance.
void triggered(te::qt::af::evt::Event *e)
Plugin implementation for the OGC Web Feature Service (WFS) data source widget.
#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 startup()
This method will be called by applications to startup some plugin's functionality.
#define TE_LOG_TRACE(message)
Use this tag in order to log a message to the TerraLib default logger with the TRACE level...
TEWFSEXPORT bool IsWFSLayer(const te::map::AbstractLayer &layer)
void shutdown()
This method will be called by applicatons to shutdown plugin's functionality.