mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 19:55:53 +01:00
39 lines
754 B
C++
39 lines
754 B
C++
#ifndef TILE_H
|
|
#define TILE_H
|
|
|
|
#include <QVariant>
|
|
#include <QPixmap>
|
|
#include <QPoint>
|
|
#include <QDebug>
|
|
#include "rectd.h"
|
|
|
|
class Tile
|
|
{
|
|
public:
|
|
Tile() {}
|
|
Tile(const QPoint &xy, const QVariant &zoom, const RectD &bbox = RectD())
|
|
: _xy(xy), _zoom(zoom), _bbox(bbox) {}
|
|
|
|
const QVariant &zoom() const {return _zoom;}
|
|
const QPoint &xy() const {return _xy;}
|
|
const RectD &bbox() const {return _bbox;}
|
|
QPixmap& pixmap() {return _pixmap;}
|
|
|
|
private:
|
|
QPoint _xy;
|
|
QVariant _zoom;
|
|
RectD _bbox;
|
|
QPixmap _pixmap;
|
|
};
|
|
|
|
#ifndef QT_NO_DEBUG
|
|
inline QDebug operator<<(QDebug dbg, const Tile &tile)
|
|
{
|
|
dbg.nospace() << "Tile(" << tile.zoom() << ", " << tile.xy() << ", "
|
|
<< tile.bbox() << ")";
|
|
return dbg.space();
|
|
}
|
|
#endif // QT_NO_DEBUG
|
|
|
|
#endif // TILE_H
|