22 #include "../../../../geometry/Envelope.h"
25 #include "../../../core/pattern/singleton/Context.h"
28 #include <QtGui/QMouseEvent>
29 #include <QtGui/QPainter>
30 #include <QtGui/QPixmap>
34 m_zoomFactor(zoomFactor),
57 Scene* scne =
dynamic_cast<Scene*
>(m_view->scene());
65 QPointF pt = m_view->mapToScene(point.toPoint());
68 double factor = m_view->previousFactor(currentZoomFactor);
73 m_view->changeZoomFactor(factor);
ViewZoom(View *view, const double &zoomFactor=2.0, const ViewZoomType &type=TypeIn, QObject *parent=0)
It constructs a zoom associated with the given map display.
virtual ~ViewZoom()
Destructor.
void setZoomType(const ViewZoomType &type)
Sets the zoom operation type.
static Context & getInstance()
It returns a reference to the singleton instance.
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
void applyZoom(const QPointF &point=QPointF())
Performs the zoom operation on map display, considering the zoom factor, zoom type and the given poin...
Class representing the scene. This scene is child of QGraphicsScene, part of Graphics View Framework...
ViewZoomType
Defines the zoom type.
double getZoomFactor()
Returns current zoom factor. Ex.: 0.5 (50%)