1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 07:13:21 +02:00
GPXSee/src/map/IMG/img.h

28 lines
509 B
C
Raw Normal View History

2019-05-10 18:56:19 +02:00
#ifndef IMG_H
#define IMG_H
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;
2020-02-09 23:24:48 +01:00
class IMG : public MapData
2019-05-10 18:56:19 +02:00
{
public:
IMG(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
};
#endif // IMG_H