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

#include <qeglfsscreen_p.h>

+ Inheritance diagram for QEglFSScreen:
+ Collaboration diagram for QEglFSScreen:

Public Member Functions

 QEglFSScreen (EGLDisplay display)
 
 ~QEglFSScreen ()
 
QRect geometry () const override
 Reimplement in subclass to return the pixel geometry of the screen.
 
virtual QRect rawGeometry () const
 
int depth () const override
 Reimplement in subclass to return current depth of the screen.
 
QImage::Format format () const override
 Reimplement in subclass to return the image format which corresponds to the screen format.
 
QSizeF physicalSize () const override
 Reimplement this function in subclass to return the physical size of the screen, in millimeters.
 
QDpi logicalDpi () const override
 Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.
 
QDpi logicalBaseDpi () const override
 Reimplement to return the base logical DPI for the platform.
 
Qt::ScreenOrientation nativeOrientation () const override
 Reimplement this function in subclass to return the native orientation of the screen, e.g.
 
Qt::ScreenOrientation orientation () const override
 Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.
 
QPlatformCursorcursor () const override
 Reimplement this function in subclass to return the cursor of the screen.
 
qreal refreshRate () const override
 Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.
 
QPixmap grabWindow (WId wid, int x, int y, int width, int height) const override
 This function is called when Qt needs to be able to grab the content of a window.
 
EGLSurface primarySurface () const
 
EGLDisplay display () const
 
void handleCursorMove (const QPoint &pos)
 
QWindowtopLevelAt (const QPoint &point) const override
 Return the given top level window for a given position.
 
- Public Member Functions inherited from QPlatformScreen
 QPlatformScreen ()
 
virtual ~QPlatformScreen ()
 
virtual bool isPlaceholder () const
 
virtual QRect availableGeometry () const
 Reimplement in subclass to return the pixel geometry of the available space This normally is the desktop screen minus the task manager, global menubar etc.
 
virtual QColorSpace colorSpace () const
 
virtual qreal devicePixelRatio () const
 Reimplement this function in subclass to return the device pixel ratio for the screen.
 
QWindowList windows () const
 Return all windows residing on this screen.
 
virtual QList< QPlatformScreen * > virtualSiblings () const
 Returns a list of all the platform screens that are part of the same virtual desktop.
 
const QPlatformScreenscreenForPosition (const QPoint &point) const
 Find the sibling screen corresponding to globalPos.
 
QScreenscreen () const
 
virtual QString name () const
 
virtual QString manufacturer () const
 Reimplement this function in subclass to return the manufacturer of this screen.
 
virtual QString model () const
 Reimplement this function in subclass to return the model of this screen.
 
virtual QString serialNumber () const
 Reimplement this function in subclass to return the serial number of this screen.
 
virtual SubpixelAntialiasingType subpixelAntialiasingTypeHint () const
 Returns a hint about this screen's subpixel layout structure.
 
virtual PowerState powerState () const
 Returns the current power state.
 
virtual void setPowerState (PowerState state)
 Sets the power state for this screen.
 
virtual QList< Modemodes () const
 Reimplement this function in subclass to return the list of modes for this screen.
 
virtual int currentMode () const
 Reimplement this function in subclass to return the index of the current mode from the modes list.
 
virtual int preferredMode () const
 Reimplement this function in subclass to return the preferred mode index from the modes list.
 

Friends

class QEglFSWindow
 

Additional Inherited Members

- Public Types inherited from QPlatformScreen
enum  SubpixelAntialiasingType {
  Subpixel_None , Subpixel_RGB , Subpixel_BGR , Subpixel_VRGB ,
  Subpixel_VBGR
}
 
enum  PowerState { PowerStateOn , PowerStateStandby , PowerStateSuspend , PowerStateOff }
 
- Static Public Member Functions inherited from QPlatformScreen
static QPlatformScreenplatformScreenForWindow (const QWindow *window)
 
static int angleBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b)
 
static QTransform transformBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &target)
 
static QRect mapBetween (Qt::ScreenOrientation a, Qt::ScreenOrientation b, const QRect &rect)
 
static QDpi overrideDpi (const QDpi &in)
 
- Protected Member Functions inherited from QPlatformScreen
void resizeMaximizedWindows ()
 Convenience method to resize all the maximized and fullscreen windows of this platform screen.
 
- Protected Attributes inherited from QPlatformScreen
QScopedPointer< QPlatformScreenPrivated_ptr
 

Detailed Description

Definition at line 28 of file qeglfsscreen_p.h.

Constructor & Destructor Documentation

◆ QEglFSScreen()

QT_BEGIN_NAMESPACE QEglFSScreen::QEglFSScreen ( EGLDisplay display)

Definition at line 19 of file qeglfsscreen.cpp.

References QEglFSDeviceIntegration::createCursor(), and qt_egl_device_integration().

+ Here is the call graph for this function:

◆ ~QEglFSScreen()

QEglFSScreen::~QEglFSScreen ( )

Definition at line 27 of file qeglfsscreen.cpp.

Member Function Documentation

◆ cursor()

QPlatformCursor * QEglFSScreen::cursor ( ) const
overridevirtual

Reimplement this function in subclass to return the cursor of the screen.

The default implementation returns \nullptr.

Reimplemented from QPlatformScreen.

Definition at line 97 of file qeglfsscreen.cpp.

Referenced by QEglFSKmsGbmScreen::cursor(), QEglFSKmsEglDeviceScreen::cursor(), and QEglFSWindow::destroy().

+ Here is the caller graph for this function:

◆ depth()

int QEglFSScreen::depth ( ) const
overridevirtual

Reimplement in subclass to return current depth of the screen.

Implements QPlatformScreen.

Definition at line 62 of file qeglfsscreen.cpp.

References qt_egl_device_integration(), and QEglFSDeviceIntegration::screenDepth().

+ Here is the call graph for this function:

◆ display()

EGLDisplay QEglFSScreen::display ( ) const
inline

Definition at line 53 of file qeglfsscreen_p.h.

Referenced by QEglFSWindow::create(), QEglFSKmsGbmScreen::createSurface(), QEglFSKmsEglDeviceIntegration::createWindow(), QEglFSWindow::resetSurface(), and QEglFSKmsEglDeviceWindow::resetSurface().

+ Here is the caller graph for this function:

◆ format()

QImage::Format QEglFSScreen::format ( ) const
overridevirtual

Reimplement in subclass to return the image format which corresponds to the screen format.

Implements QPlatformScreen.

Definition at line 67 of file qeglfsscreen.cpp.

References qt_egl_device_integration(), and QEglFSDeviceIntegration::screenFormat().

+ Here is the call graph for this function:

◆ geometry()

QRect QEglFSScreen::geometry ( ) const
overridevirtual

Reimplement in subclass to return the pixel geometry of the screen.

Implements QPlatformScreen.

Definition at line 32 of file qeglfsscreen.cpp.

References qEnvironmentVariableIntValue(), qWarning, and rawGeometry().

Referenced by grabWindow(), and QEglFSKmsScreen::physicalSize().

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

◆ grabWindow()

QPixmap QEglFSScreen::grabWindow ( WId window,
int x,
int y,
int width,
int height ) const
overridevirtual

This function is called when Qt needs to be able to grab the content of a window.

Returns the content of the window specified with the WId handle within the boundaries of QRect(x,y,width,height).

Reimplemented from QPlatformScreen.

Definition at line 159 of file qeglfsscreen.cpp.

References compositor, QList< T >::first(), QPixmap::fromImage(), geometry(), QRect::height(), QSize::height(), QOpenGLCompositor::instance(), QList< T >::isEmpty(), Q_ASSERT, Q_UNUSED, qWarning, rect, QRect::size(), QRect::topLeft(), QRect::width(), QSize::width(), window(), and QPlatformScreen::windows().

+ Here is the call graph for this function:

◆ handleCursorMove()

◆ logicalBaseDpi()

QDpi QEglFSScreen::logicalBaseDpi ( ) const
overridevirtual

Reimplement to return the base logical DPI for the platform.

This DPI value should correspond to a standard-DPI (1x) display. The default implementation returns 96.

QtGui will use this value (together with logicalDpi) to compute the scale factor when high-DPI scaling is enabled, as follows: factor = logicalDPI / baseDPI

Reimplemented from QPlatformScreen.

Definition at line 82 of file qeglfsscreen.cpp.

References QEglFSDeviceIntegration::logicalBaseDpi(), and qt_egl_device_integration().

+ Here is the call graph for this function:

◆ logicalDpi()

QDpi QEglFSScreen::logicalDpi ( ) const
overridevirtual

Reimplement this function in subclass to return the logical horizontal and vertical dots per inch metrics of the screen.

The logical dots per inch metrics are used by Qt to scale the user interface.

The default implementation returns logicalBaseDpi(), which results in a UI scale factor of 1.0.

See also
physicalSize

Reimplemented from QPlatformScreen.

Definition at line 77 of file qeglfsscreen.cpp.

References QEglFSDeviceIntegration::logicalDpi(), and qt_egl_device_integration().

+ Here is the call graph for this function:

◆ nativeOrientation()

Qt::ScreenOrientation QEglFSScreen::nativeOrientation ( ) const
overridevirtual

Reimplement this function in subclass to return the native orientation of the screen, e.g.

the orientation where the logo sticker of the device appears the right way up.

The default implementation returns Qt::PrimaryOrientation.

Reimplemented from QPlatformScreen.

Definition at line 87 of file qeglfsscreen.cpp.

References QEglFSDeviceIntegration::nativeOrientation(), and qt_egl_device_integration().

+ Here is the call graph for this function:

◆ orientation()

Qt::ScreenOrientation QEglFSScreen::orientation ( ) const
overridevirtual

Reimplement this function in subclass to return the current orientation of the screen, for example based on accelerometer data to determine the device orientation.

The default implementation returns Qt::PrimaryOrientation.

Reimplemented from QPlatformScreen.

Definition at line 92 of file qeglfsscreen.cpp.

References QEglFSDeviceIntegration::orientation(), and qt_egl_device_integration().

+ Here is the call graph for this function:

◆ physicalSize()

QSizeF QEglFSScreen::physicalSize ( ) const
overridevirtual

Reimplement this function in subclass to return the physical size of the screen, in millimeters.

The physical size represents the actual physical dimensions of the display.

The default implementation takes the pixel size of the screen, considers a resolution of 100 dots per inch, and returns the calculated physical size. A device with a screen that has different resolutions will need to be supported by a suitable reimplementation of this function.

See also
logcalDpi

Reimplemented from QPlatformScreen.

Definition at line 72 of file qeglfsscreen.cpp.

References QEglFSDeviceIntegration::physicalScreenSize(), and qt_egl_device_integration().

+ Here is the call graph for this function:

◆ primarySurface()

EGLSurface QEglFSScreen::primarySurface ( ) const
inline

Definition at line 51 of file qeglfsscreen_p.h.

Referenced by QEglFSWindow::create(), QEglFSWindow::destroy(), and QEglFSWindow::surface().

+ Here is the caller graph for this function:

◆ rawGeometry()

QRect QEglFSScreen::rawGeometry ( ) const
virtual

Reimplemented in QEglFSEmulatorScreen, and QEglFSKmsScreen.

Definition at line 57 of file qeglfsscreen.cpp.

References qt_egl_device_integration().

Referenced by QEglFSWindow::create(), geometry(), and QEglFSWindow::resetSurface().

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

◆ refreshRate()

qreal QEglFSScreen::refreshRate ( ) const
overridevirtual

Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.

The default returns 60, a sensible default for modern displays.

Reimplemented from QPlatformScreen.

Definition at line 102 of file qeglfsscreen.cpp.

References qt_egl_device_integration(), and QEglFSDeviceIntegration::refreshRate().

+ Here is the call graph for this function:

◆ topLevelAt()

QWindow * QEglFSScreen::topLevelAt ( const QPoint & pos) const
overridevirtual

Return the given top level window for a given position.

Default implementation retrieves a list of all top level windows and finds the first window which contains point pos

Reimplemented from QPlatformScreen.

Definition at line 215 of file qeglfsscreen.cpp.

References compositor, i, QOpenGLCompositor::instance(), QList< T >::size(), QPlatformScreen::topLevelAt(), window(), and QPlatformScreen::windows().

Referenced by QEglFSKmsGbmCursor::updateMouseStatus().

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

Friends And Related Symbol Documentation

◆ QEglFSWindow

friend class QEglFSWindow
friend

Definition at line 66 of file qeglfsscreen_p.h.


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