File indexing completed on 2023-12-03 04:13:26
0001 /* 0002 SPDX-FileCopyrightText: 2017 Marco Martin <mart@kde.org> 0003 0004 SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #ifndef KIRIGAMIPLASMATHEME_H 0008 #define KIRIGAMIPLASMATHEME_H 0009 0010 #include <Kirigami/PlatformTheme> 0011 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::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