1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-02-08 04:25:12 +01:00
GPXSee/src/map/IMG/imgdata.h

35 lines
734 B
C
Raw Normal View History

2021-04-10 15:27:40 +02:00
#ifndef IMG_IMGDATA_H
#define IMG_IMGDATA_H
2019-05-10 18:56:19 +02:00
2020-02-09 23:24:48 +01:00
#include "mapdata.h"
2019-05-10 18:56:19 +02:00
2021-01-27 21:18:06 +01:00
class QFile;
2021-04-10 15:27:40 +02:00
namespace IMG {
class IMGData : public MapData
2019-05-10 18:56:19 +02:00
{
public:
2021-04-10 15:27:40 +02:00
IMGData(const QString &fileName);
2019-07-04 18:18:03 +02:00
unsigned blockBits() const {return _blockBits;}
bool readBlock(QFile &file, int blockNum, char *data) const;
private:
2021-08-10 20:44:16 +02:00
typedef QMap<QByteArray, VectorTile*> TileMap;
qint64 read(QFile &file, char *data, qint64 maxSize) const;
template<class T> bool readValue(QFile &file, T &val) const;
2021-08-10 20:44:16 +02:00
bool readSubFileBlocks(QFile &file, quint64 offset, SubFile *subFile);
bool readFAT(QFile &file, TileMap &tileMap);
bool readIMGHeader(QFile &file);
bool createTileTree(const TileMap &tileMap);
2019-05-10 18:56:19 +02:00
quint8 _key;
unsigned _blockBits;
2019-05-10 18:56:19 +02:00
};
2021-04-10 15:27:40 +02:00
}
#endif // IMG_IMGDATA_H