1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 23:03:22 +02:00
GPXSee/src/atlas.h

49 lines
875 B
C
Raw Normal View History

2017-03-26 15:32:55 +02:00
#ifndef ATLAS_H
#define ATLAS_H
#include <QFileInfoList>
#include "map.h"
#include "offlinemap.h"
class Atlas : public Map
{
Q_OBJECT
public:
Atlas(const QString &path, QObject *parent = 0);
const QString &name() const {return _name;}
QRectF bounds() const;
qreal resolution(const QPointF &p) const;
qreal zoom() const;
qreal zoomFit(const QSize &size, const QRectF &br);
qreal zoomIn();
qreal zoomOut();
QPointF ll2xy(const Coordinates &c) const;
Coordinates xy2ll(const QPointF &p) const;
void draw(QPainter *painter, const QRectF &rect);
bool isValid() {return _valid;}
private:
bool isAtlas(const QFileInfoList &files);
void computeZooms();
void computeBounds();
QString _name;
bool _valid;
2017-03-27 02:41:30 +02:00
Tar _tar;
2017-03-26 15:32:55 +02:00
QList<OfflineMap*> _maps;
QVector<QPair<int, int> > _zooms;
QVector<QPair<QRectF, QRectF> > _bounds;
int _zoom;
};
#endif // ATLAS_H