26 #ifndef __TERRALIB_QTWIDGETS_INTERNAL_UTILS_H
27 #define __TERRALIB_QTWIDGETS_INTERNAL_UTILS_H
30 #include "../../color/RGBAColor.h"
31 #include "../../geometry/Enums.h"
32 #include "../../maptools/Enums.h"
37 #include <QtCore/QObject>
38 #include <QtGui/QColor>
39 #include <QtGui/QPixmap>
46 class QTreeWidgetItem;
238 const QColor& fillColor,
const QColor& contourColor,
const std::size_t& contourWidth = 1);
283 #endif // __TERRALIB_QTWIDGETS_INTERNAL_UTILS_H
static const char * sm_pngFmt
TEQTWIDGETSEXPORT void Config2DrawLines(te::map::Canvas *canvas, const QColor &color, const std::size_t &width=1)
It configs (i.e. prepares) the given canvas to draw lines.
#define TEQTWIDGETSEXPORT
You can use this macro in order to export/import classes and functions from this module.
TEQTWIDGETSEXPORT te::color::RGBAColor Convert2TerraLib(const QColor &color)
It converts a Qt Color to TerraLib Color.
static const char * sm_xbmFmt
static const char * sm_unknownFmt
static const char * sm_bmpFmt
A canvas is an abstraction of a drawing area.
TEQTWIDGETSEXPORT QString GetFilePathFromSettings(const QString &typeFile)
Returns the value of the last saved file path for the typeFile required.
Configuration flags for the TerraLib Qt Widgets.
TEQTWIDGETSEXPORT void AddFilePathToSettings(const QString &path, const QString &typeFile)
Save last used path in QSettings.
TEQTWIDGETSEXPORT QAction * FindAction(const QString &actText, QMenu *mnu)
ImageType
This enum specifies the possible input and output image formats supported by the canvas API...
TEQTWIDGETSEXPORT QPixmap CreatePixmapIcon(const int &size, const QColor &penColor, const QColor &brushColor, const int &contourSize)
It creates a pixmap to use as icon (to be used as legend icon).
static const char * sm_xpmFmt
static const char * sm_jpegFmt
TEQTWIDGETSEXPORT void SetChildrenCheckState(QTreeWidgetItem *item, int column, Qt::CheckState state)
It sets the check state for the children of a item.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
GeomType
Each enumerated type is compatible with a Well-known Binary (WKB) type code.
TEQTWIDGETSEXPORT QMenu * GetMenu(const QString &mnuText, QMenu *mnu)
Gets a menu or submenu contained in the mnu object.
const char * GetFormat(te::map::ImageType t)
It returns the file format as a NULL terminated string.
static const char * sm_gifFmt
TEQTWIDGETSEXPORT void Config2DrawPoints(te::map::Canvas *canvas, const QColor &color, const std::size_t &width=1)
It configs (i.e. prepares) the given canvas to draw points.
TEQTWIDGETSEXPORT QColor Convert2Qt(const te::color::RGBAColor &color)
It converts a TerraLib Color to Qt Color.
TEQTWIDGETSEXPORT void Config2DrawLayerSelection(te::map::Canvas *canvas, const QColor &selectionColor, const te::gm::GeomType &type)
It configs (i.e. prepares) the given canvas to draw a layer selection.
TEQTWIDGETSEXPORT void Config2DrawPolygons(te::map::Canvas *canvas, const QColor &fillColor, const QColor &contourColor, const std::size_t &contourWidth=1)
It configs (i.e. prepares) the given canvas to draw polygons.
TEQTWIDGETSEXPORT QMenu * FindMenu(const QString &mnuText, QMenu *mnu)
Finds a menu item in the mnu object.
TEQTWIDGETSEXPORT QImage * GetImage(te::color::RGBAColor **img, int width, int height)
It creates a QImage from an RGBA color array.