5 #include "projection.h"
12 class OziMap
: public Map
17 OziMap(const QString
&fileName
, QObject
*parent
= 0);
18 OziMap(const QString
&fileName
, Tar
&tar
, QObject
*parent
= 0);
21 QString
name() const {return _name
;}
25 int zoom() const {return _zoom
;}
26 void setZoom(int zoom
) {_zoom
= zoom
;}
27 int zoomFit(const QSize
&size
, const RectC
&rect
);
31 QPointF
ll2xy(const Coordinates
&c
);
32 Coordinates
xy2ll(const QPointF
&p
);
34 void draw(QPainter
*painter
, const QRectF
&rect
, Flags flags
);
36 void setDevicePixelRatio(qreal ratio
);
40 bool isValid() const {return _valid
;}
41 QString
errorString() const {return _errorString
;}
43 PointD
ll2pp(const Coordinates
&c
) const
44 {return _projection
.ll2xy(c
);}
45 PointD
xy2pp(const QPointF
&p
) const
46 {return _transform
.img2proj(p
* _ratio
);}
47 QPointF
pp2xy(const PointD
&p
) const
48 {return _transform
.proj2img(p
) / _ratio
;}
55 bool isValid() const {return size
.isValid() && !path
.isEmpty();}
58 bool setTileInfo(const QStringList
&tiles
, const QString
&path
= QString());
59 bool setImageInfo(const QString
&path
);
61 void drawTiled(QPainter
*painter
, const QRectF
&rect
) const;
62 void drawOZF(QPainter
*painter
, const QRectF
&rect
) const;
63 void drawImage(QPainter
*painter
, const QRectF
&rect
, Flags flags
) const;
65 void rescale(int zoom
);
68 Projection _projection
;
73 ImageInfo _map
, _tile
;