2019-03-23 12:05:08 -07:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QRect>
|
|
|
|
|
|
|
|
class SystemProperties : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
2021-03-07 16:48:10 -06:00
|
|
|
friend class QuerySdlVideoThread;
|
|
|
|
friend class RefreshDisplaysThread;
|
|
|
|
|
2019-03-23 12:05:08 -07:00
|
|
|
public:
|
|
|
|
SystemProperties();
|
|
|
|
|
|
|
|
Q_PROPERTY(bool hasHardwareAcceleration MEMBER hasHardwareAcceleration CONSTANT)
|
2020-02-09 11:35:05 -08:00
|
|
|
Q_PROPERTY(bool rendererAlwaysFullScreen MEMBER rendererAlwaysFullScreen CONSTANT)
|
2019-03-23 12:05:08 -07:00
|
|
|
Q_PROPERTY(bool isRunningWayland MEMBER isRunningWayland CONSTANT)
|
2019-04-21 18:31:11 -07:00
|
|
|
Q_PROPERTY(bool isRunningXWayland MEMBER isRunningXWayland CONSTANT)
|
2019-03-23 12:05:08 -07:00
|
|
|
Q_PROPERTY(bool isWow64 MEMBER isWow64 CONSTANT)
|
2020-12-28 12:27:22 -06:00
|
|
|
Q_PROPERTY(QString friendlyNativeArchName MEMBER friendlyNativeArchName CONSTANT)
|
2020-02-08 21:31:04 -08:00
|
|
|
Q_PROPERTY(bool hasWindowManager MEMBER hasWindowManager CONSTANT)
|
2019-03-23 12:05:08 -07:00
|
|
|
Q_PROPERTY(bool hasBrowser MEMBER hasBrowser CONSTANT)
|
2019-06-29 17:40:30 -07:00
|
|
|
Q_PROPERTY(bool hasDiscordIntegration MEMBER hasDiscordIntegration CONSTANT)
|
2019-03-23 12:05:08 -07:00
|
|
|
Q_PROPERTY(QString unmappedGamepads MEMBER unmappedGamepads NOTIFY unmappedGamepadsChanged)
|
|
|
|
Q_PROPERTY(int maximumStreamingFrameRate MEMBER maximumStreamingFrameRate CONSTANT)
|
2020-02-23 00:43:43 -08:00
|
|
|
Q_PROPERTY(QSize maximumResolution MEMBER maximumResolution CONSTANT)
|
2020-05-09 22:20:39 -07:00
|
|
|
Q_PROPERTY(QString versionString MEMBER versionString CONSTANT)
|
2019-03-23 12:05:08 -07:00
|
|
|
|
2020-12-07 19:58:42 -06:00
|
|
|
Q_INVOKABLE void refreshDisplays();
|
2019-03-23 12:05:08 -07:00
|
|
|
Q_INVOKABLE QRect getDesktopResolution(int displayIndex);
|
|
|
|
Q_INVOKABLE QRect getNativeResolution(int displayIndex);
|
|
|
|
|
|
|
|
signals:
|
|
|
|
void unmappedGamepadsChanged();
|
|
|
|
|
|
|
|
private:
|
|
|
|
void querySdlVideoInfo();
|
2021-03-07 16:48:10 -06:00
|
|
|
void querySdlVideoInfoInternal();
|
|
|
|
void refreshDisplaysInternal();
|
2019-03-23 12:05:08 -07:00
|
|
|
|
|
|
|
bool hasHardwareAcceleration;
|
2020-02-09 11:35:05 -08:00
|
|
|
bool rendererAlwaysFullScreen;
|
2019-03-23 12:05:08 -07:00
|
|
|
bool isRunningWayland;
|
2019-04-21 18:31:11 -07:00
|
|
|
bool isRunningXWayland;
|
2019-03-23 12:05:08 -07:00
|
|
|
bool isWow64;
|
2020-12-28 12:27:22 -06:00
|
|
|
QString friendlyNativeArchName;
|
2020-02-08 21:31:04 -08:00
|
|
|
bool hasWindowManager;
|
2019-03-23 12:05:08 -07:00
|
|
|
bool hasBrowser;
|
2019-06-29 17:40:30 -07:00
|
|
|
bool hasDiscordIntegration;
|
2019-03-23 12:05:08 -07:00
|
|
|
QString unmappedGamepads;
|
|
|
|
int maximumStreamingFrameRate;
|
2020-02-23 00:43:43 -08:00
|
|
|
QSize maximumResolution;
|
2019-03-23 12:05:08 -07:00
|
|
|
QList<QRect> monitorDesktopResolutions;
|
|
|
|
QList<QRect> monitorNativeResolutions;
|
2020-05-09 22:20:39 -07:00
|
|
|
QString versionString;
|
2019-03-23 12:05:08 -07:00
|
|
|
};
|
|
|
|
|