mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-01-31 09:05:14 +01:00
47 lines
603 B
C++
47 lines
603 B
C++
#ifndef MAP_H
|
|
#define MAP_H
|
|
|
|
#include <QPixmap>
|
|
#include "downloader.h"
|
|
|
|
|
|
class Tile
|
|
{
|
|
public:
|
|
Tile(const QPoint &xy, int zoom)
|
|
{_xy = xy; _zoom = zoom;}
|
|
|
|
int zoom() {return _zoom;}
|
|
QPoint& xy() {return _xy;}
|
|
QPixmap& pixmap() {return _pixmap;}
|
|
|
|
private:
|
|
int _zoom;
|
|
QPoint _xy;
|
|
QPixmap _pixmap;
|
|
};
|
|
|
|
|
|
class Map : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
signals:
|
|
void loaded();
|
|
|
|
public:
|
|
Map(const QString &name, const QString &url);
|
|
|
|
const QString &name() {return _name;}
|
|
void loadTiles(QList<Tile> &list);
|
|
|
|
private slots:
|
|
void emitLoaded();
|
|
|
|
private:
|
|
QString _name;
|
|
QString _url;
|
|
};
|
|
|
|
#endif // MAP_H
|