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
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 ,
  BackingStoreStaticContents
}
 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 QPlatformKeyMapperkeyMapper () const
 Accessor for the platform integration's key mapper.
 
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

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.
 
 QPlatformIntegration ()=default
 

Friends

class QPlatformKeyMapper
 

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 73 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.

\value BackingStoreStaticContents The platform backingstore supports static contents. On resize of the backingstore the static contents region is provided, and the backing store is expected to propagate the static content to the resized backing store, without clients needing to repaint the static content region.

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 
BackingStoreStaticContents 

Definition at line 78 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 143 of file qplatformintegration.h.

Constructor & Destructor Documentation

◆ ~QPlatformIntegration()

virtual QPlatformIntegration::~QPlatformIntegration ( )
inlinevirtual

Definition at line 106 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 540 of file qplatformintegration.cpp.

◆ call()

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

Definition at line 208 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, QQnxIntegration, QWasmIntegration, and QXcbIntegration.

Definition at line 52 of file qplatformintegration.cpp.

References clipboard().

Referenced by clipboard().

+ 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.

◆ createForeignWindow()

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

◆ 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 313 of file qplatformintegration.cpp.

References Q_UNUSED.

Referenced by QImage::paintEngine().

+ Here is the caller graph for this function:

◆ createPlatformBackingStore()

◆ 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 500 of file qplatformintegration.cpp.

References Q_UNUSED.

◆ 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 290 of file qplatformintegration.cpp.

References context, Q_UNUSED, and qWarning.

◆ 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 265 of file qplatformintegration.cpp.

Referenced by 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 513 of file qplatformintegration.cpp.

◆ 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 302 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.

◆ defaultWindowState()

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

Reimplemented in QAndroidPlatformIntegration, and QWasmIntegration.

Definition at line 447 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(), and QWasmIntegration::defaultWindowState().

+ 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 337 of file qplatformintegration.cpp.

◆ fontDatabase()

QT_BEGIN_NAMESPACE QPlatformFontDatabase * QPlatformIntegration::fontDatabase ( ) const
virtual

Accessor for the platform integration's fontdatabase.

Default implementation returns a default QPlatformFontDatabase.

See also
QPlatformFontDatabase

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

Definition at line 32 of file qplatformintegration.cpp.

References db.

Referenced by QtFontStyle::~QtFontStyle(), QHaikuIntegration::fontDatabase(), QMinimalIntegration::fontDatabase(), and qt_registerFont().

+ Here is the caller graph for this function:

◆ 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 258 of file qplatformintegration.cpp.

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

Referenced by 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(), qt_painter_thread_test(), QWidget::setAttribute(), and QWidgetPrivate::setGeometry_sys().

+ 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 327 of file qplatformintegration.cpp.

◆ inputContext()

QPlatformInputContext * QPlatformIntegration::inputContext ( ) const
virtual

◆ keyMapper()

QPlatformKeyMapper * QPlatformIntegration::keyMapper ( ) const
virtual

Accessor for the platform integration's key mapper.

Default implementation returns a default QPlatformKeyMapper.

See also
QPlatformKeyMapper

Reimplemented in QCocoaIntegration, QWindowsIntegration, and QXcbIntegration.

Definition at line 358 of file qplatformintegration.cpp.

References keyMapper(), and QPlatformKeyMapper.

Referenced by keyMapper().

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

◆ 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 576 of file qplatformintegration.cpp.

References QOpenGLContext::LibGL, and qWarning.

◆ possibleKeys()

QList< int > QPlatformIntegration::possibleKeys ( const QKeyEvent * ) const
protectedvirtual

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 QtWaylandClient::QWaylandIntegration.

Definition at line 479 of file qplatformintegration.cpp.

◆ queryKeyboardModifiers()

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

Reimplemented in QtWaylandClient::QWaylandIntegration.

Definition at line 464 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 553 of file qplatformintegration.cpp.

◆ services()

QPlatformServices * QPlatformIntegration::services ( ) const
virtual

◆ 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 604 of file qplatformintegration.cpp.

References number, and Q_UNUSED.

◆ 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 590 of file qplatformintegration.cpp.

References icon, and Q_UNUSED.

◆ styleHint()

QVariant QPlatformIntegration::styleHint ( StyleHint hint) const
virtual

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

Definition at line 385 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(), QEglFSIntegration::styleHint(), QMinimalEglIntegration::styleHint(), QWasmIntegration::styleHint(), QAndroidPlatformIntegration::styleHint(), QCocoaIntegration::styleHint(), QIOSIntegration::styleHint(), QQnxIntegration::styleHint(), QWindowsIntegration::styleHint(), QXcbIntegration::styleHint(), and QtWaylandClient::QWaylandIntegration::styleHint().

+ 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 529 of file qplatformintegration.cpp.

◆ themeNames()

Friends And Related Symbol Documentation

◆ QPlatformKeyMapper

friend class QPlatformKeyMapper
friend

Definition at line 179 of file qplatformintegration.h.

Referenced by keyMapper().


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