27 #include "../../../BuildConfig.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>
74 m_multipart2singlepart(0),
95 m_vpMenu =
new QMenu(pluginMenu);
96 m_vpMenu->setIcon(QIcon::fromTheme(
"vp-vectorprocessing-icon"));
101 pluginMenu->insertMenu(pluginsSeparator, m_vpMenu);
103 m_vpMenu->setTitle(
TE_TR(
"Vector Processing"));
110 path +=
"/log/terralib_vp.log";
112 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
113 std::string layout =
"%d{ISO8601} [%t] %-5p %c - %m%n";
114 log4cxx::LogString lString(layout.begin(), layout.end());
116 log4cxx::FileAppender* fileAppender =
new log4cxx::RollingFileAppender(log4cxx::LayoutPtr(
new log4cxx::PatternLayout(lString)),
119 log4cxx::helpers::Pool p;
120 fileAppender->activateOptions(p);
122 log4cxx::BasicConfigurator::configure(log4cxx::AppenderPtr(fileAppender));
123 log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getDebug());
125 log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(
"vp");
126 logger->setAdditivity(
false);
127 logger->addAppender(fileAppender);
130 m_initialized =
true;
144 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
145 log4cxx::LogManager::shutdown();
150 m_initialized =
false;
176 delete m_aggregation;
178 delete m_geometricOp;
179 delete m_intersection;
180 delete m_multipart2singlepart;
181 delete m_lineToPolygon;
182 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.