From 05fedeedb28df769ce16efea39be1cc5e2916b98 Mon Sep 17 00:00:00 2001 From: Yuhang Zhao <zhaoyuhang@rankyee.com> Date: 周三, 06 12月 2023 14:13:01 +0800 Subject: [PATCH] minor tweaks --- src/core/windowitemdelegate.h | 25 +++++++++++++++++++------ 1 files changed, 19 insertions(+), 6 deletions(-) diff --git a/src/core/windowitemdelegate.h b/src/core/windowitemdelegate.h index b24070b..7d7e6d1 100644 --- a/src/core/windowitemdelegate.h +++ b/src/core/windowitemdelegate.h @@ -2,21 +2,34 @@ #define WINDOWITEMDELEGATE_H #include <QtCore/QObject> +#include <QtCore/QPoint> #include <QtGui/QWindow> -#include <QWKCore/qwkcoreglobal.h> +#include <QWKCore/corewindowagent.h> namespace QWK { - class WindowItemDelegate { + class QWK_CORE_EXPORT WindowItemDelegate { public: - virtual ~WindowItemDelegate() = default; + WindowItemDelegate(); + virtual ~WindowItemDelegate(); public: - virtual QWindow *window(QObject *obj) const = 0; + // Item property query + virtual QWindow *window(const QObject *obj) const = 0; + virtual bool isEnabled(const QObject *obj) const = 0; + virtual bool isVisible(const QObject *obj) const = 0; + virtual QRect mapGeometryToScene(const QObject *obj) const = 0; - virtual bool isEnabled(QObject *obj) const = 0; - virtual bool isVisible(QObject *obj) const = 0; + // Host property query + virtual QWindow *hostWindow(const QObject *host) const = 0; + virtual bool isHostSizeFixed(const QObject *host) const = 0; + + // Callbacks + virtual bool resetQtGrabbedControl() const; + + private: + Q_DISABLE_COPY_MOVE(WindowItemDelegate) }; } -- Gitblit v1.9.1