1 #ifndef TILE_H
2 #define TILE_H
3 
4 #include <QVariant>
5 #include <QPixmap>
6 #include <QPoint>
7 #include <QDebug>
8 #include "rectd.h"
9 
10 class Tile
11 {
12 public:
Tile()13 	Tile() {}
14 	Tile(const QPoint &xy, const QVariant &zoom, const RectD &bbox = RectD())
_xy(xy)15 	  : _xy(xy), _zoom(zoom), _bbox(bbox) {}
16 
zoom()17 	const QVariant &zoom() const {return _zoom;}
xy()18 	const QPoint &xy() const {return _xy;}
bbox()19 	const RectD &bbox() const {return _bbox;}
pixmap()20 	QPixmap& pixmap() {return _pixmap;}
21 
22 private:
23 	QPoint _xy;
24 	QVariant _zoom;
25 	RectD _bbox;
26 	QPixmap _pixmap;
27 };
28 
29 #ifndef QT_NO_DEBUG
30 inline QDebug operator<<(QDebug dbg, const Tile &tile)
31 {
32 	dbg.nospace() << "Tile(" << tile.zoom() << ", " << tile.xy() << ", "
33 	  << tile.bbox() << ")";
34 	return dbg.space();
35 }
36 #endif // QT_NO_DEBUG
37 
38 #endif // TILE_H
39