27 #include "terralib_config.h"
28 #include "../../../common/Config.h"
29 #include "../../../common/Translator.h"
30 #include "../../../common/Logger.h"
31 #include "../../af/ApplicationController.h"
32 #include "../../af/Utils.h"
44 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
46 #include <log4cxx/basicconfigurator.h>
47 #include <log4cxx/consoleappender.h>
48 #include <log4cxx/fileappender.h>
49 #include <log4cxx/helpers/pool.h>
50 #include <log4cxx/helpers/transcoder.h>
51 #include <log4cxx/logger.h>
52 #include <log4cxx/logmanager.h>
53 #include <log4cxx/logstring.h>
54 #include <log4cxx/patternlayout.h>
55 #include <log4cxx/rollingfileappender.h>
67 : te::plugin::
Plugin(pluginInfo), m_vpMenu(0)
87 m_vpMenu =
new QMenu(pluginMenu);
88 m_vpMenu->setIcon(QIcon::fromTheme(
"vp-vectorprocessing-icon"));
93 pluginMenu->insertMenu(pluginsSeparator, m_vpMenu);
95 m_vpMenu->setTitle(
TE_TR(
"Vector Processing"));
102 path +=
"/log/terralib_vp.log";
104 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
105 std::string layout =
"%d{ISO8601} [%t] %-5p %c - %m%n";
106 log4cxx::LogString lString(layout.begin(), layout.end());
108 log4cxx::FileAppender* fileAppender =
new log4cxx::RollingFileAppender(log4cxx::LayoutPtr(
new log4cxx::PatternLayout(lString)),
111 log4cxx::helpers::Pool p;
112 fileAppender->activateOptions(p);
114 log4cxx::BasicConfigurator::configure(log4cxx::AppenderPtr(fileAppender));
115 log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getDebug());
117 log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(
"vp");
118 logger->setAdditivity(
false);
119 logger->addAppender(fileAppender);
122 m_initialized =
true;
136 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
137 log4cxx::LogManager::shutdown();
142 m_initialized =
false;
168 delete m_aggregation;
170 delete m_geometricOp;
171 delete m_intersection;
172 delete m_multipart2singlepart;
173 delete m_lineToPolygon;
174 delete m_polygonToLine;
#define TE_LOG_TRACE(msg)
Use this tag in order to log a message to a specified logger with the TRACE level.
This class register the contrast action into VP Plugin.
This class register the contrast action into VP Plugin.
This file defines the Aggregation class.
#define TE_TR(message)
It marks a string in order to get translated.
This file defines the PolygonToLine class.
This file defines the Aggregation class.
Plugin implementation for the VP Qt Plugin widget.
This file defines the LineToPolygon class.
#define PLUGIN_CALL_BACK_IMPL(PLUGIN_CLASS_NAME)
This macro should be used by C++ plugins in order to declare the exportable/callable DLL function...
Plugin(const te::plugin::PluginInfo &pluginInfo)
TEQTAFEXPORT void AddActionToCustomToolbars(QAction *act)
Check QSettings for existance of act and adds it if necessary.
void shutdown()
Do nothing! Just set plugin as stopped.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
This class register the contrast action into VP Plugin.
This file defines the Buffer class.
This class register the contrast action into VP Plugin.
bool decode(std::string &s)
Decode the pct-encoded (hex) sequences, if any, return success.
void registerActions()
Function used to register all raster processing actions.
This class register the contrast action into VP Plugin.
This class register the contrast action into VP Plugin.
~Plugin()
Virtual destructor.
This file defines the Intersection class.
The basic information about a plugin.
void unRegisterActions()
Function used to unregister all raster processing actions.
void startup()
Do nothing! Just set plugin as started.