Marble

DeclarativeMapThemeManager.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#ifndef DECLARATIVE_MAPTHEMEMANAGER_H
7#define DECLARATIVE_MAPTHEMEMANAGER_H
8
9#include "MapThemeManager.h"
10
11#include <QQuickImageProvider>
12
13class MapThemeImageProvider : public QQuickImageProvider
14{
15public:
16 MapThemeImageProvider();
17
18 QPixmap requestPixmap(const QString &id, QSize *size, const QSize &requestedSize) override;
19
20private:
21 /** @todo FIXME It is a bit ugly to keep a separate object that loads all themes again
22 * just to provide their images to QML. The API change before Qt 4.7 made this necessary
23 * however (it's not possible anymore to assign a QPixmap property to QML images) */
24 Marble::MapThemeManager m_mapThemeManager;
25};
26
27/**
28 * Provides access to all map themes installed locally
29 */
31{
33
34public:
35 /** Constructor. Map themes are loaded later on demand. */
36 explicit MapThemeManager(QObject *parent = nullptr);
37
38 /**
39 * A list of all installed map theme ids, each entry has the form
40 * "planet/themeid/themeid.dgml", e.g. "earth/bluemarble/bluemarble.dgml"
41 */
43
44private:
45 /** Marble map theme manager doing the real work */
46 Marble::MapThemeManager m_mapThemeManager;
47};
48
49#endif // DECLARATIVE_MAPTHEMEMANAGER_H
Provides access to all map themes installed locally.
QStringList mapThemeIds() const
A list of all installed map theme ids, each entry has the form "planet/themeid/themeid....
MapThemeManager(QObject *parent=nullptr)
Constructor.
The class that handles map themes that are locally available .
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:08:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.