From f8975a7d449bac21a2fdbc1a8ca85d1f5b99b362 Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 周二, 05 12月 2023 02:17:12 +0800
Subject: [PATCH] Implement mainwindow example

---
 src/widgets/widgetwindowagent.cpp |   52 ++++++++++++++++++++++++++--------------------------
 1 files changed, 26 insertions(+), 26 deletions(-)

diff --git a/src/widgets/widgetwindowagent.cpp b/src/widgets/widgetwindowagent.cpp
index 252213e..73a4334 100644
--- a/src/widgets/widgetwindowagent.cpp
+++ b/src/widgets/widgetwindowagent.cpp
@@ -40,6 +40,32 @@
         return true;
     }
 
+    QWidget *WidgetWindowAgent::titleBar() const {
+        Q_D(const WidgetWindowAgent);
+        return static_cast<QWidget *>(d->context->titleBar());
+    }
+
+    void WidgetWindowAgent::setTitleBar(QWidget *w) {
+        Q_D(WidgetWindowAgent);
+        if (!d->context->setTitleBar(w)) {
+            return;
+        }
+        Q_EMIT titleBarWidgetChanged(w);
+    }
+
+    QWidget *WidgetWindowAgent::systemButton(SystemButton button) const {
+        Q_D(const WidgetWindowAgent);
+        return static_cast<QWidget *>(d->context->systemButton(button));
+    }
+
+    void WidgetWindowAgent::setSystemButton(SystemButton button, QWidget *w) {
+        Q_D(WidgetWindowAgent);
+        if (!d->context->setSystemButton(button, w)) {
+            return;
+        }
+        Q_EMIT systemButtonChanged(button, w);
+    }
+
     bool WidgetWindowAgent::isHitTestVisible(QWidget *w) const {
         Q_D(const WidgetWindowAgent);
         return d->context->isHitTestVisible(w);
@@ -53,32 +79,6 @@
     void WidgetWindowAgent::setHitTestVisible(const QRect &rect, bool visible) {
         Q_D(WidgetWindowAgent);
         d->context->setHitTestVisible(rect, visible);
-    }
-
-    QWidget *WidgetWindowAgent::systemButton(CoreWindowAgent::SystemButton button) const {
-        Q_D(const WidgetWindowAgent);
-        return static_cast<QWidget *>(d->context->systemButton(button));
-    }
-
-    void WidgetWindowAgent::setSystemButton(CoreWindowAgent::SystemButton button, QWidget *w) {
-        Q_D(WidgetWindowAgent);
-        if (!d->context->setSystemButton(button, w)) {
-            return;
-        }
-        Q_EMIT systemButtonChanged(button, w);
-    }
-
-    QWidget *WidgetWindowAgent::titleBar() const {
-        Q_D(const WidgetWindowAgent);
-        return static_cast<QWidget *>(d->context->titleBar());
-    }
-
-    void WidgetWindowAgent::setTitleBar(QWidget *w) {
-        Q_D(WidgetWindowAgent);
-        if (!d->context->setTitleBar(w)) {
-            return;
-        }
-        Q_EMIT titleBarWidgetChanged(w);
     }
 
     WidgetWindowAgent::WidgetWindowAgent(WidgetWindowAgentPrivate &d, QObject *parent)

--
Gitblit v1.9.1