![]() |
Qt 6.x
The Qt SDK
|
The QPlatformServices provides the backend for desktop-related functionality. More...
#include <qplatformservices.h>
Public Types | |
enum | Capability { ColorPicking } |
Capabilities are used to determine a specific platform service's availability. More... | |
Public Member Functions | |
QPlatformServices () | |
virtual | ~QPlatformServices () |
virtual bool | openUrl (const QUrl &url) |
virtual bool | openDocument (const QUrl &url) |
virtual QByteArray | desktopEnvironment () const |
QPlatformServices::desktopEnvironment returns the active desktop environment. | |
virtual bool | hasCapability (Capability capability) const |
virtual QPlatformServiceColorPicker * | colorPicker (QWindow *parent=nullptr) |
The QPlatformServices provides the backend for desktop-related functionality.
\preliminary
Definition at line 34 of file qplatformservices.h.
Capabilities are used to determine a specific platform service's availability.
\value ColorPickingFromScreen The platform natively supports color picking from screen. This capability indicates that the platform supports "opaque" color picking, where the platform implements a complete user experience for color picking and outputs a color. This is in contrast to the application implementing the color picking user experience (taking care of showing a cross hair, instructing the platform integration to obtain the color at a given pixel, etc.). The related service function is pickColor().
Enumerator | |
---|---|
ColorPicking |
Definition at line 39 of file qplatformservices.h.
QPlatformServices::QPlatformServices | ( | ) |
Definition at line 35 of file qplatformservices.cpp.
|
inlinevirtual |
Definition at line 44 of file qplatformservices.h.
|
virtual |
Reimplemented in QGenericUnixServices.
Definition at line 65 of file qplatformservices.cpp.
|
virtual |
QPlatformServices::desktopEnvironment returns the active desktop environment.
On Unix this function returns the uppercase desktop environment name, such as KDE, GNOME, UNITY, XFCE, LXDE etc. or UNKNOWN if none was detected. The primary way to detect the desktop environment is the environment variable XDG_CURRENT_DESKTOP.
Reimplemented in QGenericUnixServices, QAndroidPlatformServices, and QHaikuServices.
Definition at line 60 of file qplatformservices.cpp.
Referenced by QGenericUnixTheme::themeNames().
|
virtual |
Reimplemented in QGenericUnixServices.
Definition at line 71 of file qplatformservices.cpp.
References Q_UNUSED.
|
virtual |
Reimplemented in QIOSServices, QGenericUnixServices, QAndroidPlatformServices, QCocoaServices, QHaikuServices, QQnxServices, QWindowsServices, and QtWaylandClient::QWaylandWindowManagerIntegration.
Definition at line 45 of file qplatformservices.cpp.
References qPrintable, qWarning, QUrl::toString(), and url.
Referenced by QIOSServices::openDocument(), and QDesktopServices::openUrl().
|
virtual |
Reimplemented in QIOSServices, QGenericUnixServices, QAndroidPlatformServices, QCocoaServices, QHaikuServices, QQnxServices, QWasmServices, QWindowsServices, and QtWaylandClient::QWaylandWindowManagerIntegration.
Definition at line 38 of file qplatformservices.cpp.
References qPrintable, qWarning, QUrl::toString(), and url.
Referenced by QDesktopServices::openUrl().