5 #include "../../../core/logger/Logger.h" 6 #include "../../../core/translator/Translator.h" 7 #include "../../../common/Exception.h" 8 #include "../../../common/StringUtils.h" 9 #include "../../../geometry/Envelope.h" 10 #include "../../../maptools/AbstractLayer.h" 11 #include "../../../srs/Config.h" 20 const QColor& bckGround,
int srid,
28 m_bckGround(bckGround),
46 time_t startTime, endTime;
58 double diffInSec = difftime(endTime, startTime);
60 std::string strTime =
TE_TR(
"The layer ");
62 strTime +=
TE_TR(
" has been drawn in ");
64 strTime +=
TE_TR(
" seconds");
81 catch(
const std::exception& e)
83 m_errorMessage = QString(tr(
"The layer") +
" %1 " + tr(
"could not be drawn! Details:") +
" %2").arg(
m_layer->
getTitle().c_str()).arg(e.what());
virtual const std::string & getId() const
It returns the layer id.
This is the base class for layers.
virtual const std::string & getTitle() const
It returns the layer title.
Thread to draw a Layer in a PaintDevice.
virtual const char * what() const
It outputs the exception message.
#define TE_TR(message)
It marks a string in order to get translated.
#define TE_LOG_INFO(message)
Use this tag in order to log a message to the TerraLib default logger with the INFO level...
AlignType
This enum contains values to control the alignment of components (like Canvas and MapDisplay)...
virtual int code() const
It gets the exception code.
An Envelope defines a 2D rectangular region.
This class is designed to declare objects to be thrown as exceptions by TerraLib. ...
virtual void draw(Canvas *canvas, const te::gm::Envelope &bbox, int srid, const double &scale, bool *cancel)=0
It draws the layer geographic objects in the given canvas using the informed SRS. ...
std::string Convert2String(boost::int16_t value)
It converts a short integer value to a string.