Marble

MarbleDBusInterface.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org>
4//
5
6#ifndef MARBLE_DBUSINTERFACE_H
7#define MARBLE_DBUSINTERFACE_H
8
9#include "marble_export.h"
10
11namespace Marble
12{
13class MarbleWidget;
14}
15
16#include <QDBusAbstractAdaptor>
17#include <QPointF>
18#include <QScopedPointer>
19#include <QStringList>
20
21namespace Marble
22{
23
24class MARBLE_EXPORT MarbleDBusInterface : public QDBusAbstractAdaptor
25{
26 Q_OBJECT
27 Q_CLASSINFO("D-Bus Interface", "org.kde.marble")
28
29 Q_PROPERTY(QString mapTheme READ mapTheme WRITE setMapTheme NOTIFY mapThemeChanged)
30 Q_PROPERTY(QStringList mapThemes READ mapThemes)
31 Q_PROPERTY(int tileLevel READ tileLevel NOTIFY tileLevelChanged)
32 Q_PROPERTY(int zoom READ zoom WRITE setZoom NOTIFY zoomChanged)
33 Q_PROPERTY(QStringList properties READ properties)
34 Q_PROPERTY(QPointF center READ center WRITE setCenter NOTIFY centerChanged)
35
36public:
37 explicit MarbleDBusInterface(MarbleWidget *widget);
38 ~MarbleDBusInterface() override;
39
40 QString mapTheme() const;
41 QStringList mapThemes() const;
42 int tileLevel() const;
43 int zoom() const;
44 QPointF center() const;
45
46public Q_SLOTS:
47 void setMapTheme(const QString &mapTheme);
48 void setZoom(int zoom);
49 QStringList properties() const;
50 void setCenter(const QPointF &center) const;
51
52public Q_SLOTS:
53 Q_INVOKABLE void setPropertyEnabled(const QString &key, bool enabled);
54 Q_INVOKABLE bool isPropertyEnabled(const QString &key) const;
55
56Q_SIGNALS:
57 void mapThemeChanged(const QString &mapTheme);
58 void tileLevelChanged(int tileLevel);
59 void zoomChanged(int zoom);
60 void centerChanged(const QPointF &center);
61
62private Q_SLOTS:
63 void handleVisibleLatLonAltBoxChange();
64
65private:
66 Q_DISABLE_COPY(MarbleDBusInterface)
67 class Private;
68 friend class Private;
69 QScopedPointer<Private> const d;
70};
71
72}
73
74#endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.