File indexing completed on 2024-05-05 03:49:16
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2022 Torsten Rahn <rahn@kde.org> 0004 // 0005 0006 #ifndef MARBLE_MAPTHEME_H 0007 #define MARBLE_MAPTHEME_H 0008 0009 #include <QObject> 0010 #include <QQuickItem> 0011 0012 /** 0013 * Represents the maptheme with its most important properties 0014 * 0015 * @todo: Expose more properties 0016 */ 0017 namespace Marble 0018 { 0019 class MarbleQuickItem; 0020 0021 class MapTheme : public QObject 0022 { 0023 Q_OBJECT 0024 0025 Q_PROPERTY( Marble::MarbleQuickItem* map READ map WRITE setMap NOTIFY mapChanged ) 0026 0027 Q_PROPERTY( QString license READ license NOTIFY licenseChanged ) 0028 0029 public: 0030 explicit MapTheme(QObject *parent = nullptr); 0031 0032 /** Query the Marble map backend that this item uses for screen position determination */ 0033 MarbleQuickItem* map() const; 0034 0035 QString license() const; 0036 0037 /** Hook up the GeoItem with Marble's map backend */ 0038 void setMap(MarbleQuickItem* map); 0039 Q_SIGNALS: 0040 void mapChanged(MarbleQuickItem *); 0041 void licenseChanged(); 0042 0043 private: 0044 MarbleQuickItem* m_map; 0045 }; 0046 } 0047 0048 #endif // MARBLE_MAPTHEME_H