1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-25 04:05:53 +01:00
GPXSee/src/map/gmifile.h
Martin Tůma 722f3acb1e Support all variants of TrekBuddy maps/atlases
Added support for gmi calibration files and arbitrary named tba/map/gmi files.
2023-09-13 20:02:24 +02:00

34 lines
698 B
C++

#ifndef GMIFILE_H
#define GMIFILE_H
#include "transform.h"
#include "calibrationpoint.h"
class QIODevice;
class GCS;
class GmiFile
{
public:
GmiFile(QIODevice &file);
bool isValid() const {return !_image.isNull() && _transform.isValid();}
const QString &errorString() const {return _errorString;}
const Transform &transform() const {return _transform;}
const QString &image() const {return _image;}
const QSize &size() const {return _size;}
private:
bool parse(QIODevice &device, QList<CalibrationPoint> &points);
bool computeTransformation(const QList<CalibrationPoint> &points);
QString _image;
QSize _size;
Transform _transform;
QString _errorString;
};
#endif // GMIFILE_H