mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-25 04:05:53 +01:00
Martin Tůma
722f3acb1e
Added support for gmi calibration files and arbitrary named tba/map/gmi files.
34 lines
698 B
C++
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
|