Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
20
21class QUrl;
22class QWindow;
23
24class Q_GUI_EXPORT QPlatformServiceColorPicker : public QObject
25{
27public:
28 using QObject::QObject;
29 virtual void pickColor() = 0;
31 void colorPicked(const QColor &color);
32};
33
34class Q_GUI_EXPORT QPlatformServices
35{
36public:
37 Q_DISABLE_COPY_MOVE(QPlatformServices)
38
42
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
57
58#endif // QPLATFORMSERVICES_H
\inmodule QtCore
Definition qbytearray.h:57
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
\inmodule QtCore
Definition qobject.h:103
Q_INVOKABLE QObject(QObject *parent=nullptr)
Constructs an object with parent object parent.
Definition qobject.cpp:936
void colorPicked(const QColor &color)
virtual void pickColor()=0
The QPlatformServices provides the backend for desktop-related functionality.
Capability
Capabilities are used to determine a specific platform service's availability.
\inmodule QtCore
Definition qurl.h:94
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
GLuint color
[2]
#define Q_OBJECT
#define Q_SIGNALS
QUrl url("example.com")
[constructor-url-reference]