File indexing completed on 2025-02-23 05:08:17
0001 /* 0002 SPDX-FileCopyrightText: 2023 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef PLASMATHEME_H 0008 #define PLASMATHEME_H 0009 0010 #include <Kirigami/Platform/PlatformTheme> 0011 0012 #include <Plasma/Theme> 0013 #include <QColor> 0014 #include <QIcon> 0015 #include <QObject> 0016 #include <QPointer> 0017 #include <QQuickItem> 0018 0019 class KIconLoader; 0020 0021 class PlasmaTheme : public Kirigami::Platform::PlatformTheme 0022 { 0023 Q_OBJECT 0024 0025 public: 0026 explicit PlasmaTheme(QObject *parent = nullptr); 0027 ~PlasmaTheme() override; 0028 0029 Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent) override; 0030 0031 void syncColors(); 0032 0033 protected: 0034 bool event(QEvent *event) override; 0035 0036 private: 0037 Plasma::Theme m_theme; 0038 }; 0039 0040 #endif // PLASMATHEME_H