Map API refactoring
[GPXSee.git] / src / map / invalidmap.h
blobc07a11ec0f23f8e57e4d649b1723ad6d6be02a11
1 #ifndef INVALIDMAP_H
2 #define INVALIDMAP_H
4 #include "map.h"
6 class InvalidMap : public Map
8 Q_OBJECT
10 public:
11 InvalidMap(const QString &fileName, const QString &error, QObject *parent = 0)
12 : Map(fileName, parent), _errorString(error) {}
14 QString name() const {return QString();}
16 QRectF bounds() {return QRectF();}
18 QPointF ll2xy(const Coordinates &) {return QPointF();}
19 Coordinates xy2ll(const QPointF &) {return Coordinates();}
21 void draw(QPainter *, const QRectF &, Flags) {}
23 bool isValid() const {return false;}
24 bool isReady() const {return false;}
25 QString errorString() const {return _errorString;}
27 private:
28 QString _errorString;
31 #endif // INVALIDMAP_H