From 5bfd136473edc506b860177bf88626e35a5a1ba4 Mon Sep 17 00:00:00 2001 From: SineStriker <trueful@163.com> Date: ćšć, 28 12æ 2023 12:06:54 +0800 Subject: [PATCH] Add mac blur view --- src/quick/quickwindowagent.cpp | 24 ++++++++++++++---------- 1 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/quick/quickwindowagent.cpp b/src/quick/quickwindowagent.cpp index 2e69f76..20b48b9 100644 --- a/src/quick/quickwindowagent.cpp +++ b/src/quick/quickwindowagent.cpp @@ -8,6 +8,14 @@ namespace QWK { + /*! + \class QuickWindowAgent + \brief QuickWindowAgent is the window agent for QtQuick. + + It provides interfaces for QtQuick and processes some Qt events related to the QQuickItem + instance. The usage of all APIs is consistent with the \a Widgets module. + */ + QuickWindowAgentPrivate::QuickWindowAgentPrivate() = default; QuickWindowAgentPrivate::~QuickWindowAgentPrivate() = default; @@ -32,12 +40,10 @@ return false; } - if (!d->setup(window, new QuickItemDelegate())) { - return false; - } + d->setup(window, new QuickItemDelegate()); d->hostWindow = window; -#ifdef Q_OS_WINDOWS +#if defined(Q_OS_WINDOWS) && QWINDOWKIT_CONFIG(ENABLE_WINDOWS_SYSTEM_BORDERS) d->setupWindows10BorderWorkaround(); #endif return true; @@ -74,16 +80,14 @@ return d->context->isHitTestVisible(item); } - void QuickWindowAgent::setHitTestVisible_item(const QQuickItem *item, bool visible) { + void QuickWindowAgent::setHitTestVisible(const QQuickItem *item, bool visible) { Q_D(QuickWindowAgent); d->context->setHitTestVisible(item, visible); } - void QuickWindowAgent::setHitTestVisible_rect(const QRect &rect, bool visible) { - Q_D(QuickWindowAgent); - d->context->setHitTestVisible(rect, visible); - } - + /*! + \internal + */ QuickWindowAgent::QuickWindowAgent(QuickWindowAgentPrivate &d, QObject *parent) : WindowAgentBase(d, parent) { d.init(); -- Gitblit v1.9.1