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 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 37 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 42 of file qplatformservices.h.

Constructor & Destructor Documentation

◆ QPlatformServices()

QPlatformServices::QPlatformServices ( )

Definition at line 37 of file qplatformservices.cpp.

◆ ~QPlatformServices()

virtual QPlatformServices::~QPlatformServices ( )
inlinevirtual

Definition at line 47 of file qplatformservices.h.

Member Function Documentation

◆ colorPicker()

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

Reimplemented in QCocoaServices, and QDesktopUnixServices.

Definition at line 67 of file qplatformservices.cpp.

◆ 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 QAndroidPlatformServices, QDesktopUnixServices, and QHaikuServices.

Definition at line 62 of file qplatformservices.cpp.

◆ hasCapability()

bool QPlatformServices::hasCapability ( Capability capability) const
virtual

Reimplemented in QCocoaServices, and QDesktopUnixServices.

Definition at line 73 of file qplatformservices.cpp.

◆ openDocument()

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

◆ openUrl()

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

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