File indexing completed on 2024-04-14 03:48:59

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2016 Dennis Nienhüser <nienhueser@kde.org>
0004 //
0005 
0006 #ifndef MARBLE_TILEITERATOR_H
0007 #define MARBLE_TILEITERATOR_H
0008 
0009 #include "GeoDataLatLonBox.h"
0010 
0011 #include <QRect>
0012 
0013 namespace Marble {
0014 
0015 class TileIterator {
0016 public:
0017     using const_iterator = TileIterator;
0018 
0019     const const_iterator& operator*();
0020     bool operator!=( const const_iterator& ) const;
0021     const_iterator& operator++();
0022     const_iterator begin() const;
0023     const_iterator end() const;
0024 
0025     TileIterator(const GeoDataLatLonBox &latLonBox, int zoomLevel);
0026     int x() const;
0027     int y() const;
0028     int total() const;
0029 
0030 private:
0031     TileIterator();
0032 
0033     QRect m_bounds;
0034     QPoint m_state;
0035     static const_iterator const s_end;
0036 };
0037 
0038 }
0039 
0040 #endif