DtkDeclarative
DTK Declarative module
载入中...
搜索中...
未找到
dquickbehindwindowblur_p_p.h
1// SPDX-FileCopyrightText: 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DQUICKBEHINDWINDOWBLUR_P_P_H
6#define DQUICKBEHINDWINDOWBLUR_P_P_H
7
8#include "dquickbehindwindowblur_p.h"
9#include "dquickwindow.h"
10
11#include <private/qquickitem_p.h>
12
13DQUICK_BEGIN_NAMESPACE
14
15class DQuickBehindWindowBlurPrivate : public QQuickItemPrivate
16{
17 Q_DECLARE_PUBLIC(DQuickBehindWindowBlur)
18
19public:
21 : windowAttach(nullptr)
22 , blendColor(Qt::transparent)
23 {
24
25 }
27
28 void _q_updateBlurArea();
29 inline bool isValidBlur() const {
30 if (!blurPath.isEmpty())
31 return true;
32 return blurArea.width > 0 && blurArea.height > 0;
33 }
34 inline void makeToInvalidBlur() {
35#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
36 blurPath.clear();
37#else
38 blurPath = QPainterPath();
39#endif
40 blurArea.width = blurArea.height = -1;
41 }
42
43 DQuickWindowAttached *windowAttach = nullptr;
44
45 qreal radius;
46 QColor blendColor;
47 DPlatformHandle::WMBlurArea blurArea;
48 QPainterPath blurPath;
49};
50
51DQUICK_END_NAMESPACE
52
53#endif // DQUICKBEHINDWINDOWBLUR_H_H
Definition dquickbehindwindowblur_p_p.h:16
Definition dquickbehindwindowblur_p.h:19
Definition dquickwindow.h:49