32 #ifndef __TERRALIB_LAYOUT_INTERNAL_MAP_ITEM_H
33 #define __TERRALIB_LAYOUT_INTERNAL_MAP_ITEM_H
36 #include <QGraphicsProxyWidget>
41 #include "../../core/pattern/mvc/ItemObserver.h"
42 #include "../../../qt/widgets/canvas/MultiThreadMapDisplay.h"
43 #include "../../../qt/widgets/layer/explorer/AbstractTreeItem.h"
44 #include "../../../qt/widgets/tools/AbstractTool.h"
45 #include "../../../maptools/AbstractLayer.h"
46 #include "../../core/Config.h"
48 #include "../../../qt/widgets/tools/ZoomWheel.h"
50 class QGraphicsSceneMouseEvent;
98 void setPixmap(
const QPixmap& pixmap );
103 virtual void paint ( QPainter * painter,
const QStyleOptionGraphicsItem* option, QWidget * widget = 0 );
105 virtual void changeCurrentTool(
EnumType* mode);
107 void clearCurrentTool();
119 virtual void changeZoomFactor(
double currentZoomFactor);
124 virtual QRectF boundingRect()
const;
128 void onDrawLayersFinished(
const QMap<QString, QString>& errors);
135 virtual void dropEvent ( QGraphicsSceneDragDropEvent * event );
140 virtual void mouseMoveEvent ( QGraphicsSceneMouseEvent * event );
145 virtual void mousePressEvent ( QGraphicsSceneMouseEvent * event );
150 virtual void mouseReleaseEvent ( QGraphicsSceneMouseEvent * event );
155 virtual void dragEnterEvent ( QGraphicsSceneDragDropEvent * event );
160 virtual void dragLeaveEvent ( QGraphicsSceneDragDropEvent * event );
165 virtual void dragMoveEvent ( QGraphicsSceneDragDropEvent * event );
172 virtual void getMimeData(
const QMimeData* mime);
174 std::list<te::map::AbstractLayerPtr> getVisibleLayers();
180 virtual QImage generateImage();
182 virtual void calculateFrameMargin();
184 virtual void generateMapPixmap();
186 virtual void drawMap(QPainter * painter);
188 virtual void recalculateBoundingRect();
Abstract class to represent an observable. "Model" part of MVC component.
Class responsible for maintaining the drawing context of a MVC component. It is always used by the "M...
te::qt::widgets::ZoomWheel * m_zoomWheel
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
The Properties class represents a persistent set of properties. The Properties can be saved to a file...
An utility struct for representing 2D coordinates.
Abstract class to represent a controller. "Controller" part of MVC component. All classes representin...
te::map::AbstractLayerPtr m_layer
QSize m_mapSize
The size of the map display in a zoom of 100%. This size is in pixels and is calculated based on the ...
te::qt::widgets::AbstractTool * m_tool
te::qt::widgets::AbstractTreeItem * m_treeItem
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
boost::intrusive_ptr< AbstractLayer > AbstractLayerPtr
Abstract class that represents a graphic item. Its coordinate system is the same of scene (millimeter...
Abstract class that represents a graphic item. Its coordinate system is the same of scene (millimeter...
This class is a proxy MapDisplay. This makes it possible to add a MapDisplay as item of a scene...
te::qt::widgets::MultiThreadMapDisplay * m_mapDisplay