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/events/LayerEvents.h"
33 #include "../../af/Utils.h"
39 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
41 #include <log4cxx/basicconfigurator.h>
42 #include <log4cxx/consoleappender.h>
43 #include <log4cxx/fileappender.h>
44 #include <log4cxx/helpers/pool.h>
45 #include <log4cxx/helpers/transcoder.h>
46 #include <log4cxx/logger.h>
47 #include <log4cxx/logmanager.h>
48 #include <log4cxx/logstring.h>
49 #include <log4cxx/patternlayout.h>
50 #include <log4cxx/rollingfileappender.h>
51 #include <log4cxx/simplelayout.h>
61 m_attributefillMenu(0),
82 m_attributefillMenu =
new QMenu(pluginMenu);
83 m_attributefillMenu->setIcon(QIcon::fromTheme(
"attributefill-icon"));
88 pluginMenu->insertMenu(pluginsSeparator, m_attributefillMenu);
90 m_attributefillMenu->setTitle(
TE_TR(
"Attribute Fill"));
96 m_popupAction =
new QAction(m_attributefillMenu);
97 m_popupAction->setText(
TE_TR(
"Attribute Fill"));
101 path +=
"/log/terralib_attributefill.log";
103 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
104 std::string layout =
"%d{ISO8601} [%t] %-5p %c - %m%n";
105 log4cxx::LogString lString(layout.begin(), layout.end());
107 log4cxx::FileAppender* fileAppender =
new log4cxx::RollingFileAppender(log4cxx::LayoutPtr(
new log4cxx::PatternLayout(lString)),
110 log4cxx::helpers::Pool p;
111 fileAppender->activateOptions(p);
113 log4cxx::BasicConfigurator::configure(log4cxx::AppenderPtr(fileAppender));
114 log4cxx::Logger::getRootLogger()->setLevel(log4cxx::Level::getDebug());
116 log4cxx::LoggerPtr logger = log4cxx::Logger::getLogger(
"attributefill");
117 logger->setAdditivity(
false);
118 logger->addAppender(fileAppender);
125 m_initialized =
true;
134 delete m_attributefillMenu;
139 #if defined(TERRALIB_APACHE_LOG4CXX_ENABLED) && defined(TERRALIB_LOGGER_ENABLED)
140 log4cxx::LogManager::shutdown();
145 m_initialized =
false;
157 delete m_rasterToVector;
158 delete m_vectorToRaster;
#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 Attribute Fill Plugin.
This file defines the RasterToVector class.
#define TE_TR(message)
It marks a string in order to get translated.
void registerActions()
Function used to register all attributefill actions.
#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()
Virtual destructor.
This file defines the VectorToRaster class.
TEQTAFEXPORT void AddActionToCustomToolbars(QAction *act)
Check QSettings for existance of act and adds it if necessary.
static ApplicationController & getInstance()
It returns a reference to the singleton instance.
Plugin(const te::plugin::PluginInfo &pluginInfo)
void unRegisterActions()
Function used to unregister all attributefill actions.
This class register the contrast action into Attribute Fill Plugin.
void shutdown()
Do nothing! Just set plugin as stopped.
This class register the contrast action into Attribute Fill Plugin.
bool decode(std::string &s)
Decode the pct-encoded (hex) sequences, if any, return success.
Plugin implementation for the SA Qt Plugin widget.
This file defines the RasterToVector class.
The basic information about a plugin.
void startup()
Do nothing! Just set plugin as started.