22 #include "../../../../geometry/Envelope.h"
25 #include "../../../core/pattern/singleton/Context.h"
28 #include <QtGui/QMouseEvent>
29 #include <QtGui/QPainter>
30 #include <QtGui/QPixmap>
31 #include <QRubberBand>
47 if(e->button() != Qt::LeftButton)
66 m_zoomStarted =
false;
72 m_view->viewport()->setCursor(m_cursor);
74 if(e->button() != Qt::LeftButton)
77 Scene* scne =
dynamic_cast<Scene*
>(m_view->scene());
82 QRect rect = m_rubberBand->geometry().normalized();
87 QPolygonF poly = m_view->mapToScene(rect);
90 QRectF bounding = poly.boundingRect();
96 m_view->fitInView(bounding, Qt::KeepAspectRatio);
bool mouseReleaseEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse release events for ...
bool mouseMoveEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the...
This class implements a concrete tool to geographic pan operation.
bool mouseMoveEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the...
~ViewZoomArea()
Destructor.
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
Class representing the scene. This scene is child of QGraphicsScene, part of Graphics View Framework...
ViewZoomArea(View *view, const QCursor &cursor, QObject *parent=0)
It constructs a zoom area tool associated with the given map display and with the specified cursor...
bool mouseReleaseEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse release events for ...
bool mousePressEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse press events for th...
bool mousePressEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse press events for th...