Warning, file /plasma/qqc2-breeze-style/kirigami-plasmadesktop-integration/plasmadesktoptheme.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
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/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::PlatformTheme 0023 { 0024 Q_OBJECT 0025 0026 // Breeze QQC2 style colors 0027 Q_PROPERTY(QColor separatorColor READ separatorColor NOTIFY colorsChanged) 0028 Q_PROPERTY(QColor buttonSeparatorColor READ buttonSeparatorColor NOTIFY colorsChanged) 0029 0030 // Needed to deal with ShadowedRectangle 0031 Q_PROPERTY(bool lowPowerHardware READ lowPowerHardware CONSTANT FINAL) 0032 0033 public: 0034 explicit PlasmaDesktopTheme(QObject *parent = nullptr); 0035 ~PlasmaDesktopTheme() override; 0036 0037 Q_INVOKABLE QIcon iconFromTheme(const QString &name, const QColor &customColor = Qt::transparent) override; 0038 0039 void syncWindow(); 0040 void syncColors(); 0041 0042 // Breeze QQC2 style colors 0043 QColor separatorColor() const; 0044 QColor buttonSeparatorColor() const; 0045 0046 bool lowPowerHardware() const; 0047 0048 protected: 0049 bool event(QEvent *event) override; 0050 0051 private: 0052 friend class StyleSingleton; 0053 QPointer<QWindow> m_window; 0054 0055 // Breeze QQC2 style colors 0056 QColor m_separatorColor; 0057 QColor m_buttonSeparatorColor; 0058 0059 // Needed to deal with ShadowedRectangle 0060 bool m_lowPowerHardware = false; 0061 }; 0062 0063 #endif // KIRIGAMIPLASMATHEME_H