File indexing completed on 2024-04-21 03:48:35

0001 // SPDX-License-Identifier: LGPL-2.1-or-later
0002 //
0003 // SPDX-FileCopyrightText: 2015 Dennis Nienhüser <nienhueser@kde.org>
0004 //
0005 
0006 #include <declarative/MarbleQuickItem.h>
0007 
0008 #ifndef MARBLE_MAPS_H
0009 #define MARBLE_MAPS_H
0010 
0011 namespace Marble {
0012 
0013 class MarbleMaps : public MarbleQuickItem
0014 {
0015     Q_OBJECT
0016 
0017     Q_PROPERTY( bool suspended READ isSuspended NOTIFY isSuspendedChanged )
0018     Q_PROPERTY(bool keepScreenOn READ keepScreenOn WRITE setKeepScreenOn NOTIFY keepScreenOnChanged)
0019 
0020 public:
0021     explicit MarbleMaps(QQuickItem *parent = nullptr);
0022 
0023     bool isSuspended() const;
0024 
0025     bool keepScreenOn() const;
0026 
0027 public Q_SLOTS:
0028     void setKeepScreenOn(bool keepScreenOn);
0029 
0030 Q_SIGNALS:
0031     void isSuspendedChanged(bool isSuspended);
0032 
0033     void keepScreenOnChanged(bool keepScreenOn);
0034 
0035 private Q_SLOTS:
0036     void handleApplicationStateChange(Qt::ApplicationState state);
0037 
0038 private:
0039     bool m_suspended;
0040     bool m_keepScreenOn;
0041 };
0042 
0043 }
0044 
0045 #endif