Marble

MapTheme.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2022 Torsten Rahn <[email protected]>
4 //
5 
6 #ifndef MARBLE_MAPTHEME_H
7 #define MARBLE_MAPTHEME_H
8 
9 #include <QObject>
10 #include <QQuickItem>
11 
12 /**
13  * Represents the maptheme with its most important properties
14  *
15  * @todo: Expose more properties
16  */
17 namespace Marble
18 {
19  class MarbleQuickItem;
20 
21  class MapTheme : public QObject
22  {
23  Q_OBJECT
24 
25  Q_PROPERTY( Marble::MarbleQuickItem* map READ map WRITE setMap NOTIFY mapChanged )
26 
27  Q_PROPERTY( QString license READ license NOTIFY licenseChanged )
28 
29  public:
30  explicit MapTheme(QObject *parent = nullptr);
31 
32  /** Query the Marble map backend that this item uses for screen position determination */
33  MarbleQuickItem* map() const;
34 
35  QString license() const;
36 
37  /** Hook up the GeoItem with Marble's map backend */
38  void setMap(MarbleQuickItem* map);
39  Q_SIGNALS:
40  void mapChanged(MarbleQuickItem *);
41  void licenseChanged();
42 
43  private:
44  MarbleQuickItem* m_map;
45  };
46 }
47 
48 #endif // MARBLE_MAPTHEME_H
Q_OBJECTQ_OBJECT
Q_PROPERTY(...)
Binds a QML item to a specific geodetic location in screen coordinates.
Q_SIGNALSQ_SIGNALS
QFuture< void > map(Sequence &sequence, MapFunctor function)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:42 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.