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.cpp
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
#
include
"qplatformservices.h"
5
6
#
include
<
QtCore
/
QUrl
>
7
#
include
<
QtCore
/
QString
>
8
#
include
<
QtCore
/
QDebug
>
9
10
QT_BEGIN_NAMESPACE
11
12
Q_LOGGING_CATEGORY(lcQpaServices,
"qt.qpa.services"
, QtWarningMsg)
13
14
/*!
15
\class QPlatformServices
16
\since 5.0
17
\internal
18
\preliminary
19
\ingroup qpa
20
21
\brief The QPlatformServices provides the backend for desktop-related functionality.
22
*/
23
24
/*!
25
\enum QPlatformServices::Capability
26
27
Capabilities are used to determine a specific platform service's availability.
28
29
\value ColorPickingFromScreen The platform natively supports color picking from screen.
30
This capability indicates that the platform supports "opaque" color picking, where the
31
platform implements a complete user experience for color picking and outputs a color.
32
This is in contrast to the application implementing the color picking user experience
33
(taking care of showing a cross hair, instructing the platform integration to obtain
34
the color at a given pixel, etc.). The related service function is pickColor().
35
*/
36
37
QPlatformServices::QPlatformServices()
38
{ }
39
40
bool
QPlatformServices::openUrl(
const
QUrl &url)
41
{
42
qWarning(
"This plugin does not support QPlatformServices::openUrl() for '%s'."
,
43
qPrintable(url.toString()));
44
return
false
;
45
}
46
47
bool
QPlatformServices::openDocument(
const
QUrl &url)
48
{
49
qWarning(
"This plugin does not support QPlatformServices::openDocument() for '%s'."
,
50
qPrintable(url.toString()));
51
return
false
;
52
}
53
54
/*!
55
* \brief QPlatformServices::desktopEnvironment returns the active desktop environment.
56
*
57
* On Unix this function returns the uppercase desktop environment name, such as
58
* KDE, GNOME, UNITY, XFCE, LXDE etc. or UNKNOWN if none was detected.
59
* The primary way to detect the desktop environment is the environment variable
60
* XDG_CURRENT_DESKTOP.
61
*/
62
QByteArray QPlatformServices::desktopEnvironment()
const
63
{
64
return
QByteArray(
"UNKNOWN"
);
65
}
66
67
QPlatformServiceColorPicker *QPlatformServices::colorPicker(QWindow *parent)
68
{
69
Q_UNUSED(parent);
70
return
nullptr
;
71
}
72
73
bool
QPlatformServices::hasCapability(Capability capability)
const
74
{
75
Q_UNUSED(capability)
76
return
false
;
77
}
78
79
QT_END_NAMESPACE
80
81
#
include
"moc_qplatformservices.cpp"
QPlatformGraphicsBufferHelper
\inmodule QtGui
qtbase
src
gui
kernel
qplatformservices.cpp
Generated on
for Qt by
1.14.0