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