Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
QPlatformIntegration Class Referenceabstract

The QPlatformIntegration class is the entry for WindowSystem specific functionality. More...

#include <qplatformintegration.h>

+ Inheritance diagram for QPlatformIntegration:
+ Collaboration diagram for QPlatformIntegration:

Public Types

enum  Capability {
  ThreadedPixmaps = 1 , OpenGL , ThreadedOpenGL , SharedGraphicsCache ,
  BufferQueueingOpenGL , WindowMasks , MultipleWindows , ApplicationState ,
  ForeignWindows , NonFullScreenWindows , NativeWidgets , WindowManagement ,
  WindowActivation , SyncState , RasterGLSurface , AllGLFunctionsQueryable ,
  ApplicationIcon , SwitchableWidgetComposition , TopStackedNativeChildWindows , OpenGLOnRasterSurface ,
  MaximizeUsingFullscreenGeometry , PaintEvents , RhiBasedRendering , ScreenWindowGrabbing
}
 Capabilities are used to determine specific features of a platform integration. More...
 
enum  StyleHint {
  CursorFlashTime , KeyboardInputInterval , MouseDoubleClickInterval , StartDragDistance ,
  StartDragTime , KeyboardAutoRepeatRate , ShowIsFullScreen , PasswordMaskDelay ,
  FontSmoothingGamma , StartDragVelocity , UseRtlExtensions , PasswordMaskCharacter ,
  SetFocusOnTouchRelease , ShowIsMaximized , MousePressAndHoldInterval , TabFocusBehavior ,
  ReplayMousePressOutsidePopup , ItemViewActivateItemOnSingleClick , UiEffects , WheelScrollLines ,
  ShowShortcutsInContextMenus , MouseQuickSelectionThreshold , MouseDoubleClickDistance , FlickStartDistance ,
  FlickMaximumVelocity , FlickDeceleration , UnderlineShortcut
}
 

Public Member Functions

virtual ~QPlatformIntegration ()
 
virtual bool hasCapability (Capability cap) const
 
virtual QPlatformPixmapcreatePlatformPixmap (QPlatformPixmap::PixelType type) const
 Factory function for QPlatformPixmap.
 
virtual QPlatformWindowcreatePlatformWindow (QWindow *window) const =0
 Factory function for QPlatformWindow.
 
virtual QPlatformWindowcreateForeignWindow (QWindow *, WId) const
 
virtual QPlatformBackingStorecreatePlatformBackingStore (QWindow *window) const =0
 Factory function for QPlatformBackingStore.
 
virtual QPlatformOpenGLContextcreatePlatformOpenGLContext (QOpenGLContext *context) const
 Factory function for QPlatformOpenGLContext.
 
virtual QPlatformSharedGraphicsCachecreatePlatformSharedGraphicsCache (const char *cacheId) const
 Factory function for QPlatformSharedGraphicsCache.
 
virtual QPaintEnginecreateImagePaintEngine (QPaintDevice *paintDevice) const
 Factory function for QPaintEngine.
 
virtual QAbstractEventDispatchercreateEventDispatcher () const =0
 Factory function for the GUI event dispatcher.
 
virtual void initialize ()
 Performs initialization steps that depend on having an event dispatcher available.
 
virtual void destroy ()
 Called before the platform integration is deleted.
 
virtual QPlatformFontDatabasefontDatabase () const
 Accessor for the platform integration's fontdatabase.
 
virtual QPlatformClipboardclipboard () const
 Accessor for the platform integration's clipboard.
 
virtual QPlatformInputContextinputContext () const
 Returns the platforms input context.
 
virtual QPlatformNativeInterfacenativeInterface () const
 
virtual QPlatformServicesservices () const
 
virtual QVariant styleHint (StyleHint hint) const
 
virtual Qt::WindowState defaultWindowState (Qt::WindowFlags) const
 
virtual Qt::KeyboardModifiers queryKeyboardModifiers () const
 
virtual QList< int > possibleKeys (const QKeyEvent *) const
 Should be used to obtain a list of possible shortcuts for the given key event.
 
virtual QStringList themeNames () const
 
virtual QPlatformThemecreatePlatformTheme (const QString &name) const
 
virtual QPlatformOffscreenSurfacecreatePlatformOffscreenSurface (QOffscreenSurface *surface) const
 Factory function for QOffscreenSurface.
 
virtual QPlatformSessionManagercreatePlatformSessionManager (const QString &id, const QString &key) const
 
virtual void sync ()
 
virtual QOpenGLContext::OpenGLModuleType openGLModuleType ()
 Platform integration function for querying the OpenGL implementation type.
 
virtual void setApplicationIcon (const QIcon &icon) const
 
virtual void setApplicationBadge (qint64 number)
 
virtual void beep () const
 
virtual void quit () const
 
template<auto func, typename... Args>
auto call (Args... args)
 

Protected Member Functions

 QPlatformIntegration ()=default
 

Detailed Description

The QPlatformIntegration class is the entry for WindowSystem specific functionality.

Since
4.8

\preliminary

QPlatformIntegration is the single entry point for windowsystem specific functionality when using the QPA platform. It has factory functions for creating platform specific pixmaps and windows. The class also controls the font subsystem.

QPlatformIntegration is a singleton class which gets instantiated in the QGuiApplication constructor. The QPlatformIntegration instance do not have ownership of objects it creates in functions where the name starts with create. However, functions which don't have a name starting with create acts as accessors to member variables.

It is not trivial to create or build a platform plugin outside of the Qt source tree. Therefore the recommended approach for making new platform plugin is to copy an existing plugin inside the QTSRCTREE/src/plugins/platform and develop the plugin inside the source tree.

The minimal platform integration is the smallest platform integration it is possible to make, which makes it an ideal starting point for new plugins. For a slightly more advanced plugin, consider reviewing the directfb plugin, or the testlite plugin.

Definition at line 72 of file qplatformintegration.h.

Member Enumeration Documentation

◆ Capability

Capabilities are used to determine specific features of a platform integration.

\value ThreadedPixmaps The platform uses a pixmap implementation that is reentrant and can be used from multiple threads, like the raster paint engine and QImage based pixmaps.

\value OpenGL The platform supports OpenGL

\value ThreadedOpenGL The platform supports using OpenGL outside the GUI thread.

\value SharedGraphicsCache The platform supports a shared graphics cache

\value BufferQueueingOpenGL Deprecated. The OpenGL implementation on the platform will queue up buffers when swapBuffers() is called and block only when its buffer pipeline is full, rather than block immediately.

\value MultipleWindows The platform supports multiple QWindows, i.e. does some kind of compositing either client or server side. Some platforms might only support a single fullscreen window.

\value ApplicationState The platform handles the application state explicitly. This means that QEvent::ApplicationActivate and QEvent::ApplicationDeativate will not be posted automatically. Instead, the platform must handle application state explicitly by using QWindowSystemInterface::handleApplicationStateChanged(). If not set, application state will follow window activation, which is the normal behavior for desktop platforms.

\value ForeignWindows The platform allows creating QWindows which represent native windows created by other processes or by using native libraries.

\value NonFullScreenWindows The platform supports top-level windows which do not fill the screen. The default implementation returns true. Returning false for this will cause all windows, including dialogs and popups, to be resized to fill the screen.

\value WindowManagement The platform is based on a system that performs window management. This includes the typical desktop platforms. Can be set to false on platforms where no window management is available, meaning for example that windows are never repositioned by the window manager. The default implementation returns true.

\value AllGLFunctionsQueryable Deprecated. Used to indicate whether the QOpenGLContext backend provided by the platform is able to return function pointers from getProcAddress() even for standard OpenGL functions, for example OpenGL 1 functions like glClear() or glDrawArrays(). This is important because the OpenGL specifications do not require this ability from the getProcAddress implementations of the windowing system interfaces (EGL, WGL, GLX). The platform plugins may however choose to enhance the behavior in the backend implementation for QOpenGLContext::getProcAddress() and support returning a function pointer also for the standard, non-extension functions. This capability is a prerequisite for dynamic OpenGL loading. Starting with Qt 5.7, the platform plugin is required to have this capability.

\value ApplicationIcon The platform supports setting the application icon. (since 5.5)

\value TopStackedNativeChildWindows The platform supports native child windows via QWindowContainer without having to punch a transparent hole in the backingstore. (since 5.10)

\value OpenGLOnRasterSurface The platform supports making a QOpenGLContext current in combination with a QWindow of type RasterSurface.

\value PaintEvents The platform sends paint events instead of expose events when the window needs repainting. Expose events are only sent when a window is toggled from a non-exposed to exposed state or back.

\value RhiBasedRendering The platform supports one or more of the 3D rendering APIs that Qt Quick and other components can use via the Qt Rendering Hardware Interface. On platforms where it is clear upfront that the platform cannot, or does not want to, support rendering via 3D graphics APIs such as OpenGL, Vulkan, Direct 3D, or Metal, this capability can be reported as false. That in effect means that in modules where there is an alternative, such as Qt Quick with its software backend, an automatic fallback to that alternative may occur, if applicable. The default implementation of hasCapability() returns true.

\value ScreenWindowGrabbing The platform supports grabbing window on screen. On Wayland, this capability can be reported as false. The default implementation of hasCapability() returns true.

Enumerator
ThreadedPixmaps 
OpenGL 
ThreadedOpenGL 
SharedGraphicsCache 
BufferQueueingOpenGL 
WindowMasks 
MultipleWindows 
ApplicationState 
ForeignWindows 
NonFullScreenWindows 
NativeWidgets 
WindowManagement 
WindowActivation 
SyncState 
RasterGLSurface 
AllGLFunctionsQueryable 
ApplicationIcon 
SwitchableWidgetComposition 
TopStackedNativeChildWindows 
OpenGLOnRasterSurface 
MaximizeUsingFullscreenGeometry 
PaintEvents 
RhiBasedRendering 
ScreenWindowGrabbing 

Definition at line 77 of file qplatformintegration.h.

◆ StyleHint

Enumerator
CursorFlashTime 
KeyboardInputInterval 
MouseDoubleClickInterval 
StartDragDistance 
StartDragTime 
KeyboardAutoRepeatRate 
ShowIsFullScreen 
PasswordMaskDelay 
FontSmoothingGamma 
StartDragVelocity 
UseRtlExtensions 
PasswordMaskCharacter 
SetFocusOnTouchRelease 
ShowIsMaximized 
MousePressAndHoldInterval 
TabFocusBehavior 
ReplayMousePressOutsidePopup 
ItemViewActivateItemOnSingleClick 
UiEffects 
WheelScrollLines 
ShowShortcutsInContextMenus 
MouseQuickSelectionThreshold 
MouseDoubleClickDistance 
FlickStartDistance 
FlickMaximumVelocity 
FlickDeceleration 
UnderlineShortcut 

Definition at line 141 of file qplatformintegration.h.

Constructor & Destructor Documentation

◆ ~QPlatformIntegration()

virtual QPlatformIntegration::~QPlatformIntegration ( )
inlinevirtual

Definition at line 104 of file qplatformintegration.h.

◆ QPlatformIntegration()

QPlatformIntegration::QPlatformIntegration ( )
protecteddefault

Member Function Documentation

◆ beep()

void QPlatformIntegration::beep ( ) const
virtual
Since
5.7

Should sound a bell, using the default volume and sound.

See also
QApplication::beep()

Reimplemented in QCocoaIntegration, QIOSIntegration, QWindowsIntegration, and QXcbIntegration.

Definition at line 519 of file qplatformintegration.cpp.

Referenced by QApplication::beep().

+ Here is the caller graph for this function:

◆ call()

template<auto func, typename... Args>
auto QPlatformIntegration::call ( Args...  args)
inline

Definition at line 202 of file qplatformintegration.h.

References args.

◆ clipboard()

QPlatformClipboard * QPlatformIntegration::clipboard ( ) const
virtual

Accessor for the platform integration's clipboard.

Default implementation returns a default QPlatformClipboard.

See also
QPlatformClipboard

Reimplemented in QAndroidPlatformIntegration, QCocoaIntegration, QHaikuIntegration, QIOSIntegration, QQnxIntegration, QWasmIntegration, and QXcbIntegration.

Definition at line 51 of file qplatformintegration.cpp.

References clipboard().

Referenced by clipboard(), QIOSIntegration::clipboard(), QtWaylandClient::QWaylandDataDevice::data_device_selection(), QtWaylandClient::QWaylandDataDevice::invalidateSelectionOffer(), QtWaylandClient::QWaylandPrimarySelectionDeviceV1::invalidateSelectionOffer(), QClipboard::mimeData(), QClipboard::setMimeData(), QtWaylandClient::QWaylandPrimarySelectionDeviceV1::setSelectionSource(), and QtWaylandClient::QWaylandPrimarySelectionDeviceV1::zwp_primary_selection_device_v1_selection().

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

◆ createEventDispatcher()

QAbstractEventDispatcher * QPlatformIntegration::createEventDispatcher ( ) const
pure virtual

Factory function for the GUI event dispatcher.

The platform plugin should create and return a QAbstractEventDispatcher subclass when this function is called.

If the platform plugin for some reason creates the event dispatcher outside of this function (for example in the constructor), it needs to handle the case where this function is never called, ensuring that the event dispatcher is still deleted at some point (typically in the destructor).

Note that the platform plugin should never explicitly set the event dispatcher itself, using QCoreApplication::setEventDispatcher(), but let QCoreApplication decide when and which event dispatcher to create.

Since
5.2

Implemented in QAndroidPlatformIntegration, QBsdFbIntegration, QCocoaIntegration, QDirectFbIntegration, QEglFSIntegration, QHaikuIntegration, QIntegrityFbIntegration, QIOSIntegration, QLinuxFbIntegration, QMinimalIntegration, QMinimalEglIntegration, QOffscreenIntegration, QQnxIntegration, QVkKhrDisplayIntegration, QVncIntegration, QWasmIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Referenced by QGuiApplicationPrivate::createEventDispatcher().

+ Here is the caller graph for this function:

◆ createForeignWindow()

virtual QPlatformWindow * QPlatformIntegration::createForeignWindow ( QWindow ,
WId   
) const
inlinevirtual

Reimplemented in QAndroidPlatformIntegration, QCocoaIntegration, QQnxIntegration, QWindowsIntegration, and QXcbIntegration.

Definition at line 110 of file qplatformintegration.h.

Referenced by QWindowPrivate::create().

+ Here is the caller graph for this function:

◆ createImagePaintEngine()

QPaintEngine * QPlatformIntegration::createImagePaintEngine ( QPaintDevice paintDevice) const
virtual

Factory function for QPaintEngine.

This function will return 0 if the platform integration does not support creating any paint engine the given paintDevice.

Definition at line 307 of file qplatformintegration.cpp.

References Q_UNUSED.

Referenced by QImage::paintEngine().

+ Here is the caller graph for this function:

◆ createPlatformBackingStore()

QPlatformBackingStore * QPlatformIntegration::createPlatformBackingStore ( QWindow window) const
pure virtual

Factory function for QPlatformBackingStore.

The QWindow parameter is a pointer to the top level widget(tlw) the window surface is created for. A QPlatformWindow is always created before the QPlatformBackingStore for tlw where the widget also requires a backing store.

See also
QBackingStore
createPlatformWindow()

Implemented in QCocoaIntegration, QAndroidPlatformIntegration, QBsdFbIntegration, QWindowsDirect2DIntegration, QDirectFbIntegration, QEglFSIntegration, QHaikuIntegration, QIntegrityFbIntegration, QIOSIntegration, QLinuxFbIntegration, QMinimalIntegration, QMinimalEglIntegration, QOffscreenIntegration, QQnxIntegration, QVkKhrDisplayIntegration, QVncIntegration, QWasmIntegration, QWindowsGdiIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Referenced by QBackingStore::handle().

+ Here is the caller graph for this function:

◆ createPlatformOffscreenSurface()

QPlatformOffscreenSurface * QPlatformIntegration::createPlatformOffscreenSurface ( QOffscreenSurface surface) const
virtual

Factory function for QOffscreenSurface.

An offscreen surface will typically be implemented with a pixel buffer (pbuffer). If the platform doesn't support offscreen surfaces, an invisible window will be used by QOffscreenSurface instead.

Reimplemented in QAndroidPlatformIntegration, QCocoaIntegration, QEglFSIntegration, QIOSIntegration, QWasmIntegration, and QXcbIntegration.

Definition at line 479 of file qplatformintegration.cpp.

References Q_UNUSED.

Referenced by QOffscreenSurface::create().

+ Here is the caller graph for this function:

◆ createPlatformOpenGLContext()

QPlatformOpenGLContext * QPlatformIntegration::createPlatformOpenGLContext ( QOpenGLContext context) const
virtual

Factory function for QPlatformOpenGLContext.

The context parameter is a pointer to the context for which a platform-specific context backend needs to be created. Configuration settings like the format, share context and screen have to be taken from this QOpenGLContext and the resulting platform context is expected to be backed by a native context that fulfills these criteria.

If the context has native handles set, no new native context is expected to be created. Instead, the provided handles have to be used. In this case the ownership of the handle must not be taken and the platform implementation is not allowed to destroy the native context. Configuration parameters like the format are also to be ignored. Instead, the platform implementation is responsible for querying the configuriation from the provided native context.

Returns a pointer to a QPlatformOpenGLContext instance or \nullptr if the context could not be created.

See also
QOpenGLContext

Reimplemented in QAndroidPlatformIntegration, QCocoaIntegration, QEglFSIntegration, QMinimalEglIntegration, QWasmIntegration, QWindowsIntegration, and QXcbIntegration.

Definition at line 284 of file qplatformintegration.cpp.

References context, Q_UNUSED, and qWarning.

Referenced by QOpenGLContext::create().

+ Here is the caller graph for this function:

◆ createPlatformPixmap()

QPlatformPixmap * QPlatformIntegration::createPlatformPixmap ( QPlatformPixmap::PixelType  type) const
virtual

Factory function for QPlatformPixmap.

PixelType can be either PixmapType or BitmapType.

See also
QPlatformPixmap

Reimplemented in QWindowsDirect2DIntegration, QDirectFbIntegration, QWindowsGdiIntegration, and QXcbIntegration.

Definition at line 259 of file qplatformintegration.cpp.

Referenced by QPlatformPixmap::create(), QPlatformPixmap::createCompatiblePlatformPixmap(), and QXcbIntegration::createPlatformPixmap().

+ Here is the caller graph for this function:

◆ createPlatformSessionManager()

QPlatformSessionManager * QPlatformIntegration::createPlatformSessionManager ( const QString id,
const QString key 
) const
virtual
Since
5.2

Factory function for QPlatformSessionManager. The default QPlatformSessionManager provides the same functionality as the QSessionManager.

Definition at line 492 of file qplatformintegration.cpp.

Referenced by QSessionManagerPrivate::QSessionManagerPrivate().

+ Here is the caller graph for this function:

◆ createPlatformSharedGraphicsCache()

QPlatformSharedGraphicsCache * QPlatformIntegration::createPlatformSharedGraphicsCache ( const char *  cacheId) const
virtual

Factory function for QPlatformSharedGraphicsCache.

This function will return 0 if the platform integration does not support any shared graphics cache mechanism for the given cacheId.

Definition at line 296 of file qplatformintegration.cpp.

References qWarning.

◆ createPlatformTheme()

class QPlatformTheme * QPlatformIntegration::createPlatformTheme ( const QString name) const
virtual

◆ createPlatformWindow()

QPlatformWindow * QPlatformIntegration::createPlatformWindow ( QWindow window) const
pure virtual

Factory function for QPlatformWindow.

The window parameter is a pointer to the window which the QPlatformWindow is supposed to be created for.

All windows have to have a QPlatformWindow, and it will be created on-demand when the QWindow is made visible for the first time, or explicitly through calling QWindow::create().

In the constructor, of the QPlatformWindow, the window flags, state, title and geometry of the window should be applied to the underlying window. If the resulting flags or state differs, the resulting values should be set on the window using QWindow::setWindowFlags() or QWindow::setWindowState(), respectively.

See also
QPlatformWindow, QPlatformWindowFormat
createPlatformBackingStore()

Implemented in QAndroidPlatformIntegration, QBsdFbIntegration, QCocoaIntegration, QDirectFbIntegration, QEglFSIntegration, QHaikuIntegration, QIntegrityFbIntegration, QIOSIntegration, QLinuxFbIntegration, QMinimalIntegration, QMinimalEglIntegration, QOffscreenIntegration, QQnxIntegration, QVkKhrDisplayIntegration, QVncIntegration, QWasmIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Referenced by QWindowPrivate::create().

+ Here is the caller graph for this function:

◆ defaultWindowState()

Qt::WindowState QPlatformIntegration::defaultWindowState ( Qt::WindowFlags  flags) const
virtual

Reimplemented in QAndroidPlatformIntegration, and QWasmIntegration.

Definition at line 426 of file qplatformintegration.cpp.

References Qt::Popup, ShowIsFullScreen, ShowIsMaximized, styleHint(), Qt::SubWindow, toBool(), Qt::Window, Qt::WindowFullScreen, Qt::WindowMaximized, and Qt::WindowNoState.

Referenced by QAndroidPlatformIntegration::defaultWindowState(), QWasmIntegration::defaultWindowState(), QWindow::show(), and QWidget::show().

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

◆ destroy()

void QPlatformIntegration::destroy ( )
virtual

Called before the platform integration is deleted.

Useful when cleanup relies on virtual functions.

Since
5.5

Reimplemented in QEglFSIntegration.

Definition at line 331 of file qplatformintegration.cpp.

Referenced by QGuiApplicationPrivate::~QGuiApplicationPrivate().

+ Here is the caller graph for this function:

◆ fontDatabase()

QT_BEGIN_NAMESPACE QPlatformFontDatabase * QPlatformIntegration::fontDatabase ( ) const
virtual

◆ hasCapability()

bool QPlatformIntegration::hasCapability ( Capability  cap) const
virtual

Reimplemented in QDirectFbIntegration, QIOSIntegration, QXcbIntegration, QAndroidPlatformIntegration, QBsdFbIntegration, QCocoaIntegration, QEglFSIntegration, QHaikuIntegration, QIntegrityFbIntegration, QLinuxFbIntegration, QMinimalIntegration, QMinimalEglIntegration, QOffscreenIntegration, QOffscreenX11Integration, QQnxIntegration, QVkKhrDisplayIntegration, QVncIntegration, QWasmIntegration, QWindowsIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 252 of file qplatformintegration.cpp.

References NativeWidgets, NonFullScreenWindows, RhiBasedRendering, ScreenWindowGrabbing, TopStackedNativeChildWindows, WindowActivation, and WindowManagement.

Referenced by QWidgetPrivate::create(), QWindowContainer::event(), QDirectFbIntegration::hasCapability(), QIOSIntegration::hasCapability(), QXcbIntegration::hasCapability(), QAndroidPlatformIntegration::hasCapability(), QBsdFbIntegration::hasCapability(), QCocoaIntegration::hasCapability(), QEglFSIntegration::hasCapability(), QHaikuIntegration::hasCapability(), QIntegrityFbIntegration::hasCapability(), QLinuxFbIntegration::hasCapability(), QMinimalIntegration::hasCapability(), QMinimalEglIntegration::hasCapability(), QOffscreenIntegration::hasCapability(), QQnxIntegration::hasCapability(), QVkKhrDisplayIntegration::hasCapability(), QVncIntegration::hasCapability(), QWasmIntegration::hasCapability(), QWindowsIntegration::hasCapability(), QtWaylandClient::QWaylandIntegration::hasCapability(), QQuickPixmap::load(), QQuickMenu::popup(), QGuiApplicationPrivate::processExposeEvent(), qt_painter_thread_test(), qt_pixmap_thread_test(), QPlatformScreen::resizeMaximizedWindows(), QWidget::setAttribute(), QWidgetPrivate::setGeometry_sys(), QQuickColorDialogImpl::setOptions(), shouldCascade(), QWidgetPrivate::show_sys(), QQuickApplication::supportsMultipleWindows(), QSurface::supportsOpenGL(), and QOpenGLContext::supportsThreadedOpenGL().

+ Here is the caller graph for this function:

◆ initialize()

void QPlatformIntegration::initialize ( )
virtual

Performs initialization steps that depend on having an event dispatcher available.

Called after the event dispatcher has been created.

Tasks that require an event dispatcher, for example creating socket notifiers, cannot be performed in the constructor. Instead, they should be performed here. The default implementation does nothing.

Reimplemented in QAndroidPlatformIntegration, QBsdFbIntegration, QEglFSIntegration, QIntegrityFbIntegration, QIOSIntegration, QLinuxFbIntegration, QOffscreenIntegration, QVkKhrDisplayIntegration, QVncIntegration, QWasmIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 321 of file qplatformintegration.cpp.

Referenced by QGuiApplicationPrivate::eventDispatcherReady().

+ Here is the caller graph for this function:

◆ inputContext()

QPlatformInputContext * QPlatformIntegration::inputContext ( ) const
virtual

◆ nativeInterface()

◆ openGLModuleType()

QOpenGLContext::OpenGLModuleType QPlatformIntegration::openGLModuleType ( )
virtual

Platform integration function for querying the OpenGL implementation type.

Used only when dynamic OpenGL implementation loading is enabled.

Subclasses should reimplement this function and return a value based on the OpenGL implementation they have chosen to load.

Note
The return value does not indicate or limit the types of contexts that can be created by a given implementation. For example a desktop OpenGL implementation may be capable of creating OpenGL ES-compatible contexts too.
See also
QOpenGLContext::openGLModuleType(), QOpenGLContext::isOpenGLES()
Since
5.3

Reimplemented in QWindowsIntegration.

Definition at line 555 of file qplatformintegration.cpp.

References QOpenGLContext::LibGL, and qWarning.

Referenced by QOpenGLContext::openGLModuleType().

+ Here is the caller graph for this function:

◆ possibleKeys()

QList< int > QPlatformIntegration::possibleKeys ( const QKeyEvent ) const
virtual

Should be used to obtain a list of possible shortcuts for the given key event.

Shortcuts should be encoded as int(Qt::Key + Qt::KeyboardModifiers).

One example for more than one possibility is the key combination of Shift+5. That one might trigger a shortcut which is set as "Shift+5" as well as one using %. These combinations depend on the currently set keyboard layout.

Note
This function should be called only from key event handlers.

Reimplemented in QWindowsIntegration, QXcbIntegration, QCocoaIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 458 of file qplatformintegration.cpp.

Referenced by QKeyMapperPrivate::possibleKeys().

+ Here is the caller graph for this function:

◆ queryKeyboardModifiers()

Qt::KeyboardModifiers QPlatformIntegration::queryKeyboardModifiers ( ) const
virtual

Reimplemented in QCocoaIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 443 of file qplatformintegration.cpp.

References QGuiApplication::keyboardModifiers().

+ Here is the call graph for this function:

◆ quit()

void QPlatformIntegration::quit ( ) const
virtual
Since
6.0

Asks the platform to terminate the application.

Overrides should ensure there's a callback into the QWSI function handleApplicationTermination so that the quit can be propagated to QtGui and the application.

Reimplemented in QCocoaIntegration.

Definition at line 532 of file qplatformintegration.cpp.

Referenced by QGuiApplicationPrivate::quit().

+ Here is the caller graph for this function:

◆ services()

◆ setApplicationBadge()

void QPlatformIntegration::setApplicationBadge ( qint64  number)
virtual
Since
6.5

Should set the application's badge to number.

If the number is 0 the badge should be cleared.

See also
QGuiApplication::setBadge()

Reimplemented in QCocoaIntegration, QIOSIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 583 of file qplatformintegration.cpp.

References number, and Q_UNUSED.

Referenced by QGuiApplication::setBadgeNumber().

+ Here is the caller graph for this function:

◆ setApplicationIcon()

void QPlatformIntegration::setApplicationIcon ( const QIcon icon) const
virtual
Since
5.5

Platform integration function for setting the application icon.

See also
QGuiApplication::setWindowIcon()

Reimplemented in QCocoaIntegration.

Definition at line 569 of file qplatformintegration.cpp.

References icon, and Q_UNUSED.

Referenced by QGuiApplication::setWindowIcon().

+ Here is the caller graph for this function:

◆ styleHint()

QVariant QPlatformIntegration::styleHint ( StyleHint  hint) const
virtual

Reimplemented in QMinimalEglIntegration, QWasmIntegration, QAndroidPlatformIntegration, QCocoaIntegration, QIOSIntegration, QQnxIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 364 of file qplatformintegration.cpp.

References CursorFlashTime, QPlatformTheme::CursorFlashTime, QPlatformTheme::defaultThemeHint(), FlickDeceleration, QPlatformTheme::FlickDeceleration, FlickMaximumVelocity, QPlatformTheme::FlickMaximumVelocity, FlickStartDistance, QPlatformTheme::FlickStartDistance, FontSmoothingGamma, hint(), ItemViewActivateItemOnSingleClick, QPlatformTheme::ItemViewActivateItemOnSingleClick, KeyboardAutoRepeatRate, QPlatformTheme::KeyboardAutoRepeatRate, KeyboardInputInterval, QPlatformTheme::KeyboardInputInterval, MouseDoubleClickDistance, QPlatformTheme::MouseDoubleClickDistance, MouseDoubleClickInterval, QPlatformTheme::MouseDoubleClickInterval, MousePressAndHoldInterval, QPlatformTheme::MousePressAndHoldInterval, MouseQuickSelectionThreshold, QPlatformTheme::MouseQuickSelectionThreshold, PasswordMaskCharacter, QPlatformTheme::PasswordMaskCharacter, PasswordMaskDelay, QPlatformTheme::PasswordMaskDelay, ReplayMousePressOutsidePopup, SetFocusOnTouchRelease, QPlatformTheme::SetFocusOnTouchRelease, ShowIsFullScreen, ShowIsMaximized, ShowShortcutsInContextMenus, QPlatformTheme::ShowShortcutsInContextMenus, StartDragDistance, QPlatformTheme::StartDragDistance, StartDragTime, QPlatformTheme::StartDragTime, StartDragVelocity, QPlatformTheme::StartDragVelocity, TabFocusBehavior, QPlatformTheme::TabFocusBehavior, UiEffects, QPlatformTheme::UiEffects, UnderlineShortcut, UseRtlExtensions, WheelScrollLines, and QPlatformTheme::WheelScrollLines.

Referenced by defaultWindowState(), QQuickFlickablePrivate::handleReleaseEvent(), hint(), QMinimalEglIntegration::styleHint(), QWasmIntegration::styleHint(), QAndroidPlatformIntegration::styleHint(), QCocoaIntegration::styleHint(), QIOSIntegration::styleHint(), QQnxIntegration::styleHint(), QWindowsIntegration::styleHint(), QXcbIntegration::styleHint(), QtWaylandClient::QWaylandIntegration::styleHint(), themeableHint(), and QPlatformTheme::themeHint().

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

◆ sync()

void QPlatformIntegration::sync ( )
virtual
Since
5.2

Function to sync the platform integrations state with the window system.

This is often implemented as a roundtrip from the platformintegration to the window system.

This function should not call QWindowSystemInterface::flushWindowSystemEvents() or QCoreApplication::processEvents()

Reimplemented in QXcbIntegration.

Definition at line 508 of file qplatformintegration.cpp.

Referenced by QGuiApplication::sync().

+ Here is the caller graph for this function:

◆ themeNames()

QStringList QPlatformIntegration::themeNames ( ) const
virtual

Reimplemented in QAndroidPlatformIntegration, QCocoaIntegration, QIOSIntegration, QOffscreenIntegration, QWasmIntegration, QWindowsIntegration, QXcbIntegration, and QtWaylandClient::QWaylandIntegration.

Definition at line 463 of file qplatformintegration.cpp.

Referenced by QXdgDesktopPortalTheme::QXdgDesktopPortalTheme(), and init_platform().

+ Here is the caller graph for this function:

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