27 #include "../../../geometry/Geometry.h" 
   28 #include "../../../geometry/Utils.h" 
   29 #include "../canvas/Canvas.h" 
   30 #include "../canvas/MapDisplay.h" 
   34 #include <QtGui/QMouseEvent> 
   35 #include <QtGui/QPainter> 
   36 #include <QtGui/QPixmap> 
   41     m_actionCursor(actionCursor)
 
   45   m_pen.setColor(QColor(0, 0, 0));
 
   47   m_brush = QColor(233, 88, 63, 80);
 
   56   if(e->button() != Qt::LeftButton)
 
   62   if(m_actionCursor.shape() != Qt::BlankCursor)
 
   63     m_display->setCursor(m_actionCursor);
 
   73   QPointF p = m_display->transform(e->pos());
 
   75   double w = m_currentExtent.getWidth() * 0.5;
 
   76   double h = m_currentExtent.getHeight() * 0.5;
 
   80   auxExt.
m_llx = p.x() - w;
 
   81   auxExt.
m_lly = p.y() - h;
 
   82   auxExt.
m_urx = p.x() + w;
 
   83   auxExt.
m_ury = p.y() + h;
 
   85   setCurrentExtent(auxExt);
 
   95   emit extentMoved(m_currentExtent);
 
  109   m_display->getDraftPixmap()->fill(QColor(0, 0, 0, 0));
 
  112   canvasInstance.setWindow(mapExt.m_llx, mapExt.m_lly, mapExt.m_urx, mapExt.m_ury);
 
  114   canvasInstance.setPolygonContourColor(m_pen.color().rgba());
 
  115   canvasInstance.setPolygonContourWidth(m_pen.width());
 
  116   canvasInstance.setPolygonFillColor(m_brush.color().rgba());
 
  120   canvasInstance.draw(geom);
 
  122   m_display->repaint();
 
This class implements a concrete tool to pan a user defined extent. 
 
TEGEOMEXPORT Geometry * GetGeomFromEnvelope(const Envelope *const e, int srid)
It creates a Geometry (a polygon) from the given envelope. 
 
bool mouseReleaseEvent(QMouseEvent *e)
 
This class defines an interface for objects that can receive application events and respond to them...
 
QBrush m_brush
The brush used to draw the path. 
 
virtual void setCursor(const QCursor &cursor)
 
bool mouseMoveEvent(QMouseEvent *e)
 
void setCurrentExtent(const te::gm::Envelope &e)
 
double m_lly
Lower left corner y-coordinate. 
 
double m_ury
Upper right corner y-coordinate. 
 
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards. 
 
PanExtent(MapDisplay *display, const QCursor &cursor, const QCursor &actionCursor=Qt::BlankCursor, QObject *parent=0)
It constructs a pan tool associated with the given map display and with the specified cursors...
 
A canvas built on top of Qt. 
 
double m_urx
Upper right corner x-coordinate. 
 
A widget to control the display of a set of layers. 
 
QPen m_pen
The pen used to draw the path. 
 
double m_llx
Lower left corner x-coordinate. 
 
An Envelope defines a 2D rectangular region. 
 
bool mousePressEvent(QMouseEvent *e)