File indexing completed on 2024-06-09 05:26:03
0001 /* 0002 SPDX-FileCopyrightText: 2021 Vlad Zahorodnii <vlad.zahorodnii@kde.org> 0003 0004 SPDX-License-Identifier: GPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include "core/output.h" 0010 0011 namespace KWin 0012 { 0013 0014 class ExpoArea : public QObject 0015 { 0016 Q_OBJECT 0017 Q_PROPERTY(KWin::Output *screen READ screen WRITE setScreen NOTIFY screenChanged) 0018 Q_PROPERTY(qreal x READ x NOTIFY xChanged) 0019 Q_PROPERTY(qreal y READ y NOTIFY yChanged) 0020 Q_PROPERTY(qreal width READ width NOTIFY widthChanged) 0021 Q_PROPERTY(qreal height READ height NOTIFY heightChanged) 0022 0023 public: 0024 explicit ExpoArea(QObject *parent = nullptr); 0025 0026 Output *screen() const; 0027 void setScreen(Output *screen); 0028 0029 qreal x() const; 0030 qreal y() const; 0031 qreal width() const; 0032 qreal height() const; 0033 0034 Q_SIGNALS: 0035 void screenChanged(); 0036 void xChanged(); 0037 void yChanged(); 0038 void widthChanged(); 0039 void heightChanged(); 0040 0041 private: 0042 void update(); 0043 0044 QRectF m_rect; 0045 Output *m_screen = nullptr; 0046 }; 0047 0048 } // namespace KWin