1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org>
4 //
5 
6 #include <declarative/MarbleQuickItem.h>
7 
8 #ifndef MARBLE_MAPS_H
9 #define MARBLE_MAPS_H
10 
11 namespace Marble {
12 
13 class MarbleMaps : public MarbleQuickItem
14 {
15     Q_OBJECT
16 
17     Q_PROPERTY( bool suspended READ isSuspended NOTIFY isSuspendedChanged )
18     Q_PROPERTY(bool keepScreenOn READ keepScreenOn WRITE setKeepScreenOn NOTIFY keepScreenOnChanged)
19 
20 public:
21     explicit MarbleMaps(QQuickItem *parent = nullptr);
22 
23     bool isSuspended() const;
24 
25     bool keepScreenOn() const;
26 
27 public Q_SLOTS:
28     void setKeepScreenOn(bool keepScreenOn);
29 
30 Q_SIGNALS:
31     void isSuspendedChanged(bool isSuspended);
32 
33     void keepScreenOnChanged(bool keepScreenOn);
34 
35 private Q_SLOTS:
36     void handleApplicationStateChange(Qt::ApplicationState state);
37 
38 private:
39     bool m_suspended;
40     bool m_keepScreenOn;
41 };
42 
43 }
44 
45 #endif
46