Sine Striker
2024-01-03 7990ac78e1938536650456bf987a4c986a4e6f1b
Update license
58个文件已修改
364 ■■■■■ 已修改文件
LICENSE 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/mainwindow/main.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/mainwindow/mainwindow.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/mainwindow/mainwindow.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/qml/main.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbar.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbar.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbar_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbutton.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbutton.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
examples/shared/widgetframe/windowbutton_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/abstractwindowcontext.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/abstractwindowcontext_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/cocoawindowcontext.mm 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/cocoawindowcontext_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/qtwindowcontext.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/qtwindowcontext_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/contexts/win32windowcontext_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/kernel/nativeeventfilter.cpp 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/kernel/nativeeventfilter_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/kernel/sharedeventfilter.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/kernel/sharedeventfilter_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/qwindowkit_linux.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/qwindowkit_windows.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/qwindowkit_windows.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/qwkglobal.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/qwkglobal_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/shared/qwkwindowsextra_p.h 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/shared/systemwindow_p.h 182 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/style/styleagent.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/style/styleagent.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/style/styleagent_linux.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/style/styleagent_mac.mm 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/style/styleagent_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/style/styleagent_win.cpp 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/windowagentbase.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/windowagentbase.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/windowagentbase_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/windowitemdelegate.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/core/windowitemdelegate_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickitemdelegate.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickitemdelegate_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickwindowagent.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickwindowagent.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickwindowagent_mac.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickwindowagent_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/quickwindowagent_win.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/qwkquickglobal.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/quick/qwkquickglobal.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/qwkwidgetsglobal.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetitemdelegate.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetitemdelegate_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetwindowagent.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetwindowagent.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetwindowagent_mac.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetwindowagent_p.h 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/widgets/widgetwindowagent_win.cpp 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
LICENSE
@@ -186,7 +186,7 @@
      same "printed page" as the copyright notice for easier
      identification within third-party archives.
   Copyright (C) 2023-2024 Stdware Collections
   Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
   Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
   Licensed under the Apache License, Version 2.0 (the "License");
examples/mainwindow/main.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include <QtWidgets/QApplication>
examples/mainwindow/mainwindow.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "mainwindow.h"
examples/mainwindow/mainwindow.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef MAINWINDOW_H
examples/qml/main.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include <QtGui/QGuiApplication>
examples/shared/widgetframe/windowbar.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "windowbar.h"
examples/shared/widgetframe/windowbar.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWBAR_H
examples/shared/widgetframe/windowbar_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWBARPRIVATE_H
examples/shared/widgetframe/windowbutton.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "windowbutton.h"
examples/shared/widgetframe/windowbutton.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWBUTTON_H
examples/shared/widgetframe/windowbutton_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWBUTTONPRIVATE_H
src/core/contexts/abstractwindowcontext.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "abstractwindowcontext_p.h"
src/core/contexts/abstractwindowcontext_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef ABSTRACTWINDOWCONTEXT_P_H
src/core/contexts/cocoawindowcontext.mm
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "cocoawindowcontext_p.h"
src/core/contexts/cocoawindowcontext_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef COCOAWINDOWCONTEXT_P_H
src/core/contexts/qtwindowcontext.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "qtwindowcontext_p.h"
src/core/contexts/qtwindowcontext_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QTWINDOWCONTEXT_P_H
src/core/contexts/win32windowcontext.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "win32windowcontext_p.h"
src/core/contexts/win32windowcontext_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WIN32WINDOWCONTEXT_P_H
src/core/kernel/nativeeventfilter.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "nativeeventfilter_p.h"
@@ -25,7 +26,7 @@
    }
    bool NativeEventDispatcher::nativeDispatch(const QByteArray &eventType, void *message,
                                         QT_NATIVE_EVENT_RESULT_TYPE *result) {
                                               QT_NATIVE_EVENT_RESULT_TYPE *result) {
        for (const auto &ef : std::as_const(m_nativeEventFilters)) {
            if (ef->nativeEventFilter(eventType, message, result))
                return true;
@@ -66,12 +67,10 @@
            return nativeDispatch(eventType, message, result);
        }
        static AppMasterNativeEventFilter *instance;
        static inline AppMasterNativeEventFilter *instance = nullptr;
        friend class AppNativeEventFilter;
    };
    AppMasterNativeEventFilter *AppMasterNativeEventFilter::instance = nullptr;
    AppNativeEventFilter::AppNativeEventFilter() {
        if (!AppMasterNativeEventFilter::instance) {
src/core/kernel/nativeeventfilter_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef NATIVEEVENTFILTER_P_H
src/core/kernel/sharedeventfilter.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "sharedeventfilter_p.h"
src/core/kernel/sharedeventfilter_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef SHAREDEVENTFILTER_P_H
src/core/qwindowkit_linux.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWINDOWKIT_LINUX_H
src/core/qwindowkit_windows.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "qwindowkit_windows.h"
src/core/qwindowkit_windows.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWINDOWKIT_WINDOWS_H
src/core/qwkglobal.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWKGLOBAL_H
src/core/qwkglobal_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWKGLOBAL_P_H
src/core/shared/qwkwindowsextra_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWKWINDOWSEXTRA_P_H
@@ -158,7 +159,7 @@
        struct DynamicApis {
            static const DynamicApis &instance() {
                static const DynamicApis inst{};
                static const DynamicApis inst;
                return inst;
            }
src/core/shared/systemwindow_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef SYSTEMWINDOW_P_H
@@ -18,107 +19,100 @@
#include <QWKCore/private/qwkglobal_p.h>
// Don't include this header in any header files.
namespace QWK {
    // Anonymous namespace
    namespace {
    class WindowMoveManipulator : public QObject {
    public:
        explicit WindowMoveManipulator(QWindow *targetWindow)
            : QObject(targetWindow), target(targetWindow), initialMousePosition(QCursor::pos()),
              initialWindowPosition(targetWindow->position()) {
            target->installEventFilter(this);
        }
        class WindowMoveManipulator : public QObject {
        public:
            explicit WindowMoveManipulator(QWindow *targetWindow)
                : QObject(targetWindow), target(targetWindow), initialMousePosition(QCursor::pos()),
                  initialWindowPosition(targetWindow->position()) {
                target->installEventFilter(this);
            }
        protected:
            bool eventFilter(QObject *obj, QEvent *event) override {
                switch (event->type()) {
                    case QEvent::MouseMove: {
                        auto mouseEvent = static_cast<QMouseEvent *>(event);
                        QPoint delta = getMouseEventGlobalPos(mouseEvent) - initialMousePosition;
                        target->setPosition(initialWindowPosition + delta);
                        return true;
                    }
                    case QEvent::MouseButtonRelease: {
                        if (target->y() < 0) {
                            target->setPosition(target->x(), 0);
                        }
                        target->removeEventFilter(this);
                        deleteLater();
                    }
                    default:
                        break;
    protected:
        bool eventFilter(QObject *obj, QEvent *event) override {
            switch (event->type()) {
                case QEvent::MouseMove: {
                    auto mouseEvent = static_cast<QMouseEvent *>(event);
                    QPoint delta = getMouseEventGlobalPos(mouseEvent) - initialMousePosition;
                    target->setPosition(initialWindowPosition + delta);
                    return true;
                }
                return false;
            }
        private:
            QWindow *target;
            QPoint initialMousePosition;
            QPoint initialWindowPosition;
        };
        class WindowResizeManipulator : public QObject {
        public:
            WindowResizeManipulator(QWindow *targetWindow, Qt::Edges edges)
                : QObject(targetWindow), target(targetWindow), resizeEdges(edges),
                  initialMousePosition(QCursor::pos()), initialWindowRect(target->geometry()) {
                target->installEventFilter(this);
            }
        protected:
            bool eventFilter(QObject *obj, QEvent *event) override {
                switch (event->type()) {
                    case QEvent::MouseMove: {
                        auto mouseEvent = static_cast<QMouseEvent *>(event);
                        QPoint globalMousePos = getMouseEventGlobalPos(mouseEvent);
                        QRect windowRect = initialWindowRect;
                        if (resizeEdges & Qt::LeftEdge) {
                            int delta = globalMousePos.x() - initialMousePosition.x();
                            windowRect.setLeft(initialWindowRect.left() + delta);
                        }
                        if (resizeEdges & Qt::RightEdge) {
                            int delta = globalMousePos.x() - initialMousePosition.x();
                            windowRect.setRight(initialWindowRect.right() + delta);
                        }
                        if (resizeEdges & Qt::TopEdge) {
                            int delta = globalMousePos.y() - initialMousePosition.y();
                            windowRect.setTop(initialWindowRect.top() + delta);
                        }
                        if (resizeEdges & Qt::BottomEdge) {
                            int delta = globalMousePos.y() - initialMousePosition.y();
                            windowRect.setBottom(initialWindowRect.bottom() + delta);
                        }
                        target->setGeometry(windowRect);
                        return true;
                case QEvent::MouseButtonRelease: {
                    if (target->y() < 0) {
                        target->setPosition(target->x(), 0);
                    }
                    case QEvent::MouseButtonRelease: {
                        target->removeEventFilter(this);
                        deleteLater();
                    }
                    default:
                        break;
                    target->removeEventFilter(this);
                    deleteLater();
                }
                return false;
                default:
                    break;
            }
            return false;
        }
        private:
            QWindow *target;
            QPoint initialMousePosition;
            QRect initialWindowRect;
            Qt::Edges resizeEdges;
        };
    private:
        QWindow *target;
        QPoint initialMousePosition;
        QPoint initialWindowPosition;
    };
    }
    class WindowResizeManipulator : public QObject {
    public:
        WindowResizeManipulator(QWindow *targetWindow, Qt::Edges edges)
            : QObject(targetWindow), target(targetWindow), resizeEdges(edges),
              initialMousePosition(QCursor::pos()), initialWindowRect(target->geometry()) {
            target->installEventFilter(this);
        }
    protected:
        bool eventFilter(QObject *obj, QEvent *event) override {
            switch (event->type()) {
                case QEvent::MouseMove: {
                    auto mouseEvent = static_cast<QMouseEvent *>(event);
                    QPoint globalMousePos = getMouseEventGlobalPos(mouseEvent);
                    QRect windowRect = initialWindowRect;
                    if (resizeEdges & Qt::LeftEdge) {
                        int delta = globalMousePos.x() - initialMousePosition.x();
                        windowRect.setLeft(initialWindowRect.left() + delta);
                    }
                    if (resizeEdges & Qt::RightEdge) {
                        int delta = globalMousePos.x() - initialMousePosition.x();
                        windowRect.setRight(initialWindowRect.right() + delta);
                    }
                    if (resizeEdges & Qt::TopEdge) {
                        int delta = globalMousePos.y() - initialMousePosition.y();
                        windowRect.setTop(initialWindowRect.top() + delta);
                    }
                    if (resizeEdges & Qt::BottomEdge) {
                        int delta = globalMousePos.y() - initialMousePosition.y();
                        windowRect.setBottom(initialWindowRect.bottom() + delta);
                    }
                    target->setGeometry(windowRect);
                    return true;
                }
                case QEvent::MouseButtonRelease: {
                    target->removeEventFilter(this);
                    deleteLater();
                }
                default:
                    break;
            }
            return false;
        }
    private:
        QWindow *target;
        QPoint initialMousePosition;
        QRect initialWindowRect;
        Qt::Edges resizeEdges;
    };
    // QWindow::startSystemMove() and QWindow::startSystemResize() is first supported at Qt 5.15
    // QWindow::startSystemResize() returns false on macOS
@@ -126,7 +120,7 @@
    // When the new API fails, we emulate the window actions using the classical API.
    static inline void startSystemMove(QWindow *window) {
    inline void startSystemMove(QWindow *window) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
        std::ignore = new WindowMoveManipulator(window);
#elif defined(Q_OS_LINUX)
@@ -139,7 +133,7 @@
#endif
    }
    static inline void startSystemResize(QWindow *window, Qt::Edges edges) {
    inline void startSystemResize(QWindow *window, Qt::Edges edges) {
#if (QT_VERSION < QT_VERSION_CHECK(5, 15, 0))
        std::ignore = new WindowResizeManipulator(window, edges);
#elif defined(Q_OS_MAC) || defined(Q_OS_LINUX)
src/core/style/styleagent.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "styleagent.h"
src/core/style/styleagent.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef STYLEAGENT_H
src/core/style/styleagent_linux.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "styleagent_p.h"
src/core/style/styleagent_mac.mm
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "styleagent_p.h"
src/core/style/styleagent_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef STYLEAGENTPRIVATE_H
src/core/style/styleagent_win.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "styleagent_p.h"
@@ -63,7 +64,7 @@
            return false;
        }
        static SystemSettingEventFilter *instance;
        static inline SystemSettingEventFilter *instance = nullptr;
        static inline void install() {
            if (instance) {
@@ -80,8 +81,6 @@
            instance = nullptr;
        }
    };
    SystemSettingEventFilter *SystemSettingEventFilter::instance = nullptr;
    void StyleAgentPrivate::setupSystemThemeHook() {
        systemTheme = getSystemTheme();
src/core/windowagentbase.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "windowagentbase.h"
src/core/windowagentbase.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWAGENTBASE_H
src/core/windowagentbase_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWAGENTBASEPRIVATE_H
src/core/windowitemdelegate.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "windowitemdelegate_p.h"
src/core/windowitemdelegate_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WINDOWITEMDELEGATE_P_H
src/quick/quickitemdelegate.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "quickitemdelegate_p.h"
src/quick/quickitemdelegate_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QUICKITEMDELEGATE_P_H
src/quick/quickwindowagent.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "quickwindowagent.h"
src/quick/quickwindowagent.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QUICKWINDOWAGENT_H
src/quick/quickwindowagent_mac.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "quickwindowagent_p.h"
src/quick/quickwindowagent_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QUICKWINDOWAGENTPRIVATE_H
src/quick/quickwindowagent_win.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "quickwindowagent_p.h"
src/quick/qwkquickglobal.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "qwkquickglobal.h"
src/quick/qwkquickglobal.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWKQUICKGLOBAL_H
src/widgets/qwkwidgetsglobal.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef QWKWIDGETSGLOBAL_H
src/widgets/widgetitemdelegate.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "widgetitemdelegate_p.h"
src/widgets/widgetitemdelegate_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WIDGETITEMDELEGATE_P_H
src/widgets/widgetwindowagent.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "widgetwindowagent.h"
src/widgets/widgetwindowagent.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WIDGETWINDOWAGENT_H
src/widgets/widgetwindowagent_mac.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "widgetwindowagent_p.h"
src/widgets/widgetwindowagent_p.h
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#ifndef WIDGETWINDOWAGENTPRIVATE_H
src/widgets/widgetwindowagent_win.cpp
@@ -1,4 +1,5 @@
// Copyright (C) 2023-2024 Stdware Collections
// Copyright (C) 2023-2024 Stdware Collections (https://www.github.com/stdware)
// Copyright (C) 2021-2023 wangwenx190 (Yuhang Zhao)
// SPDX-License-Identifier: Apache-2.0
#include "widgetwindowagent_p.h"