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

32 lines
561 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
2021-01-27 21:18:06 +01:00
const QString &fileName() const {return _fileName;}
unsigned blockBits() const {return _blockBits;}
bool readBlock(QFile &file, int blockNum, char *data) const;
private:
qint64 read(QFile &file, char *data, qint64 maxSize) const;
template<class T> bool readValue(QFile &file, T &val) const;
2019-05-10 18:56:19 +02:00
2021-01-27 21:18:06 +01:00
QString _fileName;
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