2016-10-24 00:21:40 +02:00
|
|
|
#ifndef TILE_H
|
|
|
|
#define TILE_H
|
|
|
|
|
|
|
|
#include <QPixmap>
|
|
|
|
#include <QPoint>
|
2017-11-14 22:15:46 +01:00
|
|
|
#include <QDebug>
|
2016-10-24 00:21:40 +02:00
|
|
|
|
|
|
|
class Tile
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
Tile(const QPoint &xy, int zoom)
|
|
|
|
{_xy = xy; _zoom = zoom;}
|
|
|
|
|
|
|
|
int zoom() const {return _zoom;}
|
|
|
|
const QPoint& xy() const {return _xy;}
|
|
|
|
QPixmap& pixmap() {return _pixmap;}
|
|
|
|
|
|
|
|
private:
|
|
|
|
int _zoom;
|
|
|
|
QPoint _xy;
|
|
|
|
QPixmap _pixmap;
|
|
|
|
};
|
|
|
|
|
2017-11-14 22:15:46 +01:00
|
|
|
inline QDebug operator<<(QDebug dbg, const Tile &tile)
|
|
|
|
{
|
|
|
|
dbg.nospace() << "Tile(" << tile.zoom() << ", " << tile.xy() << ")";
|
2018-01-21 11:19:46 +01:00
|
|
|
return dbg.space();
|
2017-11-14 22:15:46 +01:00
|
|
|
}
|
|
|
|
|
2016-10-24 00:21:40 +02:00
|
|
|
#endif // TILE_H
|