2018-01-29 00:19:57 +01:00
|
|
|
#ifndef MAPSOURCE_H
|
|
|
|
#define MAPSOURCE_H
|
2018-01-28 22:56:08 +01:00
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include "common/range.h"
|
|
|
|
#include "common/rectc.h"
|
|
|
|
|
|
|
|
class Map;
|
|
|
|
class QXmlStreamReader;
|
|
|
|
|
2018-01-29 00:19:57 +01:00
|
|
|
class MapSource
|
2018-01-28 22:56:08 +01:00
|
|
|
{
|
|
|
|
public:
|
2018-01-31 20:03:50 +01:00
|
|
|
bool loadFile(const QString &path, Map **map);
|
2018-01-28 22:56:08 +01:00
|
|
|
const QString &errorString() const {return _errorString;}
|
|
|
|
|
|
|
|
private:
|
|
|
|
RectC bounds(QXmlStreamReader &reader);
|
|
|
|
Range zooms(QXmlStreamReader &reader);
|
2018-01-31 20:03:50 +01:00
|
|
|
void map(QXmlStreamReader &reader, Map **map);
|
2018-01-28 22:56:08 +01:00
|
|
|
|
|
|
|
QString _errorString;
|
|
|
|
};
|
|
|
|
|
2018-01-29 00:19:57 +01:00
|
|
|
#endif // MAPSOURCE_H
|