1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 13:41:16 +01:00
GPXSee/src/map/emptymap.h

41 lines
863 B
C
Raw Normal View History

#ifndef EMPTYMAP_H
#define EMPTYMAP_H
#include "common/coordinates.h"
2017-12-02 20:28:53 +01:00
#include "map.h"
class EmptyMap : public Map
{
Q_OBJECT
public:
EmptyMap(QObject *parent = 0);
const QString &name() const {return _name;}
QRectF bounds() const;
qreal resolution(const QPointF &p) const;
qreal zoom() const {return _scale;}
qreal zoomFit(const QSize &size, const RectC &br);
2017-06-26 00:20:42 +02:00
qreal zoomFit(qreal resolution, const Coordinates &c);
qreal zoomIn();
qreal zoomOut();
QPointF ll2xy(const Coordinates &c)
{return static_cast<const EmptyMap &>(*this).ll2xy(c);}
Coordinates xy2ll(const QPointF &p)
{return static_cast<const EmptyMap &>(*this).xy2ll(p);}
void draw(QPainter *painter, const QRectF &rect);
private:
QPointF ll2xy(const Coordinates &c) const;
Coordinates xy2ll(const QPointF &p) const;
QString _name;
qreal _scale;
};
#endif // EMPTYMAP_H