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

#include <qoffscreenintegration.h>

+ Inheritance diagram for QOffscreenIntegration:
+ Collaboration diagram for QOffscreenIntegration:

Public Member Functions

 QOffscreenIntegration (const QStringList &paramList)
 
 ~QOffscreenIntegration ()
 
QJsonObject defaultConfiguration () const
 
std::optional< QJsonObjectresolveConfigFileConfiguration (const QStringList &paramList) const
 
void setConfiguration (const QJsonObject &configuration)
 
QJsonObject configuration () const
 
void initialize () override
 Performs initialization steps that depend on having an event dispatcher available.
 
bool hasCapability (QPlatformIntegration::Capability cap) const override
 
QPlatformWindowcreatePlatformWindow (QWindow *window) const override
 Factory function for QPlatformWindow.
 
QPlatformBackingStorecreatePlatformBackingStore (QWindow *window) const override
 Factory function for QPlatformBackingStore.
 
QPlatformInputContextinputContext () const override
 Returns the platforms input context.
 
QPlatformServicesservices () const override
 
QPlatformFontDatabasefontDatabase () const override
 Accessor for the platform integration's fontdatabase.
 
QAbstractEventDispatchercreateEventDispatcher () const override
 Factory function for the GUI event dispatcher.
 
QPlatformNativeInterfacenativeInterface () const override
 
QStringList themeNames () const override
 
QPlatformThemecreatePlatformTheme (const QString &name) const override
 
QList< QOffscreenScreen * > screens () const
 
- Public Member Functions inherited from QPlatformIntegration
virtual ~QPlatformIntegration ()
 
virtual QPlatformPixmapcreatePlatformPixmap (QPlatformPixmap::PixelType type) const
 Factory function for QPlatformPixmap.
 
virtual QPlatformWindowcreateForeignWindow (QWindow *, WId) const
 
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 void destroy ()
 Called before the platform integration is deleted.
 
virtual QPlatformClipboardclipboard () const
 Accessor for the platform integration's clipboard.
 
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 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)
 

Static Public Member Functions

static QOffscreenIntegrationcreateOffscreenIntegration (const QStringList &paramList)
 

Protected Attributes

QScopedPointer< QPlatformFontDatabasem_fontDatabase
 
QScopedPointer< QPlatformInputContextm_inputContext
 
QScopedPointer< QPlatformServicesm_services
 
QScopedPointer< QPlatformNativeInterfacem_nativeInterface
 
QList< QOffscreenScreen * > m_screens
 
bool m_windowFrameMarginsEnabled = true
 
QJsonObject m_configuration
 

Additional Inherited Members

- Public Types inherited from QPlatformIntegration
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
}
 
- Protected Member Functions inherited from QPlatformIntegration
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
 

Detailed Description

Definition at line 18 of file qoffscreenintegration.h.

Constructor & Destructor Documentation

◆ QOffscreenIntegration()

QOffscreenIntegration::QOffscreenIntegration ( const QStringList & paramList)

Definition at line 62 of file qoffscreenintegration.cpp.

References defaultConfiguration(), m_fontDatabase, m_services, QScopedPointer< T, Cleanup >::reset(), resolveConfigFileConfiguration(), and setConfiguration().

Referenced by createOffscreenIntegration().

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

◆ ~QOffscreenIntegration()

QOffscreenIntegration::~QOffscreenIntegration ( )

Definition at line 83 of file qoffscreenintegration.cpp.

References QWindowSystemInterface::handleScreenRemoved(), QList< T >::isEmpty(), m_screens, and QList< T >::takeLast().

+ Here is the call graph for this function:

Member Function Documentation

◆ configuration()

QJsonObject QOffscreenIntegration::configuration ( ) const

Definition at line 305 of file qoffscreenintegration.cpp.

References m_configuration.

Referenced by setConfiguration().

+ Here is the caller graph for this function:

◆ createEventDispatcher()

QAbstractEventDispatcher * QOffscreenIntegration::createEventDispatcher ( ) const
overridevirtual

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

Implements QPlatformIntegration.

Definition at line 343 of file qoffscreenintegration.cpp.

◆ createOffscreenIntegration()

QOffscreenIntegration * QOffscreenIntegration::createOffscreenIntegration ( const QStringList & paramList)
static

Definition at line 423 of file qoffscreenintegration.cpp.

References QOffscreenIntegration(), and qgetenv().

Referenced by QOffscreenIntegrationPlugin::create().

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

◆ createPlatformBackingStore()

QPlatformBackingStore * QOffscreenIntegration::createPlatformBackingStore ( QWindow * window) const
overridevirtual

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()

Implements QPlatformIntegration.

Definition at line 338 of file qoffscreenintegration.cpp.

References window().

+ Here is the call graph for this function:

◆ createPlatformTheme()

QPlatformTheme * QOffscreenIntegration::createPlatformTheme ( const QString & name) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 401 of file qoffscreenintegration.cpp.

References themeName().

+ Here is the call graph for this function:

◆ createPlatformWindow()

QPlatformWindow * QOffscreenIntegration::createPlatformWindow ( QWindow * window) const
overridevirtual

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()

Implements QPlatformIntegration.

Definition at line 330 of file qoffscreenintegration.cpp.

References m_windowFrameMarginsEnabled, Q_UNUSED, and window().

+ Here is the call graph for this function:

◆ defaultConfiguration()

QJsonObject QOffscreenIntegration::defaultConfiguration ( ) const

Definition at line 119 of file qoffscreenintegration.cpp.

References defaultConfiguration(), and defaultScreen.

Referenced by QOffscreenIntegration(), and defaultConfiguration().

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

◆ fontDatabase()

QPlatformFontDatabase * QOffscreenIntegration::fontDatabase ( ) const
overridevirtual

Accessor for the platform integration's fontdatabase.

Default implementation returns a default QPlatformFontDatabase.

See also
QPlatformFontDatabase

Reimplemented from QPlatformIntegration.

Definition at line 406 of file qoffscreenintegration.cpp.

References QScopedPointer< T, Cleanup >::data(), and m_fontDatabase.

+ Here is the call graph for this function:

◆ hasCapability()

bool QOffscreenIntegration::hasCapability ( QPlatformIntegration::Capability cap) const
overridevirtual

Reimplemented from QPlatformIntegration.

Reimplemented in QOffscreenX11Integration.

Definition at line 320 of file qoffscreenintegration.cpp.

References QPlatformIntegration::hasCapability(), QPlatformIntegration::MultipleWindows, QPlatformIntegration::RhiBasedRendering, and QPlatformIntegration::ThreadedPixmaps.

Referenced by QOffscreenX11Integration::hasCapability().

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

◆ initialize()

void QOffscreenIntegration::initialize ( )
overridevirtual

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 from QPlatformIntegration.

Definition at line 310 of file qoffscreenintegration.cpp.

References QPlatformInputContextFactory::create(), m_inputContext, and QScopedPointer< T, Cleanup >::reset().

+ Here is the call graph for this function:

◆ inputContext()

QPlatformInputContext * QOffscreenIntegration::inputContext ( ) const
overridevirtual

Returns the platforms input context.

The default implementation returns \nullptr, implying no input method support.

Reimplemented from QPlatformIntegration.

Definition at line 315 of file qoffscreenintegration.cpp.

References QScopedPointer< T, Cleanup >::data(), and m_inputContext.

+ Here is the call graph for this function:

◆ nativeInterface()

QPlatformNativeInterface * QOffscreenIntegration::nativeInterface ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Reimplemented in QOffscreenX11Integration.

Definition at line 354 of file qoffscreenintegration.cpp.

References QScopedPointer< T, Cleanup >::get(), m_nativeInterface, and QScopedPointer< T, Cleanup >::reset().

+ Here is the call graph for this function:

◆ resolveConfigFileConfiguration()

std::optional< QJsonObject > QOffscreenIntegration::resolveConfigFileConfiguration ( const QStringList & paramList) const

Definition at line 139 of file qoffscreenintegration.cpp.

References error, QJsonDocument::fromJson(), QString::isEmpty(), QString::mid(), qFatal, qPrintable, and QIODeviceBase::ReadOnly.

Referenced by QOffscreenIntegration().

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

◆ screens()

QList< QOffscreenScreen * > QOffscreenIntegration::screens ( ) const

Definition at line 438 of file qoffscreenintegration.cpp.

References m_screens.

Referenced by setConfiguration(), and QOffscreenScreen::virtualSiblings().

+ Here is the caller graph for this function:

◆ services()

QPlatformServices * QOffscreenIntegration::services ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 418 of file qoffscreenintegration.cpp.

References QScopedPointer< T, Cleanup >::data(), and m_services.

+ Here is the call graph for this function:

◆ setConfiguration()

void QOffscreenIntegration::setConfiguration ( const QJsonObject & configuration)

Definition at line 173 of file qoffscreenintegration.cpp.

References add(), QList< T >::append(), configuration(), QWindowSystemInterface::handleScreenAdded(), QWindowSystemInterface::handleScreenGeometryChange(), QWindowSystemInterface::handleScreenLogicalDotsPerInchChange(), QWindowSystemInterface::handleScreenRemoved(), m_configuration, m_screens, m_windowFrameMarginsEnabled, Q_ASSERT, qWarning, remove(), QList< T >::removeAll(), screen, screens(), QWindowSystemInterface::setSynchronousWindowSystemEvents(), toBool(), toInt(), QJsonValue::toObject(), and toString().

Referenced by QOffscreenIntegration().

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

◆ themeNames()

QStringList QOffscreenIntegration::themeNames ( ) const
overridevirtual

Reimplemented from QPlatformIntegration.

Definition at line 363 of file qoffscreenintegration.cpp.

References themeName().

+ Here is the call graph for this function:

Member Data Documentation

◆ m_configuration

QJsonObject QOffscreenIntegration::m_configuration
protected

Definition at line 62 of file qoffscreenintegration.h.

Referenced by configuration(), and setConfiguration().

◆ m_fontDatabase

QScopedPointer<QPlatformFontDatabase> QOffscreenIntegration::m_fontDatabase
protected

Definition at line 53 of file qoffscreenintegration.h.

Referenced by QOffscreenIntegration(), and fontDatabase().

◆ m_inputContext

QScopedPointer<QPlatformInputContext> QOffscreenIntegration::m_inputContext
protected

Definition at line 57 of file qoffscreenintegration.h.

Referenced by initialize(), and inputContext().

◆ m_nativeInterface

QScopedPointer<QPlatformNativeInterface> QOffscreenIntegration::m_nativeInterface
mutableprotected

◆ m_screens

QList<QOffscreenScreen *> QOffscreenIntegration::m_screens
protected

Definition at line 60 of file qoffscreenintegration.h.

Referenced by ~QOffscreenIntegration(), screens(), and setConfiguration().

◆ m_services

QScopedPointer<QPlatformServices> QOffscreenIntegration::m_services
protected

Definition at line 58 of file qoffscreenintegration.h.

Referenced by QOffscreenIntegration(), and services().

◆ m_windowFrameMarginsEnabled

bool QOffscreenIntegration::m_windowFrameMarginsEnabled = true
protected

Definition at line 61 of file qoffscreenintegration.h.

Referenced by createPlatformWindow(), and setConfiguration().


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