1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QGENERICUNIXDESKTOPSERVICES_H
5#define QGENERICUNIXDESKTOPSERVICES_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is not part of the Qt API. It exists purely as an
12// implementation detail. This header file may change from version to
13// version without notice, or even be removed.
14//
15// We mean it.
16//
17
18#include <qpa/qplatformservices.h>
19#include <QtCore/QString>
20#include <QtCore/private/qglobal_p.h>
21
22QT_BEGIN_NAMESPACE
23
24class QWindow;
25
26class Q_GUI_EXPORT QGenericUnixServices : public QPlatformServices
27{
28public:
29 QGenericUnixServices();
30 ~QGenericUnixServices();
31
32 QByteArray desktopEnvironment() const override;
33
34 bool hasCapability(Capability capability) const override;
35 bool openUrl(const QUrl &url) override;
36 bool openDocument(const QUrl &url) override;
37 QPlatformServiceColorPicker *colorPicker(QWindow *parent = nullptr) override;
38
39 void setApplicationBadge(qint64 number);
40 virtual QString portalWindowIdentifier(QWindow *window);
41
42private:
43 QString m_webBrowser;
44 QString m_documentLauncher;
45#if QT_CONFIG(dbus)
46 QMetaObject::Connection m_watcherConnection;
47#endif
48 bool m_hasScreenshotPortalWithColorPicking = false;
49};
50
51QT_END_NAMESPACE
52
53#endif // QGENERICUNIXDESKTOPSERVICES_H
54

Provided by KDAB

Privacy Policy
Learn Advanced QML with KDAB
Find out more

source code of qtbase/src/gui/platform/unix/qgenericunixservices_p.h