File indexing completed on 2024-06-16 03:46:32

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
0004 //
0005 
0006 #ifndef MARBLE_MONAVMAP_H
0007 #define MARBLE_MONAVMAP_H
0008 
0009 #include "GeoDataLatLonBox.h"
0010 #include "GeoDataLinearRing.h"
0011 
0012 #include <QDir>
0013 
0014 namespace Marble
0015 {
0016 
0017 class MonavMap
0018 {
0019 public:
0020     void setDirectory( const QDir &dir );
0021 
0022     QDir directory() const;
0023 
0024     bool containsPoint( const GeoDataCoordinates &point ) const;
0025 
0026     qint64 size() const;
0027 
0028     void remove() const;
0029 
0030     static bool areaLessThan( const MonavMap &first, const MonavMap &second );
0031 
0032     static bool nameLessThan( const MonavMap &first, const MonavMap &second );
0033 
0034     QString transport() const;
0035 
0036     QString name() const;
0037 
0038     QString version() const;
0039 
0040     QString date() const;
0041 
0042     QString payload() const;
0043 
0044 private:
0045     QList<QFileInfo> files() const;
0046 
0047     void parseBoundingBox( const QFileInfo &file );
0048 
0049     QDir m_directory;
0050 
0051     QString m_name;
0052 
0053     QString m_date;
0054 
0055     QString m_version;
0056 
0057     QString m_transport;
0058 
0059     QString m_payload;
0060 
0061     GeoDataLatLonBox m_boundingBox;
0062 
0063     QVector<GeoDataLinearRing> m_tiles;
0064 };
0065 
0066 }
0067 
0068 #endif // MARBLE_MONAVMAP_H