2017-03-29 22:51:32 +02:00
|
|
|
#ifndef LATLON_H
|
|
|
|
#define LATLON_H
|
|
|
|
|
2018-01-25 00:19:11 +01:00
|
|
|
#include "ct.h"
|
2018-01-20 20:13:56 +01:00
|
|
|
#include "angularunits.h"
|
2017-03-29 22:51:32 +02:00
|
|
|
|
2018-01-25 00:19:11 +01:00
|
|
|
class LatLon : public CT
|
2017-03-29 22:51:32 +02:00
|
|
|
{
|
|
|
|
public:
|
2018-01-20 20:13:56 +01:00
|
|
|
LatLon(const AngularUnits &au) : _au(au) {}
|
|
|
|
|
2018-01-25 00:19:11 +01:00
|
|
|
virtual CT *clone() const {return new LatLon(*this);}
|
|
|
|
|
2017-03-29 22:51:32 +02:00
|
|
|
virtual QPointF ll2xy(const Coordinates &c) const
|
2018-01-20 20:13:56 +01:00
|
|
|
{return QPointF(_au.fromDegrees(c.lon()), _au.fromDegrees(c.lat()));}
|
2017-03-29 22:51:32 +02:00
|
|
|
virtual Coordinates xy2ll(const QPointF &p) const
|
2018-01-20 20:13:56 +01:00
|
|
|
{return Coordinates(_au.toDegrees(p.x()), _au.toDegrees(p.y()));}
|
|
|
|
|
|
|
|
private:
|
|
|
|
AngularUnits _au;
|
2017-03-29 22:51:32 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // LATLON_H
|