5 #include <QSqlDatabase>
8 #include "projection.h"
10 #include "calibrationpoint.h"
12 class QXmlStreamReader
;
14 class OruxMap
: public Map
19 OruxMap(const QString
&fileName
, 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 load(const Projection
&in
, const Projection
&out
, qreal deviceRatio
,
40 bool isValid() const {return _valid
;}
41 QString
errorString() const {return _errorString
;}
43 static Map
*create(const QString
&path
, bool *isDir
);
47 Zoom(int zoom
, const QSize
&tileSize
, const QSize
&size
,
48 const Projection
&proj
, const Transform
&transform
,
49 const QString
&fileName
, const QString
&set
)
50 : zoom(zoom
), tileSize(tileSize
), size(size
), projection(proj
),
51 transform(transform
), fileName(fileName
), set(set
) {}
52 bool operator<(const Zoom
&other
) const
53 {return zoom
< other
.zoom
;}
58 Projection projection
;
64 bool readXML(const QString
&path
, const QString
&dir
= QString());
65 void oruxTracker(QXmlStreamReader
&reader
, const QString
&dir
, int level
);
66 void mapCalibration(QXmlStreamReader
&reader
, const QString
&dir
, int level
);
67 void calibrationPoints(QXmlStreamReader
&reader
, const QSize
&size
,
68 QList
<CalibrationPoint
> &points
);
69 QPixmap
tile(const Zoom
&z
, int x
, int y
) const;
71 friend QDebug
operator<<(QDebug dbg
, const Zoom
&zoom
);