File indexing completed on 2024-04-28 05:36:25
0001 /* 0002 SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org> 0003 SPDX-FileCopyrightText: 2020 Noah Davis <noahadvs@gmail.com> 0004 SPDX-FileCopyrightText: 2021 Arjen Hiemstra <ahiemstra@heimr.nl> 0005 SPDX-License-Identifier: LGPL-2.0-or-later 0006 */ 0007 0008 #ifndef KIRIGAMIPLASMATHEME_H 0009 #define KIRIGAMIPLASMATHEME_H 0010 0011 #include <Kirigami/Platform/PlatformTheme> 0012 #include <QColor> 0013 #include <QIcon> 0014 #include <QObject> 0015 #include <QPointer> 0016 #include <QQuickItem> 0017 0018 class PlasmaDesktopTheme; 0019 class KIconLoader; 0020 class StyleSingleton; 0021 0022 class PlasmaDesktopTheme : public Kirigami::Platform::PlatformTheme 0023 { 0024 Q_OBJECT 0025 0026 public: 0027 explicit PlasmaDesktopTheme(QObject *parent = nullptr); 0028 ~PlasmaDesktopTheme() override; 0029 0030 Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent) override; 0031 0032 void syncWindow(); 0033 void syncColors(); 0034 0035 protected: 0036 bool event(QEvent *event) override; 0037 0038 private: 0039 friend class StyleSingleton; 0040 QPointer<QWindow> m_window; 0041 }; 0042 0043 #endif // KIRIGAMIPLASMATHEME_H