From a0096545d2bffc622167d3164c328af8308cc93b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=A6=8C=EA=A6=AB=EA=A6=B6=EA=A6=8F=EA=A7=80=EA=A6=A6?= =?UTF-8?q?=EA=A6=BF=EA=A6=A7=EA=A6=AE=EA=A6=91=EA=A6=A9=EA=A6=AD=EA=A7=80?= Date: Wed, 5 Apr 2023 21:31:27 +0800 Subject: Simplify & make it usable --- bootstrap.cxx | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) (limited to 'bootstrap.cxx') diff --git a/bootstrap.cxx b/bootstrap.cxx index 22ba9cd..bf9a499 100644 --- a/bootstrap.cxx +++ b/bootstrap.cxx @@ -1,9 +1,8 @@ #include "bootstrap.hxx" Bootstrap::Bootstrap(QObject *parent): - QObject(parent), - m_theme(Theme::Light), - m_purpose(Purpose::None) + QQmlEngineExtensionPlugin(parent), + m_purpose(None) { } @@ -12,24 +11,12 @@ Bootstrap *Bootstrap::qmlAttachedProperties(QObject *object) return new Bootstrap(object); } -Bootstrap::Theme Bootstrap::theme() const -{ - return m_theme; -} - -void Bootstrap::setTheme(Bootstrap::Theme theme) -{ - if (theme == m_theme) return; - m_theme = theme; - emit themeChanged(); -} - Bootstrap::Purpose Bootstrap::purpose() const { return m_purpose; } -void Bootstrap::setPurpose(Bootstrap::Purpose purpose) +void Bootstrap::setPurpose(Purpose purpose) { if (purpose == m_purpose) return; m_purpose = purpose; -- cgit v1.2.3