Logo Search packages:      
Sourcecode: qlandkartegt version File versions

CMapQMAP Class Reference

#include <CMapQMAP.h>

Inheritance diagram for CMapQMAP:

IMap

List of all members.


Detailed Description

Render object for a GeoTiff raster map set.

The life of this object is tied to the lifetime of the map definition. If you want to load a new mapdefinition you have to create a new CMapQMAP instance.

Definition at line 45 of file CMapQMAP.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

Signals

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

Public Member Functions

virtual void addOverlayMap (const QString &key)
 add a vector map as overlay map
 CMapQMAP (const QString &key, const QString &filename, CCanvas *parent)
virtual void config ()
 summon a configuration dialog, dafault does nothing
void convertM2Pt (double &u, double &v)
 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]
void convertPt2M (double &u, double &v)
 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
void dimensions (double &lon1, double &lat1, double &lon2, double &lat2)
 get the top left and bottom right corner
virtual void draw (const QSize &s, bool needsRedraw, QPainter &p)
 draw map as overlay
void draw ()
 just draw map to internal buffer
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]
qint32 getZoomLevel ()
 return current zoom level / index
virtual bool hasOverlayMap (const QString &key)
 test if map is used as overlay
virtual bool isLonLat ()
 return true if the map projection is og long/lat type
void move (const QPoint &old, const QPoint &next)
 move the map [px]
virtual void registerDEM (CMapDEM &dem)
 a DEM overlay has to register itself at the map it overlays
void select (IMapSelection &ms, const QRect &rect)
 select map area for export or further processing
void zoom (qint32 &level)
 set map to a certain zoom level
void zoom (double lon1, double lat1, double lon2, double lat2)
 zoom map to fit area
void zoom (bool zoomIn, const QPoint &p)
 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_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)

Private Member Functions

void __test ()
void getArea_n_Scaling (XY &p1, XY &p2, float &my_xscale, float &my_yscale)

Private Attributes

XY bottomRight
 top bottom right as long / lat [rad]
QString exportPath
bool foundMap
QVector< CMapLevel * > maplevels
QPointer< CMapLevelpMaplevel
bool quadraticZoom
XY topLeft
 top left corner as long / lat [rad]
float zoomFactor

Friends

class CExportMapThread

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

Generated by  Doxygen 1.6.0   Back to index