summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@qt.io>2021-03-17 13:14:44 +0100
committerMorten Johan Sørvig <morten.sorvig@qt.io>2021-09-08 19:01:54 +0200
commit95d5710d7b608cd4e22b20d570d54dbadc8105cb (patch)
tree3eee604552ed1d11290c24856a9f35b13f263e19 /src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
parent1117e732d9fd2537edf2bf2fad54d187c6664b67 (diff)
Offscreen: add configuration update API
Add support for updating the platform configuration at runtime, which enables use cases such as changing the screen configuration from an auto test. Provide functions for getting and setting the complete configuration as a QJsonObject: QJsonObject configuration() void setConfiguration(QJsonObject) User code can then either set a completely new configuration, or make a smaller update by using a get-modify-set sequence: // Set the logical DPI for screen 0 to 192: auto config = configuration(); config[“screens”][0][“logicalDpi] = 192 setConfiguration(config); This approach means we can expose a minimal but complete API, at the cost of doing more work in the offscreen plugin in order to figure out what changed. Note that this change does not export thew API from the platform plugin. Change-Id: If776c36d5ae6d72dca715cc8e89e42768ed32c60 Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/plugins/platforms/offscreen/qoffscreenintegration_x11.h')
-rw-r--r--src/plugins/platforms/offscreen/qoffscreenintegration_x11.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
index 7e26b76759..afd30d7b4b 100644
--- a/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
+++ b/src/plugins/platforms/offscreen/qoffscreenintegration_x11.h
@@ -56,6 +56,7 @@ class QOffscreenX11Info;
class QOffscreenX11PlatformNativeInterface : public QOffscreenPlatformNativeInterface
{
public:
+ QOffscreenX11PlatformNativeInterface(QOffscreenIntegration *integration);
~QOffscreenX11PlatformNativeInterface();
void *nativeResourceForScreen(const QByteArray &resource, QScreen *screen) override;
@@ -69,6 +70,7 @@ public:
class QOffscreenX11Integration : public QOffscreenIntegration
{
public:
+ QOffscreenX11Integration(const QStringList& paramList);
~QOffscreenX11Integration();
bool hasCapability(QPlatformIntegration::Capability cap) const override;