DtkDeclarative
DTK Declarative module
载入中...
搜索中...
未找到
dquickwindow_p.h
1// SPDX-FileCopyrightText: 2020 - 2026 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DWINDOW_P_H
6#define DWINDOW_P_H
7
8#include <DObjectPrivate>
9#include <DObject>
10#include <DPlatformHandle>
11
12#include <QPointer>
13
14#include "dquickwindow.h"
15
16DQUICK_BEGIN_NAMESPACE
17
18class DQuickBehindWindowBlur;
19class DQuickWindowPrivate : public DTK_CORE_NAMESPACE::DObjectPrivate
20{
21public:
23
24 DQuickWindowAttached *attached;
25
26private:
27 D_DECLARE_PUBLIC(DQuickWindow)
28};
29
30class DQuickWindowAttachedPrivate : public DTK_CORE_NAMESPACE::DObjectPrivate
31{
32public:
33 enum BoolOptional : qint8 {
34 Invalid = -1,
35 False = 0,
36 True = 1
37 };
38
39 explicit DQuickWindowAttachedPrivate(QWindow *window, DQuickWindowAttached *qq);
41
42 bool ensurePlatformHandle();
43 void destoryPlatformHandle();
44 void setWindow(QWindow *newWindow);
45 void _q_onWindowMotifHintsChanged(quint32 winId);
46 void addBlur(DQuickBehindWindowBlur *blur);
47 void removeBlur(DQuickBehindWindowBlur *blur);
48 void updateBlurAreaFor(DQuickBehindWindowBlur *blur);
49 void _q_updateBlurAreaForWindow();
50 void _q_updateClipPath();
51 void _q_ensurePlatformHandle();
52#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
53 void ensurePalette();
54 void _q_updateWindowPalette();
55 void _q_onPaletteChanged();
56#endif
57
58 QPointer<QWindow> window = nullptr;
59 WId splitMenuWindowId = 0;
60 DPlatformHandle *handle = nullptr;
61 BoolOptional explicitEnable {Invalid};
62 BoolOptional explicitTranslucentBackground {Invalid};
63 BoolOptional explicitEnableSystemResize {Invalid};
64 BoolOptional explicitEnableSystemMove {Invalid};
65 BoolOptional explicitEnableBlurWindow {Invalid};
66 qint8 explicitWindowRadius = -1;
67 qint8 explicitBorderWidth = -1;
68 qint8 explicitShadowRadius = -1;
69 QPoint explicitShadowOffset;
70 QColor explicitBorderColor;
71 QColor explicitShadowColor;
72 DPlatformHandle::EffectScenes explicitEffectScene {};
73 DPlatformHandle::EffectTypes explicitEffectType {};
74
75 DWindowManagerHelper::WmWindowTypes wmWindowTypes;
76 DWindowManagerHelper::MotifFunctions motifFunctions;
77 DWindowManagerHelper::MotifDecorations motifDecorations;
78
79 QList<DQuickBehindWindowBlur*> blurList;
80 QQuickPath *clipPath = nullptr;
81 QQuickTransition *overlayExitedTransition = nullptr;
82 QQmlComponent *loadingOverlay = nullptr;
83 DQuickAppLoaderItem *appLoaderItem;
84#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
85 DGuiApplicationHelper::ColorType themeType{DGuiApplicationHelper::UnknownType};
86 bool paletteInit = false;
87 QQuickPalette *quickPalette = nullptr;
88 QQuickPalette *inactiveQuickPalette = nullptr;
89 std::array<QMetaObject::Connection, 2> paletteConnections;
90#endif
91private:
92 D_DECLARE_PUBLIC(DQuickWindowAttached)
93};
94
95DQUICK_END_NAMESPACE
96
97#endif //DWINDOW_P_H
Definition dquickapploaderitem_p.h:16
Definition dquickbehindwindowblur_p.h:19
Definition dquickwindow_p.h:31
Definition dquickwindow.h:50
Definition dquickwindow_p.h:20
Definition dquickwindow.h:29