File indexing completed on 2024-04-21 04:00:35

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/Platform/PlatformTheme>
0011 
0012 #include <QColor>
0013 #include <QIcon>
0014 #include <QObject>
0015 #include <QPointer>
0016 #include <QQuickItem>
0017 
0018 class StyleSingleton;
0019 
0020 class PlasmaDesktopTheme : public Kirigami::Platform::PlatformTheme
0021 {
0022     Q_OBJECT
0023 
0024 public:
0025     explicit PlasmaDesktopTheme(QObject *parent = nullptr);
0026     ~PlasmaDesktopTheme() override;
0027 
0028     Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent) override;
0029 
0030     void syncWindow();
0031     void syncColors();
0032 
0033 protected:
0034     bool event(QEvent *event) override;
0035 
0036 private:
0037     friend class StyleSingleton;
0038     QPointer<QWindow> m_window;
0039 };
0040 
0041 #endif // KIRIGAMIPLASMATHEME_H