From c229915e9d4b2818155f3650869726fdcbe7e21d Mon Sep 17 00:00:00 2001
From: Sine Striker <trueful@163.com>
Date: 摹曛, 21 12月 2023 14:12:26 +0800
Subject: [PATCH] Prepare to add mica

---
 examples/mainwindow/mainwindow.h |   21 ++++++++++++++++++++-
 1 files changed, 20 insertions(+), 1 deletions(-)

diff --git a/examples/mainwindow/mainwindow.h b/examples/mainwindow/mainwindow.h
index c0d595d..5511105 100644
--- a/examples/mainwindow/mainwindow.h
+++ b/examples/mainwindow/mainwindow.h
@@ -4,9 +4,28 @@
 #include <QtWidgets/QMainWindow>
 
 class MainWindow : public QMainWindow {
+    Q_OBJECT
 public:
     explicit MainWindow(QWidget *parent = nullptr);
-    ~MainWindow();
+    ~MainWindow() override;
+
+    enum Theme {
+        Dark,
+        Light,
+    };
+    Q_ENUM(Theme)
+
+Q_SIGNALS:
+    void themeChanged();
+
+protected:
+    bool event(QEvent *event) override;
+
+private:
+    void installWindowAgent();
+    void loadStyleSheet(Theme theme);
+
+    Theme currentTheme{};
 };
 
 #endif // MAINWINDOW_H

--
Gitblit v1.9.1