From a5d13e19dd7f6037e10b649c49805922ae5e0fa6 Mon Sep 17 00:00:00 2001 From: SineStriker <trueful@163.com> Date: 周五, 22 12月 2023 17:04:29 +0800 Subject: [PATCH] Prepare to remove style support again --- src/core/windowagentbase.cpp | 36 ++++++++++++++---------------------- 1 files changed, 14 insertions(+), 22 deletions(-) diff --git a/src/core/windowagentbase.cpp b/src/core/windowagentbase.cpp index d2b9e1e..819dfb2 100644 --- a/src/core/windowagentbase.cpp +++ b/src/core/windowagentbase.cpp @@ -50,37 +50,29 @@ WindowAgentBase::~WindowAgentBase() = default; + QVariant WindowAgentBase::windowAttribute(const QString &key) const { + Q_D(const WindowAgentBase); + return d->context->windowAttribute(key); + } + + bool WindowAgentBase::setWindowAttribute(const QString &key, const QVariant &attribute) { + Q_D(WindowAgentBase); + return d->context->setWindowAttribute(key, attribute); + } + void WindowAgentBase::showSystemMenu(const QPoint &pos) { Q_D(WindowAgentBase); d->context->showSystemMenu(pos); } - void WindowAgentBase::startSystemMove(const QPoint &pos) { - Q_D(WindowAgentBase); - auto win = d->context->window(); - if (!win) { - return; - } - - Q_UNUSED(pos) - win->startSystemMove(); - } - - void WindowAgentBase::startSystemResize(Qt::Edges edges, const QPoint &pos) { - Q_D(WindowAgentBase); - auto win = d->context->window(); - if (!win) { - return; - } - - Q_UNUSED(pos) - win->startSystemResize(edges); - } - void WindowAgentBase::centralize() { + Q_D(WindowAgentBase); + d->context->virtual_hook(AbstractWindowContext::CentralizeHook, nullptr); } void WindowAgentBase::raise() { + Q_D(WindowAgentBase); + d->context->virtual_hook(AbstractWindowContext::RaiseWindowHook, nullptr); } WindowAgentBase::WindowAgentBase(WindowAgentBasePrivate &d, QObject *parent) -- Gitblit v1.9.1