QtBase  v6.3.1
Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | List of all members
QPlatformWindow Class Reference

#include <qplatformwindow.h>

Inheritance diagram for QPlatformWindow:
Inheritance graph
[legend]
Collaboration diagram for QPlatformWindow:
Collaboration graph
[legend]

Public Member Functions

 QPlatformWindow (QWindow *window)
 
 ~QPlatformWindow () override
 
virtual void initialize ()
 
QWindowwindow () const
 
QPlatformWindowparent () const
 
QPlatformScreenscreen () const override
 
virtual QSurfaceFormat format () const override
 
virtual void setGeometry (const QRect &rect)
 
virtual QRect geometry () const
 
virtual QRect normalGeometry () const
 
virtual QMargins frameMargins () const
 
virtual QMargins safeAreaMargins () const
 
virtual void setVisible (bool visible)
 
virtual void setWindowFlags (Qt::WindowFlags flags)
 
virtual void setWindowState (Qt::WindowStates state)
 
virtual WId winId () const
 
virtual void setParent (const QPlatformWindow *window)
 
virtual void setWindowTitle (const QString &title)
 
virtual void setWindowFilePath (const QString &title)
 
virtual void setWindowIcon (const QIcon &icon)
 
virtual bool close ()
 
virtual void raise ()
 
virtual void lower ()
 
virtual bool isExposed () const
 
virtual bool isActive () const
 
virtual bool isAncestorOf (const QPlatformWindow *child) const
 
virtual bool isEmbedded () const
 
virtual bool isForeignWindow () const
 
virtual QPoint mapToGlobal (const QPoint &pos) const
 
QPointF mapToGlobalF (const QPointF &pos) const
 
virtual QPoint mapFromGlobal (const QPoint &pos) const
 
QPointF mapFromGlobalF (const QPointF &pos) const
 
virtual void propagateSizeHints ()
 
virtual void setOpacity (qreal level)
 
virtual void setMask (const QRegion &region)
 
virtual void requestActivateWindow ()
 
virtual void handleContentOrientationChange (Qt::ScreenOrientation orientation)
 
virtual qreal devicePixelRatio () const
 
virtual bool setKeyboardGrabEnabled (bool grab)
 
virtual bool setMouseGrabEnabled (bool grab)
 
virtual bool setWindowModified (bool modified)
 
virtual bool windowEvent (QEvent *event)
 
virtual bool startSystemResize (Qt::Edges edges)
 
virtual bool startSystemMove ()
 
virtual void setFrameStrutEventsEnabled (bool enabled)
 
virtual bool frameStrutEventsEnabled () const
 
virtual void setAlertState (bool enabled)
 
virtual bool isAlertState () const
 
virtual void invalidateSurface ()
 
virtual void requestUpdate ()
 
bool hasPendingUpdateRequest () const
 
virtual void deliverUpdateRequest ()
 
QSize windowMinimumSize () const
 
QSize windowMaximumSize () const
 
QSize windowBaseSize () const
 
QSize windowSizeIncrement () const
 
QRect windowGeometry () const
 
QRect windowFrameGeometry () const
 
QRectF windowClosestAcceptableGeometry (const QRectF &nativeRect) const
 
- Public Member Functions inherited from QPlatformSurface
virtual ~QPlatformSurface ()
 
QSurfacesurface () const
 

Static Public Member Functions

static QRect initialGeometry (const QWindow *w, const QRect &initialGeometry, int defaultWidth, int defaultHeight, const QScreen **resultingScreenReturn=nullptr)
 
static QRectF closestAcceptableGeometry (const QWindow *w, const QRectF &nativeRect)
 
- Static Public Member Functions inherited from QPlatformSurface
static bool isRasterSurface (QSurface *surface)
 

Protected Member Functions

QPlatformScreenscreenForGeometry (const QRect &newGeometry) const
 

Static Protected Member Functions

static QString formatWindowTitle (const QString &title, const QString &separator)
 
static QSize constrainWindowSize (const QSize &size)
 

Protected Attributes

QScopedPointer< QPlatformWindowPrivated_ptr
 

Detailed Description

Since
4.8

Definition at line 72 of file qplatformwindow.h.

Constructor & Destructor Documentation

◆ QPlatformWindow()

QT_BEGIN_NAMESPACE QPlatformWindow::QPlatformWindow ( QWindow window)
explicit

Constructs a platform window with the given top level window.

Definition at line 58 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ ~QPlatformWindow()

QPlatformWindow::~QPlatformWindow ( )
override

Virtual destructor does not delete its top level window.

Definition at line 69 of file qplatformwindow.cpp.

Member Function Documentation

◆ close()

bool QPlatformWindow::close ( )
virtual

Reimplement to let the platform handle non-spontaneous window close.

When reimplementing make sure to call the base class implementation or QWindowSystemInterface::handleCloseEvent(), which will prompt the user to accept the window close (if needed) and then close the QWindow.

Definition at line 363 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ closestAcceptableGeometry()

QRectF QPlatformWindow::closestAcceptableGeometry ( const QWindow qWindow,
const QRectF nativeRect 
)
static

Returns the closest acceptable geometry for a given geometry before a resize/move event for platforms that support it, for example to implement heightForWidth().

Definition at line 876 of file qplatformwindow.cpp.

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

◆ constrainWindowSize()

QSize QPlatformWindow::constrainWindowSize ( const QSize size)
staticprotected

Returns a size with both dimensions bounded to [0, QWINDOWSIZE_MAX]

Definition at line 609 of file qplatformwindow.cpp.

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

◆ deliverUpdateRequest()

void QPlatformWindow::deliverUpdateRequest ( )
virtual

Delivers an QEvent::UpdateRequest event to the window.

QPlatformWindow subclasses can re-implement this function to provide e.g. logging or tracing of the delivery, but should always call the base class function.

Reimplemented in QCocoaWindow.

Definition at line 802 of file qplatformwindow.cpp.

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

◆ devicePixelRatio()

qreal QPlatformWindow::devicePixelRatio ( ) const
virtual

Reimplement this function in subclass to return the device pixel ratio for the window. This is the ratio between physical pixels and device-independent pixels.

See also
QPlatformWindow::devicePixelRatio();

Reimplemented in QWasmWindow, QIOSWindow, and QCocoaWindow.

Definition at line 444 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ format()

QSurfaceFormat QPlatformWindow::format ( ) const
overridevirtual

Returns the actual surface format of the window.

Implements QPlatformSurface.

Reimplemented in QXcbWindow, QWindowsWindow, QQnxEglWindow, QIOSWindow, QEglFSWindow, QCocoaWindow, QAndroidPlatformVulkanWindow, QAndroidPlatformOpenGLWindow, and QDirectFbWindowEGL.

Definition at line 113 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ formatWindowTitle()

QString QPlatformWindow::formatWindowTitle ( const QString title,
const QString separator 
)
staticprotected

Call this method to put together a window title composed of title separator the application display name

If the display name isn't set, and the title is empty, the raw app name is used.

Definition at line 557 of file qplatformwindow.cpp.

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

◆ frameMargins()

QMargins QPlatformWindow::frameMargins ( ) const
virtual

◆ frameStrutEventsEnabled()

bool QPlatformWindow::frameStrutEventsEnabled ( ) const
virtual

Reimplement this method to return whether frame strut events are enabled.

Reimplemented in QWindowsWindow, and QCocoaWindow.

Definition at line 544 of file qplatformwindow.cpp.

◆ geometry()

QRect QPlatformWindow::geometry ( ) const
virtual

Returns the current geometry of a window

Reimplemented in QWindowsWindow, QWindowsBaseWindow, QEglFSWindow, and QCocoaWindow.

Definition at line 145 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ handleContentOrientationChange()

void QPlatformWindow::handleContentOrientationChange ( Qt::ScreenOrientation  orientation)
virtual

Handle changes to the orientation of the platform window's contents.

This is a hint to the window manager in case it needs to display additional content like popups, dialogs, status bars, or similar in relation to the window.

See also
QWindow::reportContentOrientationChange()

Reimplemented in QIOSWindow.

Definition at line 432 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ hasPendingUpdateRequest()

bool QPlatformWindow::hasPendingUpdateRequest ( ) const

Returns true if the window has a pending update request.

See also
requestUpdate(), deliverUpdateRequest()

Definition at line 790 of file qplatformwindow.cpp.

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

◆ initialGeometry()

QRect QPlatformWindow::initialGeometry ( const QWindow w,
const QRect initialGeometry,
int  defaultWidth,
int  defaultHeight,
const QScreen **  resultingScreenReturn = nullptr 
)
static

Helper function to get initial geometry on windowing systems which do not do smart positioning and also do not provide a means of centering a transient window w.r.t. its parent. For example this is useful on Windows and MacOS but not X11, because an X11 window manager typically tries to layout new windows to optimize usage of the available desktop space. However if the given window already has geometry which the application has initialized, it takes priority.

initialGeometry has to be provided in native pixels. defaultWidth has to be provided in device independent pixels defaultHeight has to be provided in device independent pixels

Definition at line 708 of file qplatformwindow.cpp.

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

◆ initialize()

void QPlatformWindow::initialize ( )
virtual

Called as part of QWindow::create(), after constructing the window. Platforms should prefer to do initialization here instead of in the constructor, as the platform window object will be fully constructed, and associated to the corresponding QWindow, allowing synchronous event delivery.

Reimplemented in QWindowsWindow, QWasmWindow, and QCocoaWindow.

Definition at line 80 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ invalidateSurface()

void QPlatformWindow::invalidateSurface ( )
virtual

Invalidates the window's surface by releasing its surface buffers.

Many platforms do not support releasing the surface memory, and the default implementation does nothing.

The platform window is expected to recreate the surface again if it is needed. For instance, if an OpenGL context is made current on this window.

Reimplemented in QWindowsWindow, QEglFSKmsVsp2Window, QEglFSKmsEglDeviceWindow, QEglFSKmsGbmWindow, and QEglFSWindow.

Definition at line 677 of file qplatformwindow.cpp.

◆ isActive()

bool QPlatformWindow::isActive ( ) const
virtual

Returns true if the window should appear active from a style perspective.

This function can make platform-specific isActive checks, such as checking if the QWindow is embedded in an active native window.

Reimplemented in QWindowsWindow, and QHaikuWindow.

Definition at line 218 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ isAlertState()

bool QPlatformWindow::isAlertState ( ) const
virtual

Reimplement this method return whether the window is in an alert state.

See also
setAlertState()
Since
5.1

Reimplemented in QXcbWindow, QWindowsWindow, and QCocoaWindow.

Definition at line 635 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ isAncestorOf()

bool QPlatformWindow::isAncestorOf ( const QPlatformWindow child) const
virtual

Returns true if the window is an ancestor of the given child.

Platform overrides should iterate the native window hierarchy of the child, to ensure that ancestary is reflected even with native windows in the window hierarchy.

Reimplemented in QWindowsWindow.

Definition at line 230 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ isEmbedded()

bool QPlatformWindow::isEmbedded ( ) const
virtual

Returns true if the window is a child of a non-Qt window.

A embedded window has no parent platform window as reflected though parent(), but will have a native parent window.

Reimplemented in QXcbWindow, QWindowsWindow, and QCocoaWindow.

Definition at line 246 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ isExposed()

bool QPlatformWindow::isExposed ( ) const
virtual

Returns if this window is exposed in the windowing system.

An exposeEvent() is sent every time this value changes.

Reimplemented in QXcbWindow, QWindowsWindow, QQnxWindow, QIOSWindow, QHaikuWindow, QCocoaWindow, and QAndroidPlatformWindow.

Definition at line 207 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ isForeignWindow()

virtual bool QPlatformWindow::isForeignWindow ( ) const
inlinevirtual

Reimplemented in QXcbForeignWindow, QWindowsForeignWindow, QQnxForeignWindow, QCocoaWindow, and QAndroidPlatformForeignWindow.

Definition at line 115 of file qplatformwindow.h.

Here is the caller graph for this function:

◆ lower()

void QPlatformWindow::lower ( )
virtual

Reimplement to be able to let Qt lower windows to the bottom of the desktop

Reimplemented in QXcbWindow, QWindowsWindow, QWindowsForeignWindow, QWasmWindow, QQnxWindow, QIOSWindow, QEglFSWindow, QCocoaWindow, QAndroidPlatformWindow, QAndroidPlatformForeignWindow, QFbWindow, and QDirectFbWindow.

Definition at line 376 of file qplatformwindow.cpp.

◆ mapFromGlobal()

QPoint QPlatformWindow::mapFromGlobal ( const QPoint pos) const
virtual

Translates the global screen coordinate pos to window coordinates using native methods. This is required for embedded windows, where the topmost QWindow coordinates are not global screen coordinates.

Returns pos if there is no platform specific implementation.

Reimplemented in QXcbWindow, QWindowsWindow, and QWindowsBaseWindow.

Definition at line 290 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ mapFromGlobalF()

QPointF QPlatformWindow::mapFromGlobalF ( const QPointF pos) const

Definition at line 276 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ mapToGlobal()

QPoint QPlatformWindow::mapToGlobal ( const QPoint pos) const
virtual

Translates the window coordinate pos to global screen coordinates using native methods. This is required for embedded windows, where the topmost QWindow coordinates are not global screen coordinates.

Returns pos if there is no platform specific implementation.

Reimplemented in QXcbWindow, QWindowsWindow, and QWindowsBaseWindow.

Definition at line 258 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ mapToGlobalF()

QPointF QPlatformWindow::mapToGlobalF ( const QPointF pos) const

Definition at line 269 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ normalGeometry()

QRect QPlatformWindow::normalGeometry ( ) const
virtual

Returns the geometry of a window in 'normal' state (neither maximized, fullscreen nor minimized) for saving geometries to application settings.

Since
5.3

Reimplemented in QWindowsWindow, QWasmWindow, and QCocoaWindow.

Definition at line 158 of file qplatformwindow.cpp.

◆ parent()

QPlatformWindow * QPlatformWindow::parent ( ) const

Returns the parent platform window (or \nullptr if orphan).

Definition at line 95 of file qplatformwindow.cpp.

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

◆ propagateSizeHints()

void QPlatformWindow::propagateSizeHints ( )
virtual

Reimplement to propagate the size hints of the QWindow.

The size hints include QWindow::minimumSize(), QWindow::maximumSize(), QWindow::sizeIncrement(), and QWindow::baseSize().

Reimplemented in QXcbWindow, QWindowsWindow, QWasmWindow, QQnxWindow, QIOSWindow, QHaikuWindow, QEglFSWindow, QCocoaWindow, QAndroidPlatformWindow, and QFbWindow.

Definition at line 384 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ raise()

void QPlatformWindow::raise ( )
virtual

Reimplement to be able to let Qt raise windows to the top of the desktop

Reimplemented in QXcbWindow, QWindowsWindow, QWindowsForeignWindow, QWasmWindow, QQnxWindow, QIOSWindow, QEglFSWindow, QCocoaWindow, QAndroidPlatformWindow, QAndroidPlatformForeignWindow, QFbWindow, and QDirectFbWindow.

Definition at line 371 of file qplatformwindow.cpp.

◆ requestActivateWindow()

void QPlatformWindow::requestActivateWindow ( )
virtual

Reimplement to let Qt be able to request activation/focus for a window

Some window systems will probably not have callbacks for this functionality, and then calling QWindowSystemInterface::handleWindowActivated(QWindow *w) would be sufficient.

If the window system has some event handling/callbacks then call QWindowSystemInterface::handleWindowActivated(QWindow *w) when the window system gives the notification.

Default implementation calls QWindowSystem::handleWindowActivated(QWindow *w)

Reimplemented in QXcbWindow, QWindowsWindow, QWasmWindow, QQnxWindow, QOffscreenWindow, QIOSWindow, QHaikuWindow, QEglFSWindow, QCocoaWindow, and QAndroidPlatformWindow.

Definition at line 418 of file qplatformwindow.cpp.

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

◆ requestUpdate()

void QPlatformWindow::requestUpdate ( )
virtual

Requests an QEvent::UpdateRequest event. The event will be delivered to the QWindow.

QPlatformWindow subclasses can re-implement this function to provide display refresh synchronized updates. The event should be delivered using QPlatformWindow::deliverUpdateRequest() to not get out of sync with the internal state of QWindow.

The default implementation posts an UpdateRequest event to the window after 5 ms. The additional time is there to give the event loop a bit of idle time to gather system events.

Reimplemented in QWasmWindow, QIOSWindow, and QCocoaWindow.

Definition at line 771 of file qplatformwindow.cpp.

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

◆ safeAreaMargins()

QMargins QPlatformWindow::safeAreaMargins ( ) const
virtual

The safe area margins of a window represent the area that is safe to place content within, without intersecting areas of the screen where system UI is placed, or where a screen bezel may cover the content.

Reimplemented in QIOSWindow, and QAndroidPlatformWindow.

Definition at line 173 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ screen()

QPlatformScreen * QPlatformWindow::screen ( ) const
overridevirtual

Returns the platform screen handle corresponding to this platform window, or null if the window is not associated with a screen.

Implements QPlatformSurface.

Reimplemented in QQnxWindow, and QEglFSWindow.

Definition at line 104 of file qplatformwindow.cpp.

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

◆ screenForGeometry()

QPlatformScreen * QPlatformWindow::screenForGeometry ( const QRect newGeometry) const
protected

Helper function for finding the new screen for newGeometry in response to a geometry changed event. Returns the new screen if the window was moved to another virtual sibling. If the screen changes, the platform plugin should call QWindowSystemInterface::handleWindowScreenChanged().

Note
: The current screen will always be returned for child windows since they should never signal screen changes.
Since
5.4
See also
QWindowSystemInterface::handleWindowScreenChanged()

Definition at line 583 of file qplatformwindow.cpp.

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

◆ setAlertState()

void QPlatformWindow::setAlertState ( bool  enable)
virtual

Reimplement this method to set whether the window demands attention (for example, by flashing the taskbar icon) depending on enabled.

See also
isAlertState()
Since
5.1

Reimplemented in QXcbWindow, QWindowsWindow, and QCocoaWindow.

Definition at line 622 of file qplatformwindow.cpp.

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

◆ setFrameStrutEventsEnabled()

void QPlatformWindow::setFrameStrutEventsEnabled ( bool  enabled)
virtual

Reimplement this method to set whether frame strut events should be sent to enabled.

See also
frameStrutEventsEnabled

Reimplemented in QWindowsWindow, and QCocoaWindow.

Definition at line 534 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setGeometry()

void QPlatformWindow::setGeometry ( const QRect rect)
virtual

This function is called by Qt whenever a window is moved or resized using the QWindow API.

Unless you also override QPlatformWindow::geometry(), you need to call the baseclass implementation of this function in any override of QPlatformWindow::setGeometry(), as QWindow::geometry() is expected to report back the set geometry until a confirmation (or rejection) of the new geometry comes back from the window manager and is reported via QWindowSystemInterface::handleGeometryChange().

Window move/resizes can also be triggered spontaneously by the window manager, or as a response to an earlier requested move/resize via the Qt APIs. There is no need to call this function from the window manager callback, instead call QWindowSystemInterface::handleGeometryChange().

The position(x, y) part of the rect might be inclusive or exclusive of the window frame as returned by frameMargins(). You can detect this in the plugin by checking qt_window_private(window())->positionPolicy.

Reimplemented in QXcbWindow, QWindowsWindow, QWindowsForeignWindow, QQnxWindow, QQnxEglWindow, QOffscreenWindow, QIOSWindow, QHaikuWindow, QCocoaWindow, QAndroidPlatformWindow, QAndroidPlatformVulkanWindow, QAndroidPlatformOpenGLWindow, QAndroidPlatformForeignWindow, QFbWindow, QDirectFbWindow, QVkKhrDisplayWindow, QWasmWindow, QMinimalEglWindow, and QEglFSWindow.

Definition at line 136 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ setKeyboardGrabEnabled()

bool QPlatformWindow::setKeyboardGrabEnabled ( bool  grab)
virtual

Reimplemented in QWasmWindow, QEglFSWindow, QFbWindow, QXcbWindow, QWindowsWindow, QIOSWindow, QCocoaWindow, QAndroidPlatformWindow, and QDirectFbWindow.

Definition at line 449 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setMask()

void QPlatformWindow::setMask ( const QRegion region)
virtual

Reimplement to be able to let Qt set the mask of a window

Reimplemented in QXcbWindow, QWindowsWindow, QCocoaWindow, and QEglFSWindow.

Definition at line 399 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setMouseGrabEnabled()

bool QPlatformWindow::setMouseGrabEnabled ( bool  grab)
virtual

Reimplemented in QWasmWindow, QEglFSWindow, QFbWindow, QXcbWindow, QWindowsWindow, QIOSWindow, QCocoaWindow, QAndroidPlatformWindow, and QDirectFbWindow.

Definition at line 456 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setOpacity()

void QPlatformWindow::setOpacity ( qreal  level)
virtual

Reimplement to be able to let Qt set the opacity level of a window

Reimplemented in QEglFSWindow, QXcbWindow, QWindowsWindow, QQnxWindow, QIOSWindow, QCocoaWindow, and QDirectFbWindow.

Definition at line 389 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setParent()

void QPlatformWindow::setParent ( const QPlatformWindow parent)
virtual

This function is called to enable native child window in QPA. It is common not to support this feature in Window systems, but can be faked. When this function is called all geometry of this platform window will be relative to the parent.

Reimplemented in QXcbWindow, QWindowsWindow, QWindowsForeignWindow, QQnxWindow, QQnxRasterWindow, QIOSWindow, QCocoaWindow, QAndroidPlatformWindow, and QAndroidPlatformForeignWindow.

Definition at line 330 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setVisible()

void QPlatformWindow::setVisible ( bool  visible)
virtual

Reimplemented in subclasses to show the surface if visible is true, and hide it if visible is false.

The default implementation sends a synchronous expose event.

Reimplemented in QXcbWindow, QWindowsWindow, QWindowsForeignWindow, QWasmWindow, QQnxWindow, QOffscreenWindow, QIOSWindow, QHaikuWindow, QEglFSWindow, QCocoaWindow, QAndroidPlatformWindow, QAndroidPlatformForeignWindow, QFbWindow, and QDirectFbWindow.

Definition at line 184 of file qplatformwindow.cpp.

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

◆ setWindowFilePath()

void QPlatformWindow::setWindowFilePath ( const QString filePath)
virtual

Reimplement to set the window file path to filePath

Reimplemented in QCocoaWindow.

Definition at line 349 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setWindowFlags()

void QPlatformWindow::setWindowFlags ( Qt::WindowFlags  flags)
virtual

Requests setting the window flags of this surface to flags.

Reimplemented in QFbWindow, QXcbWindow, QWindowsWindow, QHaikuWindow, QWindowsDirect2DWindow, QCocoaWindow, QAndroidPlatformWindow, and QDirectFbWindow.

Definition at line 196 of file qplatformwindow.cpp.

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

◆ setWindowIcon()

void QPlatformWindow::setWindowIcon ( const QIcon icon)
virtual

Reimplement to set the window icon to icon

Reimplemented in QXcbWindow, QWindowsWindow, and QCocoaWindow.

Definition at line 354 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ setWindowModified()

bool QPlatformWindow::setWindowModified ( bool  modified)
virtual

Reimplement to be able to let Qt indicate that the window has been modified. Return true if the native window supports setting the modified flag, false otherwise.

Reimplemented in QCocoaWindow.

Definition at line 468 of file qplatformwindow.cpp.

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

◆ setWindowState()

void QPlatformWindow::setWindowState ( Qt::WindowStates  state)
virtual

Requests setting the window state of this surface to type.

Qt::WindowActive can be ignored.

Reimplemented in QOffscreenWindow, QXcbWindow, QWindowsWindow, QWasmWindow, QQnxWindow, QIOSWindow, QHaikuWindow, QCocoaWindow, QAndroidPlatformWindow, and QFbWindow.

Definition at line 307 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ setWindowTitle()

void QPlatformWindow::setWindowTitle ( const QString title)
virtual

Reimplement to set the window title to title.

The implementation might want to append the application display name to the window title, like Windows and Linux do.

See also
QGuiApplication::applicationDisplayName()

Reimplemented in QXcbWindow, QWindowsWindow, QWindowsForeignWindow, QHaikuWindow, and QCocoaWindow.

Definition at line 344 of file qplatformwindow.cpp.

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

◆ startSystemMove()

bool QPlatformWindow::startSystemMove ( )
virtual

Reimplement this method to start a system move operation if the system supports it and return true to indicate success.

The default implementation is empty and does nothing.

Since
5.15

Reimplemented in QXcbWindow, QWindowsWindow, and QCocoaWindow.

Definition at line 522 of file qplatformwindow.cpp.

◆ startSystemResize()

bool QPlatformWindow::startSystemResize ( Qt::Edges  edges)
virtual

Reimplement this method to start a system resize operation if the system supports it and return true to indicate success.

The default implementation is empty and does nothing with edges.

Since
5.15

Reimplemented in QXcbWindow, and QWindowsWindow.

Definition at line 507 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ window()

QWindow * QPlatformWindow::window ( ) const

Returns the window which belongs to the QPlatformWindow

Definition at line 87 of file qplatformwindow.cpp.

Here is the caller graph for this function:

◆ windowBaseSize()

QSize QPlatformWindow::windowBaseSize ( ) const

Returns the QWindow base size.

Definition at line 832 of file qplatformwindow.cpp.

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

◆ windowClosestAcceptableGeometry()

QRectF QPlatformWindow::windowClosestAcceptableGeometry ( const QRectF nativeRect) const

Definition at line 884 of file qplatformwindow.cpp.

Here is the call graph for this function:

◆ windowEvent()

bool QPlatformWindow::windowEvent ( QEvent event)
virtual

Reimplement this method to be able to do any platform specific event handling. All non-synthetic events for window() are passed to this function before being sent to QWindow::event().

Return true if the event should not be passed on to the QWindow.

Subclasses should always call the base class implementation.

Reimplemented in QXcbWindow, and QWindowsWindow.

Definition at line 483 of file qplatformwindow.cpp.

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

◆ windowFrameGeometry()

QRect QPlatformWindow::windowFrameGeometry ( ) const

Returns the QWindow frame geometry.

Definition at line 865 of file qplatformwindow.cpp.

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

◆ windowGeometry()

QRect QPlatformWindow::windowGeometry ( ) const

Returns the QWindow geometry.

Definition at line 857 of file qplatformwindow.cpp.

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

◆ windowMaximumSize()

QSize QPlatformWindow::windowMaximumSize ( ) const

Returns the QWindow maximum size.

Definition at line 824 of file qplatformwindow.cpp.

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

◆ windowMinimumSize()

QSize QPlatformWindow::windowMinimumSize ( ) const

Returns the QWindow minimum size.

Definition at line 816 of file qplatformwindow.cpp.

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

◆ windowSizeIncrement()

QSize QPlatformWindow::windowSizeIncrement ( ) const

Returns the QWindow size increment.

Definition at line 840 of file qplatformwindow.cpp.

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

◆ winId()

WId QPlatformWindow::winId ( ) const
virtual

Reimplement in subclasses to return a handle to the native window

Reimplemented in QXcbWindow, QWindowsBaseWindow, QWasmWindow, QQnxWindow, QOffscreenWindow, QMinimalEglWindow, QIOSWindow, QHaikuWindow, QEglFSWindow, QCocoaWindow, QAndroidPlatformWindow, QFbWindow, and QDirectFbWindow.

Definition at line 314 of file qplatformwindow.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ d_ptr

QScopedPointer<QPlatformWindowPrivate> QPlatformWindow::d_ptr
protected

Definition at line 173 of file qplatformwindow.h.


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