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>
41 m_pen.setColor(QColor(100, 177, 216));
43 m_brush.setColor(QColor(100, 177, 216, 80));
56 if(e->button() != Qt::LeftButton)
61 m_rubberBand =
new QRubberBand(QRubberBand::Rectangle, m_view->viewport());
62 m_rubberBand->setGeometry(QRect(m_origin, QSize()));
75 m_rect = QRect(m_origin, e->pos()).normalized();
79 m_rubberBand->setGeometry(m_rect.toRect());
100 m_rubberBand->hide();
106 m_view->viewport()->setCursor(m_cursor);
108 if(e->button() != Qt::LeftButton || m_origin.isNull())
bool mouseMoveEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse move events for the...
QPen m_pen
The pen used to draw the rubber band shape.
Class representing the view. This view is child of QGraphicsView, part of Graphics View Framework...
~ViewRubberBand()
Destructor.
QBrush m_brush
The brush used to draw the rubber band shape.
bool mouseReleaseEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse release events for ...
ViewRubberBand(View *view, QObject *parent=0)
It constructs a rubber band associated with the given map display and with the specified cursor...
bool mousePressEvent(QMouseEvent *e)
This event handler can be reimplemented in a concrete tool class to receive mouse press events for th...