QWindowKit  1.5.1.0
Cross-platform window customization framework
Loading...
Searching...
No Matches
winidchangeeventfilter_p.h
1// Copyright (C) 2023-present Stdware Collections (https://www.github.com/stdware)
2// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
3// SPDX-License-Identifier: Apache-2.0
4
5#ifndef WINIDCHANGEEVENTFILTER_P_H
6#define WINIDCHANGEEVENTFILTER_P_H
7
8//
9// W A R N I N G !!!
10// -----------------
11//
12// This file is not part of the QWindowKit API. It is used purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or may even be removed.
15//
16
17#include <QtGui/QWindow>
18
19#include <QWKCore/qwkglobal.h>
20
21namespace QWK {
22
23 class AbstractWindowContext;
24
25 class WinIdChangeEventFilter : public QObject {
26 public:
27 WinIdChangeEventFilter(QObject *host, AbstractWindowContext *context)
28 : host(host), context(context) {
29 }
30
31 virtual WId winId() const = 0;
32
33 protected:
34 QObject *host;
35 AbstractWindowContext *context;
36 };
37
38 class QWK_CORE_EXPORT WindowWinIdChangeEventFilter : public WinIdChangeEventFilter {
39 public:
40 WindowWinIdChangeEventFilter(QWindow *host, AbstractWindowContext *context);
41
42 WId winId() const override;
43
44 protected:
45 bool isAboutToBeDestroyed;
46
47 bool eventFilter(QObject *obj, QEvent *event) override;
48 };
49
50}
51
52#endif // WINIDCHANGEEVENTFILTER_P_H
QWindowKit namespace.
Definition abstractwindowcontext.cpp:13