KWin
Loading...
Searching...
No Matches
quicktile.h
Go to the documentation of this file.
1/*
2 KWin - the KDE window manager
3 This file is part of the KDE project.
4
5 SPDX-FileCopyrightText: 2022 Marco Martin <mart@kde.org>
6
7 SPDX-License-Identifier: GPL-2.0-or-later
8*/
9
10#pragma once
11
12#include "tile.h"
13#include "utils/common.h"
14#include <kwin_export.h>
15
16namespace KWin
17{
18
19class KWIN_EXPORT QuickRootTile : public Tile
20{
21 Q_OBJECT
22public:
23 QuickRootTile(TileManager *tiling, Tile *parentItem = nullptr);
25
26 Tile *tileForMode(QuickTileMode mode);
27 Tile *tileForBorder(ElectricBorder border);
28
29 qreal horizontalSplit() const;
30 void setHorizontalSplit(qreal split);
31
32 qreal verticalSplit() const;
33 void setVerticalSplit(qreal split);
34
35private:
36 void relayoutToFit(Tile *tile);
37
38 Tile *m_resizedTile = nullptr;
39
40 std::unique_ptr<Tile> m_leftVerticalTile;
41 std::unique_ptr<Tile> m_rightVerticalTile;
42
43 std::unique_ptr<Tile> m_topHorizontalTile;
44 std::unique_ptr<Tile> m_bottomHorizontalTile;
45
46 std::unique_ptr<Tile> m_topLeftTile;
47 std::unique_ptr<Tile> m_topRightTile;
48 std::unique_ptr<Tile> m_bottomLeftTile;
49 std::unique_ptr<Tile> m_bottomRightTile;
50};
51
52} // namespace KWin
ElectricBorder
Definition globals.h:60