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
11namespace SDLPlatform {
12
13// ============================================================================
14// Version Info
15// ============================================================================
16
18QString getVersion();
19
21QString getRevision();
22
23// ============================================================================
24// Hints Management
25// ============================================================================
26
28bool setHint(const QString &name, const QString &value);
29
31QString getHint(const QString &name);
32
34bool getHintBoolean(const QString &name, bool defaultValue = false);
35
37bool resetHint(const QString &name);
38
40void resetHints();
41
42// ============================================================================
43// Platform / Capability Queries
44// ============================================================================
45
47QString getPlatform();
48
50bool isAndroid();
51bool isIOS();
52bool isWindows();
53bool isMacOS();
54bool isLinux();
55
57bool isTablet();
58
60bool isTV();
61
63bool isDeXMode();
64
66bool isChromebook();
67
68// ============================================================================
69// System Info
70// ============================================================================
71
74
76int getSystemRAM();
77
78// ============================================================================
79// Android-Specific
80// ============================================================================
81
85
89
93
100
104
110bool requestAndroidPermission(const QString &permission, std::function<void(bool granted)> callback);
111
112// ============================================================================
113// Device Power Info
114// ============================================================================
115
120QString getDevicePowerInfo(int *seconds = nullptr, int *percent = nullptr);
121
122} // namespace SDLPlatform
bool isTV()
Check if running on a TV device.
int getAndroidExternalStorageState()
QString getHint(const QString &name)
Get an SDL hint value.
bool isMacOS()
bool isAndroid()
Check if we're running on a specific platform.
void resetHints()
Reset all hints to defaults.
bool resetHint(const QString &name)
Reset an SDL hint to default.
int getSystemRAM()
Get system RAM in MB.
bool isWindows()
bool setHint(const QString &name, const QString &value)
Set an SDL hint.
QString getDevicePowerInfo(int *seconds, int *percent)
bool requestAndroidPermission(const QString &permission, std::function< void(bool granted)> callback)
QString getAndroidInternalStoragePath()
QString getPlatform()
Get the current platform name.
bool getHintBoolean(const QString &name, bool defaultValue)
Get an SDL hint as boolean.
bool isTablet()
Check if tablet mode is active (Android/Windows)
bool isDeXMode()
Check if running in DeX mode (Samsung)
QString getAndroidExternalStoragePath()
int getNumLogicalCPUCores()
Get number of logical CPU cores.
int getAndroidSDKVersion()
QString getRevision()
Get SDL revision string (git hash)
bool isChromebook()
Check if running on a Chromebook (Chrome OS)
QString getVersion()
Get SDL version as string (e.g., "3.4.0")
AndroidStorageState
Android external storage state flags.
Definition SDLPlatform.h:95