Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
PhosphorScreens::QtPhysicalScreenSource Class Reference

Production IPhysicalScreenSource — a thin wrapper over QGuiApplication. More...

#include <PhosphorScreens/QtPhysicalScreenSource.h>

Inheritance diagram for PhosphorScreens::QtPhysicalScreenSource:
[legend]

Public Member Functions

 QtPhysicalScreenSource (QObject *parent=nullptr)
QVector< PhysicalScreen > screens () const override
 Every currently-connected output. Order is not significant.
PhysicalScreen primaryScreen () const override
 The primary output, or an invalid PhysicalScreen if there is none.
Public Member Functions inherited from PhosphorScreens::IPhysicalScreenSource
 IPhysicalScreenSource (QObject *parent=nullptr)
 ~IPhysicalScreenSource () override=default

Additional Inherited Members

Signals inherited from PhosphorScreens::IPhysicalScreenSource
void screenAdded (const PhysicalScreen &screen)
 A new output connected.
void screenRemoved (const PhysicalScreen &screen)
 An output disconnected.
void screenGeometryChanged (const PhysicalScreen &screen)
 A connected output's geometry changed (move, resize, rotate, scale).

Detailed Description

Production IPhysicalScreenSource — a thin wrapper over QGuiApplication.

Enumerates QGuiApplication::screens() and relays screenAdded, screenRemoved, and per-screen QScreen::geometryChanged as the IPhysicalScreenSource lifecycle signals. The connector → PhysicalScreen conversion fills in the EDID-aware identifier via ScreenIdentity.

Always live: it wires up Qt's screen signals in its constructor, so it needs no explicit start/stop — matching QGuiApplication's own always-on screen tracking. Construct one and inject it via ScreenManagerConfig.

Constructor & Destructor Documentation

◆ QtPhysicalScreenSource()

PhosphorScreens::QtPhysicalScreenSource::QtPhysicalScreenSource ( QObject * parent = nullptr)
explicit

Member Function Documentation

◆ primaryScreen()

PhysicalScreen PhosphorScreens::QtPhysicalScreenSource::primaryScreen ( ) const
overridevirtual

The primary output, or an invalid PhysicalScreen if there is none.

Implements PhosphorScreens::IPhysicalScreenSource.

◆ screens()

QVector< PhysicalScreen > PhosphorScreens::QtPhysicalScreenSource::screens ( ) const
overridevirtual

Every currently-connected output. Order is not significant.

Implements PhosphorScreens::IPhysicalScreenSource.


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