Map Class Reference

[Kflog Index] [Kflog Hierarchy] [Headers]


This class provides basic functions for displaying the flight data More...

#include <map.h>

Inherits: QWidget (qt)

Public Members

Public Slots

Protected Members

Private Members


Detailed Description

This class provides basic functions for displaying the flight data.


Map(QWidget* parent=0,KFLogApp* main=0) [public]

constructor

~Map() [public]

destructor

void setScale(int newScale = 0) [public]

changing the scale and redraw the map

void setProjection(const char* procType) [public]

set the type of projection either to "Lambert" or to "Mercator"

bool isLambert() [public]

returns TRUE, if current projectiontype ist Lambert

bool isMercator() [public]

returns TRUE, if current projectiontype ist Mercator

double numToRad(long internal) [public]

Convert internal representation to radians.

long radToNum(double radial) [public]

Convert radians into internal data.

long calc_X_Y() [public]

Calculates the coordinates for drawing.

double calc_X_Lambert(double latitude, double longitude) [public]

Returns the x-coordinate for the Lambert-projection

double calc_Y_Lambert(double latitude, double longitude) [public]

Returns the y-coordinate for the Lambert-projection

double calc_X_Mercator(double latitude, double longitude) [public]

Returns the x-coordinates for the Mercator-projection.

double calc_Y_Mercator(double latitude, double longitude) [public]

Returns the y-coordinates for the Mercator-projection.

Note: We return negative values, because the the point (0/0) is the upper left corner of the painter. Therefore we must mirror the coordinates.

double deg(double rad) [public]

Converts radians to degree.

double rad(double deg) [public]

Converts degree to radians.

void pointList(QPainter* painter) [public]

Returns the pointlist

QPoint _current[private]

Coordinates of the current mouse-position, needed to show in the status bar

QPixmap _buffer[private]

The QPainter in wich the map will be drawn. This painter is about the same size as the map-widget, but only used for internal buffering the map. Whenever the widget ist about to be drawn, this buffer is used to get the content.

KFLogApp *app[private]

Pointer to the current main window

int scale[private]

The (internal) scale for the map. This value has nothing in common with the scale of a normal map. It determines a factor with wich the drawn map will be expanded.

long mapCenterLat[private]

The mapCenter is position displayed in the center of the map. It is used in two different ways: 1.: Determine the area shown in the map-widget 2.: Calculating the differenz in latitude between a point in the map and the center.

bool isEnabled[private]

Enables drawing of the map. Used to guarantee, that the map will only be drawn, if the widget is already build. Otherwise, the map would be drawn twice when opening a window!

double mercatorScale[private]

The earth's radius used for calculation.

double v1[private]

standard parallels for conical projection

double v2[private]

The second standard parallel. It doesn't matter which one is which.

char* projectionType[private]

contains the current projectiontype


  • Author: Heiner Lamprecht
  • Version: 0.0
  • Documentation generated by heiner@Tharbad on Mon Jul 26 18:16:35 CEST 1999
Kdoc