Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qplatformservices.h
Go to the documentation of this file.
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#include <QtCore/qloggingcategory.h>
19
21
23
24class QUrl;
25class QWindow;
26
27class Q_GUI_EXPORT QPlatformServiceColorPicker : public QObject
28{
29 Q_OBJECT
30public:
31 using QObject::QObject;
32 virtual void pickColor() = 0;
33Q_SIGNALS:
34 void colorPicked(const QColor &color);
35};
36
37class Q_GUI_EXPORT QPlatformServices
38{
39public:
40 Q_DISABLE_COPY_MOVE(QPlatformServices)
41
42 enum Capability {
43 ColorPicking,
44 };
45
46 QPlatformServices();
47 virtual ~QPlatformServices() { }
48
49 virtual bool openUrl(const QUrl &url);
50 virtual bool openDocument(const QUrl &url);
51
52 virtual QByteArray desktopEnvironment() const;
53
54 virtual bool hasCapability(Capability capability) const;
55
56 virtual QPlatformServiceColorPicker *colorPicker(QWindow *parent = nullptr);
57};
58
59QT_END_NAMESPACE
60
61#endif // QPLATFORMSERVICES_H
The QPlatformServices provides the backend for desktop-related functionality.
QT_BEGIN_NAMESPACE QT_DECLARE_EXPORTED_QT_LOGGING_CATEGORY(lcAotCompiler, Q_QMLCOMPILER_EXPORT)