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