Enroute Flight Navigation
A navigation app for VFR pilots
src
platform
PlatformAdaptor_Android.h
1
/***************************************************************************
2
* Copyright (C) 2019-2025 by Stefan Kebekus *
3
* stefan.kebekus@gmail.com *
4
* *
5
* This program is free software; you can redistribute it and/or modify *
6
* it under the terms of the GNU General Public License as published by *
7
* the Free Software Foundation; either version 3 of the License, or *
8
* (at your option) any later version. *
9
* *
10
* This program is distributed in the hope that it will be useful, *
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13
* GNU General Public License for more details. *
14
* *
15
* You should have received a copy of the GNU General Public License *
16
* along with this program; if not, write to the *
17
* Free Software Foundation, Inc., *
18
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19
***************************************************************************/
20
21
#pragma once
22
23
#include <QObject>
24
#include <QTimer>
25
#include <QtGlobal>
26
27
#include "platform/PlatformAdaptor_Abstract.h"
28
29
namespace
Platform {
30
32
33
34
class
PlatformAdaptor
:
public
Platform::PlatformAdaptor_Abstract
35
{
36
Q_OBJECT
37
QML_ELEMENT
38
QML_SINGLETON
39
40
public
:
45
explicit
PlatformAdaptor
(QObject *parent =
nullptr
);
46
47
// No default constructor, important for QML singleton
48
explicit
PlatformAdaptor
() =
delete
;
49
50
// factory function for QML singleton
51
static
Platform::PlatformAdaptor
* create(QQmlEngine*
/*unused*/
, QJSEngine*
/*unused*/
)
52
{
53
return
GlobalObject::platformAdaptor
();
54
}
55
56
~PlatformAdaptor
()
override
=
default
;
57
58
59
//
60
// Methods
61
//
62
67
QString
currentSSID
()
override
;
68
70
void
disableScreenSaver
()
override
;
71
76
void
lockWifi
(
bool
lock)
override
;
77
82
void
openSatView
(
const
QGeoCoordinate& coordinate)
override
;
83
88
QString
systemInfo
()
override
;
89
91
void
vibrateBrief
()
override
;
92
94
void
vibrateLong
()
override
;
95
97
void
onGUISetupCompleted
()
override
;
98
99
100
protected
:
102
void
deferredInitialization
()
override
;
103
104
private
:
105
Q_DISABLE_COPY_MOVE(
PlatformAdaptor
)
106
107
bool
splashScreenHidden {
false
};
108
};
109
110
}
// namespace Platform
GlobalObject::platformAdaptor
static Q_INVOKABLE Platform::PlatformAdaptor * platformAdaptor()
Pointer to appplication-wide static PlatformAdaptor instance.
Platform::PlatformAdaptor_Abstract
Interface to platform-specific functionality.
Definition
PlatformAdaptor_Abstract.h:53
Platform::PlatformAdaptor
Implementation of PlatformAdaptor for Android devices.
Definition
PlatformAdaptor_Android.h:35
Platform::PlatformAdaptor::onGUISetupCompleted
void onGUISetupCompleted() override
Implements a pure virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::deferredInitialization
void deferredInitialization() override
Re-implements a virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::vibrateLong
void vibrateLong() override
Implements a pure virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::PlatformAdaptor
PlatformAdaptor(QObject *parent=nullptr)
Standard constructor.
Platform::PlatformAdaptor::systemInfo
QString systemInfo() override
Information about the system, in HTML format.
Platform::PlatformAdaptor::openSatView
void openSatView(const QGeoCoordinate &coordinate) override
Re-implements a virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::disableScreenSaver
void disableScreenSaver() override
Implements a pure virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::lockWifi
void lockWifi(bool lock) override
Implements s pure virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::currentSSID
QString currentSSID() override
Implements a pure virtual method from PlatformAdaptor_Abstract.
Platform::PlatformAdaptor::vibrateBrief
void vibrateBrief() override
Implements a pure virtual method from PlatformAdaptor_Abstract.
Generated by
1.14.0