Logo Search packages:      
Sourcecode: qlandkartegt version File versions

IMap Class Reference

#include <IMap.h>

Inheritance diagram for IMap:


List of all members.

Detailed Description

base class to any map render object

Definition at line 40 of file IMap.h.

Public Types

enum  maptype_e { eRaster, eGarmin, eDEM }
enum  overlay_e { eNone, eShading, eContour }

Public Slots

virtual void resize (const QSize &size)
 change visible size of map


void sigChanged ()
void sigResize (const QSize &size)

Public Member Functions

virtual void addOverlayMap (const QString &key)
 add a vector map as overlay map
virtual void config ()
 summon a configuration dialog, dafault does nothing
virtual void convertM2Pt (double &u, double &v)=0
 convert world coordinates [m] into a point on the screen [px]
virtual void convertM2Rad (double &u, double &v)
 convert cartesian coordinates [m] into geo. coordinates [rad]
virtual void convertPt2M (double &u, double &v)=0
 convert a point on the screen [px] to world coordinates [m]
virtual void convertPt2Rad (double &u, double &v)
 convert a point on the screen [px] to geo. coordinates [rad]
virtual void convertRad2M (double &u, double &v)
 convert geo. coordinates [rad] into cartesian coordinates [m]
virtual void convertRad2Pt (double &u, double &v)
 convert geo. coordinates [rad] into a point on the screen [px]
virtual void delOverlayMap (const QString &key)
 remove overlay map by key
virtual void dimensions (double &lon1, double &lat1, double &lon2, double &lat2)=0
 get the top left and bottom right corner
virtual void draw (const QSize &s, bool needsRedraw, QPainter &p)
 draw map as overlay
virtual void draw ()
 just draw map to internal buffer
virtual void draw (QPainter &p)
 draw map
const QImage & getBuffer ()
 get read access to the internally used pixmap buffer
virtual float getElevation (double lon, double lat)
 get the elevation of the given point
virtual bool getFastDrawFlag ()
 return the state of the doFastDraw flag
virtual const QString & getFilename ()
 get the map's filename
const QString & getKey ()
 return the key for registered maps
virtual bool getNeedsRedraw ()
 return the state of the needsRedraw flag
virtual qint16 * getOrigRegion (XY &topLeft, XY &bottomRight, int &width, int &height)
virtual IMapgetOverlay ()
 get pointer to overlay map
char * getProjection ()
 get proj4 compatible projection string
virtual void getRegion (float *buffer, XY topLeft, XY bottomRight, int width, int height)
virtual const QSize & getSize ()
 get size of viewport in [px]
virtual qint32 getZoomLevel ()
 return current zoom level / index
virtual bool hasOverlayMap (const QString &key)
 test if map is used as overlay
 IMap (maptype_e type, const QString &key, CCanvas *parent)
virtual bool isLonLat ()
 return true if the map projection is og long/lat type
virtual void move (const QPoint &old, const QPoint &next)=0
 move the map [px]
virtual void registerDEM (CMapDEM &dem)
 a DEM overlay has to register itself at the map it overlays
virtual void select (IMapSelection &ms, const QRect &rect)
 select map area for export or further processing
virtual void zoom (qint32 &level)=0
 set map to a certain zoom level
virtual void zoom (double lon1, double lat1, double lon2, double lat2)=0
 zoom map to fit area
virtual void zoom (bool zoomIn, const QPoint &p)=0
 zoom map around point [px]

Public Attributes

const maptype_e maptype
 the map type, hast to be set during construction

Static Public Attributes

static double midU = 0
static double midV = 0

Protected Slots

virtual void slotOvlChanged ()
virtual void slotResetFastDraw ()
 called by timerFastDraw to reset doFastDraw flag

Protected Member Functions

virtual void getArea_n_Scaling (XY &p1, XY &p2, float &my_xscale, float &my_yscale)
virtual void getArea_n_Scaling_fromBase (XY &p1, XY &p2, float &my_xscale, float &my_yscale)
virtual void setFastDraw ()

Protected Attributes

QImage buffer
 the internal pixmap buffer to draw a map on
bool doFastDraw
QString filename
QString key
 the key used to register the map
bool needsRedraw
 set true if the content on display has changed (zoom, move)
QPointer< IMapovlMap
PJ * pjsrc
 source projection of the current map file
PJ * pjtar
 target projection
QRect rect
 canvas / viewport rectangle [px]
QSize size
 canvas / viewport size
QTimer * timerFastDraw
qint32 zoomidx
 absolute zoom factor (1...x)

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index