QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SDLPlatform.h
Go to the documentation of this file.
1
#pragma once
2
3
#include <QtCore/QString>
4
5
#include <functional>
6
11
namespace
SDLPlatform
{
12
13
// ============================================================================
14
// Version Info
15
// ============================================================================
16
18
QString
getVersion
();
19
21
QString
getRevision
();
22
23
// ============================================================================
24
// Hints Management
25
// ============================================================================
26
28
bool
setHint
(
const
QString &name,
const
QString &value);
29
31
QString
getHint
(
const
QString &name);
32
34
bool
getHintBoolean
(
const
QString &name,
bool
defaultValue =
false
);
35
37
bool
resetHint
(
const
QString &name);
38
40
void
resetHints
();
41
42
// ============================================================================
43
// Platform / Capability Queries
44
// ============================================================================
45
47
QString
getPlatform
();
48
50
bool
isAndroid
();
51
bool
isIOS
();
52
bool
isWindows
();
53
bool
isMacOS
();
54
bool
isLinux
();
55
57
bool
isTablet
();
58
60
bool
isTV
();
61
63
bool
isDeXMode
();
64
66
bool
isChromebook
();
67
68
// ============================================================================
69
// System Info
70
// ============================================================================
71
73
int
getNumLogicalCPUCores
();
74
76
int
getSystemRAM
();
77
78
// ============================================================================
79
// Android-Specific
80
// ============================================================================
81
84
int
getAndroidSDKVersion
();
85
88
QString
getAndroidInternalStoragePath
();
89
92
QString
getAndroidExternalStoragePath
();
93
95
enum
AndroidStorageState
{
96
StorageStateNone
= 0,
97
StorageStateRead
= 0x01,
98
StorageStateWrite
= 0x02
99
};
100
103
int
getAndroidExternalStorageState
();
104
110
bool
requestAndroidPermission
(
const
QString &permission, std::function<
void
(
bool
granted)> callback);
111
112
// ============================================================================
113
// Device Power Info
114
// ============================================================================
115
120
QString
getDevicePowerInfo
(
int
*seconds =
nullptr
,
int
*percent =
nullptr
);
121
122
}
// namespace SDLPlatform
SDLPlatform
Definition
SDLPlatform.cc:11
SDLPlatform::isTV
bool isTV()
Check if running on a TV device.
Definition
SDLPlatform.cc:125
SDLPlatform::getAndroidExternalStorageState
int getAndroidExternalStorageState()
Definition
SDLPlatform.cc:199
SDLPlatform::getHint
QString getHint(const QString &name)
Get an SDL hint value.
Definition
SDLPlatform.cc:41
SDLPlatform::isMacOS
bool isMacOS()
Definition
SDLPlatform.cc:98
SDLPlatform::isAndroid
bool isAndroid()
Check if we're running on a specific platform.
Definition
SDLPlatform.cc:71
SDLPlatform::resetHints
void resetHints()
Reset all hints to defaults.
Definition
SDLPlatform.cc:57
SDLPlatform::resetHint
bool resetHint(const QString &name)
Reset an SDL hint to default.
Definition
SDLPlatform.cc:52
SDLPlatform::getSystemRAM
int getSystemRAM()
Get system RAM in MB.
Definition
SDLPlatform.cc:161
SDLPlatform::isWindows
bool isWindows()
Definition
SDLPlatform.cc:89
SDLPlatform::setHint
bool setHint(const QString &name, const QString &value)
Set an SDL hint.
Definition
SDLPlatform.cc:36
SDLPlatform::getDevicePowerInfo
QString getDevicePowerInfo(int *seconds, int *percent)
Definition
SDLPlatform.cc:252
SDLPlatform::requestAndroidPermission
bool requestAndroidPermission(const QString &permission, std::function< void(bool granted)> callback)
Definition
SDLPlatform.cc:227
SDLPlatform::getAndroidInternalStoragePath
QString getAndroidInternalStoragePath()
Definition
SDLPlatform.cc:179
SDLPlatform::getPlatform
QString getPlatform()
Get the current platform name.
Definition
SDLPlatform.cc:66
SDLPlatform::getHintBoolean
bool getHintBoolean(const QString &name, bool defaultValue)
Get an SDL hint as boolean.
Definition
SDLPlatform.cc:47
SDLPlatform::isTablet
bool isTablet()
Check if tablet mode is active (Android/Windows)
Definition
SDLPlatform.cc:116
SDLPlatform::isDeXMode
bool isDeXMode()
Check if running in DeX mode (Samsung)
Definition
SDLPlatform.cc:134
SDLPlatform::getAndroidExternalStoragePath
QString getAndroidExternalStoragePath()
Definition
SDLPlatform.cc:189
SDLPlatform::getNumLogicalCPUCores
int getNumLogicalCPUCores()
Get number of logical CPU cores.
Definition
SDLPlatform.cc:156
SDLPlatform::getAndroidSDKVersion
int getAndroidSDKVersion()
Definition
SDLPlatform.cc:170
SDLPlatform::getRevision
QString getRevision()
Get SDL revision string (git hash)
Definition
SDLPlatform.cc:26
SDLPlatform::isIOS
bool isIOS()
Definition
SDLPlatform.cc:80
SDLPlatform::isLinux
bool isLinux()
Definition
SDLPlatform.cc:107
SDLPlatform::isChromebook
bool isChromebook()
Check if running on a Chromebook (Chrome OS)
Definition
SDLPlatform.cc:143
SDLPlatform::getVersion
QString getVersion()
Get SDL version as string (e.g., "3.4.0")
Definition
SDLPlatform.cc:17
SDLPlatform::AndroidStorageState
AndroidStorageState
Android external storage state flags.
Definition
SDLPlatform.h:95
SDLPlatform::StorageStateNone
@ StorageStateNone
Definition
SDLPlatform.h:96
SDLPlatform::StorageStateWrite
@ StorageStateWrite
Definition
SDLPlatform.h:98
SDLPlatform::StorageStateRead
@ StorageStateRead
Definition
SDLPlatform.h:97
src
Utilities
SDL
SDLPlatform.h
Generated by
1.9.8