1// Copyright (C) 2016 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 QPLATFORMSERVICES_H
5#define QPLATFORMSERVICES_H
6
7//
8// W A R N I N G
9// -------------
10//
11// This file is part of the QPA API and is not meant to be used
12// in applications. Usage of this API may make your code
13// source and binary incompatible with future versions of Qt.
14//
15
16#include <QtGui/qtguiglobal.h>
17#include <QtCore/qobject.h>
18
19QT_BEGIN_NAMESPACE
20
21class QUrl;
22class QWindow;
23
24class Q_GUI_EXPORT QPlatformServiceColorPicker : public QObject
25{
26 Q_OBJECT
27public:
28 using QObject::QObject;
29 virtual void pickColor() = 0;
30Q_SIGNALS:
31 void colorPicked(const QColor &color);
32};
33
34class Q_GUI_EXPORT QPlatformServices
35{
36public:
37 Q_DISABLE_COPY_MOVE(QPlatformServices)
38
39 enum Capability {
40 ColorPicking,
41 };
42
43 QPlatformServices();
44 virtual ~QPlatformServices() { }
45
46 virtual bool openUrl(const QUrl &url);
47 virtual bool openDocument(const QUrl &url);
48
49 virtual QByteArray desktopEnvironment() const;
50
51 virtual bool hasCapability(Capability capability) const;
52
53 virtual QPlatformServiceColorPicker *colorPicker(QWindow *parent = nullptr);
54};
55
56QT_END_NAMESPACE
57
58#endif // QPLATFORMSERVICES_H
59

source code of qtbase/src/gui/kernel/qplatformservices.h