Phosphor
Qt6 / Wayland library suite for window-management tools
 
Loading...
Searching...
No Matches
QtScreenProvider.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2026 fuddlesworth
2// SPDX-License-Identifier: LGPL-2.1-or-later
3
4#pragma once
5
7#include "phosphorscreenscore_export.h"
8
9class QScreen;
10
11namespace Phosphor::Screens {
12
25class PHOSPHORSCREENSCORE_EXPORT QtScreenProvider : public IScreenProvider
26{
27 Q_OBJECT
28public:
29 explicit QtScreenProvider(QObject* parent = nullptr);
30
31 QVector<PhysicalScreen> screens() const override;
32 PhysicalScreen primaryScreen() const override;
33
34private:
35 void watchScreen(QScreen* screen);
36 void onQtScreenAdded(QScreen* screen);
37 void onQtScreenRemoved(QScreen* screen);
38};
39
40} // namespace Phosphor::Screens
Pluggable source of the connected-output set and its lifecycle.
Definition IScreenProvider.h:33
Production IScreenProvider — a thin wrapper over QGuiApplication.
Definition QtScreenProvider.h:26
PhysicalScreen primaryScreen() const override
The primary output, or an invalid PhysicalScreen if there is none.
QtScreenProvider(QObject *parent=nullptr)
QVector< PhysicalScreen > screens() const override
Every currently-connected output. Order is not significant.
Definition IWindowTrackingService.h:26
A physical output as ScreenManager sees it — decoupled from QScreen.
Definition PhysicalScreen.h:37