Libplasma

windowresizehandler.h
1/*
2 SPDX-FileCopyrightText: 2023 David Edmundson <davidedmundson@kde.org>
3 SPDX-License-Identifier: LGPL-2.0-or-later
4*/
5
6#pragma once
7
8#include <QMargins>
9#include <QObject>
10#include <memory>
11
12#include <plasmaquick/plasmaquick_export.h>
13
14class QWindow;
15
16class WindowResizeHandlerPrivate;
17
18/**
19 * @brief The EdgeEventForwarder class
20 * This class forwards edge events to be replayed within the given margin
21 * This is useful if children do not touch the edge of a window, but want to get input events
22 */
23
24namespace PlasmaQuick
25{
26
27class PLASMAQUICK_EXPORT WindowResizeHandler : public QObject
28{
29 Q_OBJECT
30public:
31 WindowResizeHandler(QWindow *parent);
32 ~WindowResizeHandler();
33
34 void setMargins(const QMargins &margins);
35 QMargins margins() const;
36
37 void setActiveEdges(Qt::Edges edges);
38 Qt::Edges activeEdges() const;
39
40 bool eventFilter(QObject *watched, QEvent *event) override;
41
42private:
43 std::unique_ptr<WindowResizeHandlerPrivate> d;
44};
45
46}
The EdgeEventForwarder class This class forwards edge events to be replayed within the given margin T...
Definition action.h:20
typedef Edges
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:10:41 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.