Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QEglFSKmsScreen Class Reference

#include <qeglfskmsscreen_p.h>

+ Inheritance diagram for QEglFSKmsScreen:
+ Collaboration diagram for QEglFSKmsScreen:

Public Member Functions

 QEglFSKmsScreen (QEglFSKmsDevice *device, const QKmsOutput &output, bool headless=false)
 
 ~QEglFSKmsScreen ()
 
void setVirtualPosition (const QPoint &pos)
 
QRect rawGeometry () const override
 
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.
 
QString name () const override
 
QString manufacturer () const override
 Reimplement this function in subclass to return the manufacturer of this screen.
 
QString model () const override
 Reimplement this function in subclass to return the model of this screen.
 
QString serialNumber () const override
 Reimplement this function in subclass to return the serial number of this screen.
 
qreal refreshRate () const override
 Reimplement this function in subclass to return the vertical refresh rate of the screen, in Hz.
 
QList< QPlatformScreen * > virtualSiblings () const override
 Returns a list of all the platform screens that are part of the same virtual desktop.
 
void setVirtualSiblings (QList< QPlatformScreen * > sl)
 
QList< QPlatformScreen::Modemodes () const override
 Reimplement this function in subclass to return the list of modes for this screen.
 
int currentMode () const override
 Reimplement this function in subclass to return the index of the current mode from the modes list.
 
int preferredMode () const override
 Reimplement this function in subclass to return the preferred mode index from the modes list.
 
QEglFSKmsDevicedevice () const
 
virtual void waitForFlip ()
 
QKmsOutputoutput ()
 
void restoreMode ()
 
SubpixelAntialiasingType subpixelAntialiasingTypeHint () const override
 Returns a hint about this screen's subpixel layout structure.
 
QPlatformScreen::PowerState powerState () const override
 Returns the current power state.
 
void setPowerState (QPlatformScreen::PowerState state) override
 Sets the power state for this screen.
 
bool isCursorOutOfRange () const
 
void setCursorOutOfRange (bool b)
 
virtual void pageFlipped (unsigned int sequence, unsigned int tv_sec, unsigned int tv_usec)
 
- Public Member Functions inherited from QEglFSScreen
 QEglFSScreen (EGLDisplay display)
 
 ~QEglFSScreen ()
 
QRect geometry () const override
 Reimplement in subclass to return the pixel geometry of the screen.
 
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.
 
const QPlatformScreenscreenForPosition (const QPoint &point) const
 Find the sibling screen corresponding to globalPos.
 
QScreenscreen () const
 

Protected Attributes

QEglFSKmsDevicem_device
 
QKmsOutput m_output
 
QEdidParser m_edid
 
QPoint m_pos
 
bool m_cursorOutOfRange
 
QList< QPlatformScreen * > m_siblings
 
PowerState m_powerState
 
QEglFSKmsInterruptHandlerm_interruptHandler
 
bool m_headless
 
- Protected Attributes inherited from QPlatformScreen
QScopedPointer< QPlatformScreenPrivated_ptr
 

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.
 

Detailed Description

Definition at line 32 of file qeglfskmsscreen_p.h.

Constructor & Destructor Documentation

◆ QEglFSKmsScreen()

QEglFSKmsScreen::QEglFSKmsScreen ( QEglFSKmsDevice * device,
const QKmsOutput & output,
bool headless = false )

Definition at line 36 of file qeglfskmsscreen.cpp.

◆ ~QEglFSKmsScreen()

QEglFSKmsScreen::~QEglFSKmsScreen ( )

Definition at line 64 of file qeglfskmsscreen.cpp.

Member Function Documentation

◆ currentMode()

int QEglFSKmsScreen::currentMode ( ) const
overridevirtual

Reimplement this function in subclass to return the index of the current mode from the modes list.

The default implementation returns 0.

See also
QPlatformScreen::modes
Since
5.9

Reimplemented from QPlatformScreen.

Definition at line 195 of file qeglfskmsscreen.cpp.

◆ depth()

int QEglFSKmsScreen::depth ( ) const
overridevirtual

Reimplement in subclass to return current depth of the screen.

Implements QPlatformScreen.

Definition at line 87 of file qeglfskmsscreen.cpp.

◆ device()

QEglFSKmsDevice * QEglFSKmsScreen::device ( ) const
inline

Definition at line 67 of file qeglfskmsscreen_p.h.

◆ format()

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

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

Implements QPlatformScreen.

Definition at line 92 of file qeglfskmsscreen.cpp.

◆ isCursorOutOfRange()

bool QEglFSKmsScreen::isCursorOutOfRange ( ) const
inline

Definition at line 79 of file qeglfskmsscreen_p.h.

◆ logicalBaseDpi()

QDpi QEglFSKmsScreen::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 130 of file qeglfskmsscreen.cpp.

◆ logicalDpi()

QDpi QEglFSKmsScreen::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 125 of file qeglfskmsscreen.cpp.

◆ manufacturer()

QString QEglFSKmsScreen::manufacturer ( ) const
overridevirtual

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

The default implementation returns an empty string.

Since
5.9

Reimplemented from QPlatformScreen.

Definition at line 150 of file qeglfskmsscreen.cpp.

◆ model()

QString QEglFSKmsScreen::model ( ) const
overridevirtual

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

The default implementation returns an empty string.

Since
5.9

Reimplemented from QPlatformScreen.

Definition at line 155 of file qeglfskmsscreen.cpp.

◆ modes()

QList< QPlatformScreen::Mode > QEglFSKmsScreen::modes ( ) const
overridevirtual

Reimplement this function in subclass to return the list of modes for this screen.

The default implementation returns a list with only one mode from the current screen size and refresh rate.

See also
QPlatformScreen::geometry
QPlatformScreen::refreshRate
Since
5.9

Reimplemented from QPlatformScreen.

Definition at line 183 of file qeglfskmsscreen.cpp.

◆ name()

QString QEglFSKmsScreen::name ( ) const
overridevirtual

Reimplemented from QPlatformScreen.

Definition at line 145 of file qeglfskmsscreen.cpp.

Referenced by testing.tools.encode_pdf_filter._PdfStream::RegisterByName().

+ Here is the caller graph for this function:

◆ nativeOrientation()

Qt::ScreenOrientation QEglFSKmsScreen::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 135 of file qeglfskmsscreen.cpp.

◆ orientation()

Qt::ScreenOrientation QEglFSKmsScreen::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 140 of file qeglfskmsscreen.cpp.

◆ output()

QKmsOutput & QEglFSKmsScreen::output ( )
inline

Definition at line 71 of file qeglfskmsscreen_p.h.

◆ pageFlipped()

void QEglFSKmsScreen::pageFlipped ( unsigned int sequence,
unsigned int tv_sec,
unsigned int tv_usec )
virtual

Definition at line 223 of file qeglfskmsscreen.cpp.

◆ physicalSize()

QSizeF QEglFSKmsScreen::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 115 of file qeglfskmsscreen.cpp.

◆ powerState()

QPlatformScreen::PowerState QEglFSKmsScreen::powerState ( ) const
overridevirtual

Returns the current power state.

The default implementation always returns PowerStateOn.

Reimplemented from QPlatformScreen.

Definition at line 210 of file qeglfskmsscreen.cpp.

◆ preferredMode()

int QEglFSKmsScreen::preferredMode ( ) const
overridevirtual

Reimplement this function in subclass to return the preferred mode index from the modes list.

The default implementation returns 0.

See also
QPlatformScreen::modes
Since
5.9

Reimplemented from QPlatformScreen.

Definition at line 200 of file qeglfskmsscreen.cpp.

◆ rawGeometry()

QRect QEglFSKmsScreen::rawGeometry ( ) const
overridevirtual

Reimplemented from QEglFSScreen.

Definition at line 77 of file qeglfskmsscreen.cpp.

◆ refreshRate()

qreal QEglFSKmsScreen::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 174 of file qeglfskmsscreen.cpp.

◆ restoreMode()

void QEglFSKmsScreen::restoreMode ( )

Definition at line 169 of file qeglfskmsscreen.cpp.

◆ serialNumber()

QString QEglFSKmsScreen::serialNumber ( ) const
overridevirtual

Reimplement this function in subclass to return the serial number of this screen.

The default implementation returns an empty string.

Since
5.9

Reimplemented from QPlatformScreen.

Definition at line 160 of file qeglfskmsscreen.cpp.

◆ setCursorOutOfRange()

void QEglFSKmsScreen::setCursorOutOfRange ( bool b)
inline

Definition at line 80 of file qeglfskmsscreen_p.h.

◆ setPowerState()

void QEglFSKmsScreen::setPowerState ( QPlatformScreen::PowerState state)
overridevirtual

Sets the power state for this screen.

Reimplemented from QPlatformScreen.

Definition at line 215 of file qeglfskmsscreen.cpp.

◆ setVirtualPosition()

void QEglFSKmsScreen::setVirtualPosition ( const QPoint & pos)

Definition at line 70 of file qeglfskmsscreen.cpp.

◆ setVirtualSiblings()

void QEglFSKmsScreen::setVirtualSiblings ( QList< QPlatformScreen * > sl)
inline

Definition at line 60 of file qeglfskmsscreen_p.h.

◆ subpixelAntialiasingTypeHint()

QPlatformScreen::SubpixelAntialiasingType QEglFSKmsScreen::subpixelAntialiasingTypeHint ( ) const
overridevirtual

Returns a hint about this screen's subpixel layout structure.

The default implementation queries the {QT_SUBPIXEL_AA_TYPE} env variable. This is just a hint because most platforms don't have a way to retrieve the correct value from hardware and instead rely on font configurations.

Reimplemented from QPlatformScreen.

Definition at line 205 of file qeglfskmsscreen.cpp.

◆ virtualSiblings()

QList< QPlatformScreen * > QEglFSKmsScreen::virtualSiblings ( ) const
inlineoverridevirtual

Returns a list of all the platform screens that are part of the same virtual desktop.

Screens part of the same virtual desktop share a common coordinate system, and windows can be freely moved between them.

Reimplemented from QPlatformScreen.

Definition at line 59 of file qeglfskmsscreen_p.h.

◆ waitForFlip()

void QEglFSKmsScreen::waitForFlip ( )
virtual

Reimplemented in QEglFSKmsEglDeviceScreen, and QEglFSKmsGbmScreen.

Definition at line 165 of file qeglfskmsscreen.cpp.

Member Data Documentation

◆ m_cursorOutOfRange

bool QEglFSKmsScreen::m_cursorOutOfRange
protected

Definition at line 89 of file qeglfskmsscreen_p.h.

◆ m_device

QEglFSKmsDevice* QEglFSKmsScreen::m_device
protected

Definition at line 84 of file qeglfskmsscreen_p.h.

◆ m_edid

QEdidParser QEglFSKmsScreen::m_edid
protected

Definition at line 87 of file qeglfskmsscreen_p.h.

◆ m_headless

bool QEglFSKmsScreen::m_headless
protected

Definition at line 97 of file qeglfskmsscreen_p.h.

◆ m_interruptHandler

QEglFSKmsInterruptHandler* QEglFSKmsScreen::m_interruptHandler
protected

Definition at line 95 of file qeglfskmsscreen_p.h.

◆ m_output

QKmsOutput QEglFSKmsScreen::m_output
protected

Definition at line 86 of file qeglfskmsscreen_p.h.

◆ m_pos

QPoint QEglFSKmsScreen::m_pos
protected

Definition at line 88 of file qeglfskmsscreen_p.h.

◆ m_powerState

PowerState QEglFSKmsScreen::m_powerState
protected

Definition at line 93 of file qeglfskmsscreen_p.h.

◆ m_siblings

QList<QPlatformScreen *> QEglFSKmsScreen::m_siblings
protected

Definition at line 91 of file qeglfskmsscreen_p.h.


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