Code cleanup
[GPXSee.git] / src / map / tile.h
blob491645a4be2a6a8b77c9b6034a16037ab75c640d
1 #ifndef TILE_H
2 #define TILE_H
4 #include <QVariant>
5 #include <QPixmap>
6 #include <QPoint>
7 #include <QDebug>
8 #include "rectd.h"
10 class Tile
12 public:
13 Tile(const QPoint &xy, const QVariant &zoom, const RectD &bbox = RectD())
14 {_xy = xy; _zoom = zoom; _bbox = bbox;}
16 const QVariant &zoom() const {return _zoom;}
17 const QPoint &xy() const {return _xy;}
18 const RectD &bbox() const {return _bbox;}
19 QPixmap& pixmap() {return _pixmap;}
21 private:
22 QVariant _zoom;
23 QPoint _xy;
24 RectD _bbox;
25 QPixmap _pixmap;
28 #ifndef QT_NO_DEBUG
29 inline QDebug operator<<(QDebug dbg, const Tile &tile)
31 dbg.nospace() << "Tile(" << tile.zoom() << ", " << tile.xy() << ", "
32 << tile.bbox() << ")";
33 return dbg.space();
35 #endif // QT_NO_DEBUG
37 #endif // TILE_H