ScreenshotPortal Class

(Sailfish::XDP::ScreenshotPortal)

Backend interface of the Screenshot Portal More...

Header: #include <ScreenshotPortal>

Public Types

class ColorRGB

Properties

Public Functions

ScreenshotPortal(QObject *parent)
~ScreenshotPortal() = default
uint version() const

Public Slots

uint PickColor(const QDBusObjectPath &handle, const QString &app_id, const QString &parent_window, const QVariantMap &options, QVariantMap &results)
uint Screenshot(const QDBusObjectPath &handle, const QString &app_id, const QString &parent_window, const QVariantMap &options, QVariantMap &results)

Detailed Description

Backend interface of the Screenshot Portal

See XDG Desktop Portal Backend Specification for details.

Property Documentation

version : const uint

This property contains the backend implementation version.

Access functions:

uint version() const

Member Function Documentation

ScreenshotPortal::ScreenshotPortal(QObject *parent)

Default constructs an instance of ScreenshotPortal.

[default] ScreenshotPortal::~ScreenshotPortal()

Destroys the instance of ScreenshotPortal.

[slot] uint ScreenshotPortal::PickColor(const QDBusObjectPath &handle, const QString &app_id, const QString &parent_window, const QVariantMap &options, QVariantMap &results)

See the XDG Desktop Portal Backend Specification for the meaning of handle, app_id, parent_window, and results. See the XDG Desktop Portal Specification for possible options.

Warning: This method currently will always return the same color, white.

[slot] uint ScreenshotPortal::Screenshot(const QDBusObjectPath &handle, const QString &app_id, const QString &parent_window, const QVariantMap &options, QVariantMap &results)

Takes a screenshot and returns its file location. The output location will be QStandardPaths::PicturesLocation, and the screenshot is saved in PNG format. See the XDG Desktop Portal Backend Specification for the meaning of handle, app_id, parent_window, and results. See the XDG Desktop Portal Specification for possible options.

To take the screenshot, org.nemomobile.lipstick.saveScreenshot is called via D-Bus.