27 #include "../../../geometry/Envelope.h" 28 #include "../canvas/MapDisplay.h" 32 #include <QMouseEvent> 46 if(e->button() != Qt::MiddleButton)
50 m_display->setCursor(Qt::ClosedHandCursor);
76 QPainter painter(draft);
77 painter.drawPixmap(0, 0, *result);
79 painter.setOpacity(0.3);
80 painter.drawPixmap(
m_delta, *result);
93 if(e->button() != Qt::RightButton && e->button() != Qt::LeftButton)
96 if(e->button() != Qt::MiddleButton ||
m_delta.isNull())
101 draft->fill(Qt::transparent);
116 QPointF newCenter(oldCenter.x() -
dx, oldCenter.y() - dy);
118 te::gm::Envelope newExtent(newCenter.x() - (width / 2.), newCenter.y() - (height / 2.), newCenter.x() + (width / 2.), newCenter.y() + (height / 2.));
static te::dt::Date dx(2010, 12, 31)
double getWidth() const
It returns the envelope width.
double getY() const
It returns the y-coordinate.
Coord2D getCenter() const
It returns the rectangle's center coordinate.
This class implements a concrete tool to geographic pan operation with mouse middle button...
An Envelope defines a 2D rectangular region.
virtual const te::gm::Envelope & getExtent() const
It returns the world extent showned by the MapDisplay.
double getX() const
It returns the x-coordinate.
double getHeight() const
It returns the envelope height.