28 #include "../../../common/Config.h" 29 #include "../../../core/translator/Translator.h" 30 #include "../../../core/logger/Logger.h" 31 #include "../../af/ApplicationController.h" 32 #include "../../af/events/ApplicationEvents.h" 33 #include "../../af/events/LayerEvents.h" 34 #include "../../widgets/layer/explorer/LayerItem.h" 35 #include "../../widgets/layer/explorer/LayerItemView.h" 39 #ifdef TE_QT_PLUGIN_ST_HAVE_SLIDER 43 #ifdef TE_QT_PLUGIN_ST_HAVE_OBSERVATION 47 #ifdef TE_QT_PLUGIN_ST_HAVE_TIMESERIES 51 #ifdef TE_QT_PLUGIN_ST_HAVE_TRAJECTORY 64 int cS = model->rowCount(parent);
66 for(
int i = 0; i < cS; i++)
68 QModelIndex idx = model->index(i, 0, parent);
73 if(child->
getType() ==
"FOLDER")
75 else if(child->
getType() ==
"LAYER")
79 bool isSTLayer = (l->getType() ==
"TRAJECTORYDATASETLAYER" ||
80 l->getType() ==
"OBSERVATIONDATASETLAYER" ||
81 l->getType() ==
"TIMESERIESDATASETLAYER");
84 layersIdx.push_back(idx);
90 std::list<te::map::AbstractLayerPtr>
GetLayers(
const QModelIndexList& lst)
92 std::list<te::map::AbstractLayerPtr> res;
94 for(QModelIndexList::const_iterator it = lst.begin(); it != lst.end(); ++it)
96 QModelIndex idx = *it;
105 :
te::core::CppPlugin(pluginInfo), m_stMenu(0), m_delegate(0)
122 m_stMenu =
new QMenu(
"Project.Add Layer.Add Temporal Layer");
124 m_stMenu->setTitle(tr(
"Add Temporal Layer"));
161 QModelIndexList stls;
174 std::list<te::map::AbstractLayerPtr> ls =
GetLayers(stls);
187 #ifdef TE_QT_PLUGIN_ST_HAVE_SLIDER 192 #ifdef TE_QT_PLUGIN_ST_HAVE_OBSERVATION 197 #ifdef TE_QT_PLUGIN_ST_HAVE_TIMESERIES 202 #ifdef TE_QT_PLUGIN_ST_HAVE_TRAJECTORY 210 #ifdef TE_QT_PLUGIN_ST_HAVE_SLIDER 214 #ifdef TE_QT_PLUGIN_ST_HAVE_OBSERVATION 218 #ifdef TE_QT_PLUGIN_ST_HAVE_TIMESERIES 222 #ifdef TE_QT_PLUGIN_ST_HAVE_TRAJECTORY void updateDelegate(const bool &add)
te::qt::plugins::st::TimeSeriesAction * m_timeSeriesAction
TimeSeries Layer Action.
This file defines the TimeSeriers Action class.
te::qt::plugins::st::TrajectoryAction * m_trajectoryAction
Trajectory Layer Action.
This class register the time series action into the St plugin.
A base class for application events.
QList< QAction * > m_actions
te::qt::widgets::LayerItemView * m_layerExplorer
Basic information about a plugin.
#define TE_TR(message)
It marks a string in order to get translated.
te::qt::plugins::st::ObservationAction * m_observactionAction
Observation Layer Action.
void startup()
This method will be called by applications to startup some plugin's functionality.
Plugin implementation for the ST Qt Plugin widget.
te::qt::plugins::st::TimeSliderWidgetAction * m_sliderAction
Slider Process Action.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
void shutdown()
This method will be called by applicatons to shutdown plugin's functionality.
std::list< te::map::AbstractLayerPtr > GetLayers(const QModelIndexList &lst)
QMenu * m_stMenu
ST Main Menu registered.
void GetAllSTLayers(te::qt::widgets::LayerItemView *view, const QModelIndex &parent, QModelIndexList &layersIdx)
Plugin(const te::core::PluginInfo &pluginInfo)
#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...
This class register the observation action into the St plugin.
void unRegisterActions()
Function used to unregister all raster processing actions.
void triggered(te::qt::af::evt::Event *e)
#define TE_LOG_TRACE(message)
Use this tag in order to log a message to the TerraLib default logger with the TRACE level...
This file defines the Trajectory Action class.
void registerActions()
Function used to register all raster processing actions.
STItemDelegate * m_delegate
Item delegate.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr