File indexing completed on 2025-01-12 13:31:30
0001 /* 0002 KWin - the KDE window manager 0003 This file is part of the KDE project. 0004 0005 SPDX-FileCopyrightText: 2022 Marco Martin <mart@kde.org> 0006 0007 SPDX-License-Identifier: GPL-2.0-or-later 0008 */ 0009 0010 #pragma once 0011 0012 #include "tile.h" 0013 #include "utils/common.h" 0014 #include <kwin_export.h> 0015 0016 namespace KWin 0017 { 0018 0019 class KWIN_EXPORT QuickRootTile : public Tile 0020 { 0021 Q_OBJECT 0022 public: 0023 QuickRootTile(TileManager *tiling, Tile *parentItem = nullptr); 0024 ~QuickRootTile(); 0025 0026 Tile *tileForMode(QuickTileMode mode); 0027 Tile *tileForBorder(ElectricBorder border); 0028 0029 qreal horizontalSplit() const; 0030 void setHorizontalSplit(qreal split); 0031 0032 qreal verticalSplit() const; 0033 void setVerticalSplit(qreal split); 0034 0035 private: 0036 void relayoutToFit(Tile *tile); 0037 0038 Tile *m_resizedTile = nullptr; 0039 0040 std::unique_ptr<Tile> m_leftVerticalTile; 0041 std::unique_ptr<Tile> m_rightVerticalTile; 0042 0043 std::unique_ptr<Tile> m_topHorizontalTile; 0044 std::unique_ptr<Tile> m_bottomHorizontalTile; 0045 0046 std::unique_ptr<Tile> m_topLeftTile; 0047 std::unique_ptr<Tile> m_topRightTile; 0048 std::unique_ptr<Tile> m_bottomLeftTile; 0049 std::unique_ptr<Tile> m_bottomRightTile; 0050 }; 0051 0052 } // namespace KWin