File indexing completed on 2025-01-05 03:59:20
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Niko Sams <niko.sams@gmail.com> 0004 // 0005 0006 0007 #ifndef MARBLE_ELEVATIONMODEL_H 0008 #define MARBLE_ELEVATIONMODEL_H 0009 0010 #include "digikam_export.h" 0011 0012 #include <QObject> 0013 0014 class QImage; 0015 0016 namespace Marble 0017 { 0018 class GeoDataCoordinates; 0019 0020 namespace { 0021 unsigned int const invalidElevationData = 32768; 0022 } 0023 0024 class TileId; 0025 class ElevationModelPrivate; 0026 class HttpDownloadManager; 0027 class PluginManager; 0028 0029 class DIGIKAM_EXPORT ElevationModel : public QObject 0030 { 0031 Q_OBJECT 0032 public: 0033 explicit ElevationModel( HttpDownloadManager *downloadManager, PluginManager* pluginManager, QObject *parent = nullptr ); 0034 ~ElevationModel() override; 0035 0036 qreal height( qreal lon, qreal lat ) const; 0037 QVector<GeoDataCoordinates> heightProfile( qreal fromLon, qreal fromLat, qreal toLon, qreal toLat ) const; 0038 0039 Q_SIGNALS: 0040 /** 0041 * Elevation tiles loaded. You will get more accurate results when querying height 0042 * for at least one that was queried before. 0043 **/ 0044 void updateAvailable(); 0045 0046 private: 0047 Q_PRIVATE_SLOT( d, void tileCompleted( const TileId&, const QImage& ) ) 0048 0049 private: 0050 friend class ElevationModelPrivate; 0051 ElevationModelPrivate *d; 0052 }; 0053 0054 } 0055 0056 #endif // MARBLE_ELEVATIONMODEL_H