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 Class Reference

The QPlatformServices provides the backend for desktop-related functionality. More...

#include <qplatformservices.h>

+ Inheritance diagram for QPlatformServices:
+ Collaboration diagram for QPlatformServices:

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 QPlatformServiceColorPickercolorPicker (QWindow *parent=nullptr)
 

Detailed Description

The QPlatformServices provides the backend for desktop-related functionality.

Since
5.0

\preliminary

Definition at line 34 of file qplatformservices.h.

Member Enumeration Documentation

◆ Capability

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.

Constructor & Destructor Documentation

◆ QPlatformServices()

QPlatformServices::QPlatformServices ( )

Definition at line 35 of file qplatformservices.cpp.

◆ ~QPlatformServices()

virtual QPlatformServices::~QPlatformServices ( )
inlinevirtual

Definition at line 44 of file qplatformservices.h.

Member Function Documentation

◆ colorPicker()

QPlatformServiceColorPicker * QPlatformServices::colorPicker ( QWindow * parent = nullptr)
virtual

Reimplemented in QCocoaServices, and QGenericUnixServices.

Definition at line 65 of file qplatformservices.cpp.

References Q_UNUSED.

◆ desktopEnvironment()

QByteArray QPlatformServices::desktopEnvironment ( ) const
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.

References QByteArray().

+ Here is the call graph for this function:

◆ hasCapability()

bool QPlatformServices::hasCapability ( Capability capability) const
virtual

Reimplemented in QGenericUnixServices, and QCocoaServices.

Definition at line 71 of file qplatformservices.cpp.

References Q_UNUSED.

◆ openDocument()

bool QPlatformServices::openDocument ( const QUrl & url)
virtual

Reimplemented in QIOSServices, QGenericUnixServices, QAndroidPlatformServices, QCocoaServices, QHaikuServices, QQnxServices, QWindowsServices, and QtWaylandClient::QWaylandPlatformServices.

Definition at line 45 of file qplatformservices.cpp.

References qPrintable, qWarning, QUrl::toString(), and url.

Referenced by QIOSServices::openDocument().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ openUrl()

bool QPlatformServices::openUrl ( const QUrl & url)
virtual

Reimplemented in QIOSServices, QGenericUnixServices, QAndroidPlatformServices, QCocoaServices, QHaikuServices, QQnxServices, QWasmServices, QWindowsServices, and QtWaylandClient::QWaylandPlatformServices.

Definition at line 38 of file qplatformservices.cpp.

References qPrintable, qWarning, QUrl::toString(), and url.

+ Here is the call graph for this function:

The documentation for this class was generated from the following files: