Phosphor
Qt6 / Wayland library suite for window-management tools
Loading...
Searching...
No Matches
QtPhysicalScreenSource.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 PhosphorScreens {
12
25class PHOSPHORSCREENSCORE_EXPORT QtPhysicalScreenSource : public IPhysicalScreenSource
26{
27 Q_OBJECT
28public:
29 explicit QtPhysicalScreenSource(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 PhosphorScreens
IPhysicalScreenSource(QObject *parent=nullptr)
Definition IPhysicalScreenSource.h:46
PhysicalScreen primaryScreen() const override
The primary output, or an invalid PhysicalScreen if there is none.
QVector< PhysicalScreen > screens() const override
Every currently-connected output. Order is not significant.
QtPhysicalScreenSource(QObject *parent=nullptr)
Definition IWindowTrackingService.h:28
A physical output as ScreenManager sees it — decoupled from QScreen.
Definition PhysicalScreen.h:37