KWin
Loading...
Searching...
No Matches
kwinscreenedgeconfigform.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: 2009 Lucas Murray <lmurray@undefinedfire.com>
6 SPDX-FileCopyrightText: 2020 Cyril Rossi <cyril.rossi@enioka.com>
7
8 SPDX-License-Identifier: GPL-2.0-or-later
9*/
10
11#pragma once
12
13#include "kwinscreenedge.h"
14
15namespace Ui
16{
17class KWinScreenEdgesConfigUI;
18}
19
20namespace KWin
21{
22
24{
25 Q_OBJECT
26
27public:
28 KWinScreenEdgesConfigForm(QWidget *parent = nullptr);
30
31 void setRemainActiveOnFullscreen(bool remainActive);
32 bool remainActiveOnFullscreen() const;
33
34 // value is between 0. and 1.
35 void setElectricBorderCornerRatio(double value);
36 void setDefaultElectricBorderCornerRatio(double value);
37
38 // return value between 0. and 1.
39 double electricBorderCornerRatio() const;
40
42
43 void reload() override;
44 void setDefaults() override;
45
46public Q_SLOTS:
47 void setDefaultsIndicatorsVisible(bool visible);
48
49protected:
50 Monitor *monitor() const override;
51 bool isSaveNeeded() const override;
52 bool isDefault() const override;
53
54private Q_SLOTS:
55 void sanitizeCooldown();
56 void groupChanged();
57 void updateDefaultIndicators();
58
59private:
60 bool m_remainActiveOnFullscreen = false;
61
62 // electricBorderCornerRatio value between 0. and 1.
63 double m_referenceCornerRatio = 0.;
64 double m_defaultCornerRatio = 0.;
65
66 bool m_defaultIndicatorVisible = false;
67
68 std::unique_ptr<Ui::KWinScreenEdgesConfigUI> ui;
69};
70
71} // namespace
void setRemainActiveOnFullscreen(bool remainActive)
KWinScreenEdgesConfigForm(QWidget *parent=nullptr)