1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-24 19:55:53 +01:00
GPXSee/src/map/tile.h

46 lines
836 B
C
Raw Normal View History

#ifndef TILE_H
#define TILE_H
2018-06-04 23:40:42 +02:00
#include <QVariant>
#include <QPixmap>
#include <QPoint>
class FileTile
{
public:
FileTile(const QPoint &xy, const QString &file)
: _xy(xy), _file(file) {}
const QPoint &xy() const {return _xy;}
const QString &file() const {return _file;}
const QPixmap &pixmap() const {return _pixmap;}
void load() {_pixmap.load(_file);}
private:
QPoint _xy;
QString _file;
QPixmap _pixmap;
};
class DataTile
2022-07-06 14:58:41 +02:00
{
public:
DataTile(const QPoint &xy, const QByteArray &data, const QString &key)
2022-07-06 14:58:41 +02:00
: _xy(xy), _data(data), _key(key) {}
const QPoint &xy() const {return _xy;}
const QString &key() const {return _key;}
const QPixmap &pixmap() const {return _pixmap;}
void load() {_pixmap.loadFromData(_data);}
private:
QPoint _xy;
QByteArray _data;
QString _key;
QPixmap _pixmap;
};
#endif // TILE_H