27 #include "../../../geometry/Coord2D.h"
28 #include "../../../geometry/Envelope.h"
29 #include "../canvas/MapDisplay.h"
34 m_zoomFactor(zoomFactor),
56 double factor = m_zoomFactor;
65 double w = currentExtent.
getWidth() * factor * 0.5;
66 double h = currentExtent.
getHeight() * factor * 0.5;
71 m_display->setExtent(e);
bool isValid() const
It tells if the rectangle is valid or not.
double getWidth() const
It returns the envelope width.
This class defines an interface for objects that can receive application events and respond to them...
double getHeight() const
It returns the envelope height.
Zoom(MapDisplay *display, const double &zoomFactor=2.0, const ZoomType &type=In, QObject *parent=0)
It constructs a zoom associated with the given map display.
An utility struct for representing 2D coordinates.
void applyZoom(const QPointF &point=QPointF())
Performs the zoom operation on map display, considering the zoom factor, zoom type and the given poin...
void setZoomType(const ZoomType &type)
Sets the zoom operation type.
This is a utility class to geographic zoom operation.
virtual ~Zoom()
Destructor.
A widget to control the display of a set of layers.
ZoomType
Defines the zoom type.
Coord2D getCenter() const
It returns the rectangle's center coordinate.
An Envelope defines a 2D rectangular region.