1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-12-11 11:39:10 +01:00
GPXSee/src/map/tar.h

31 lines
559 B
C
Raw Normal View History

2017-03-21 01:15:29 +01:00
#ifndef TAR_H
#define TAR_H
#include <QStringList>
#include <QMap>
#include <QFile>
class Tar
{
public:
2018-03-08 02:24:10 +01:00
Tar(const QString &name) : _file(name) {}
bool open();
2017-03-21 01:15:29 +01:00
QStringList files() const {return _index.keys();}
QByteArray file(const QString &name);
bool contains(const QString &name) const {return _index.contains(name);}
2017-03-21 01:15:29 +01:00
QString fileName() const {return _file.fileName();}
2017-03-21 01:15:29 +01:00
bool isOpen() const {return _file.isOpen();}
private:
bool loadTar();
bool loadTmi(const QString &path);
2017-03-21 01:15:29 +01:00
QFile _file;
QMap<QString, quint64> _index;
2017-03-21 01:15:29 +01:00
};
#endif // TAR_H