File indexing completed on 2024-04-28 05:27:06

0001 /********************************************************************
0002  KWin - the KDE window manager
0003  This file is part of the KDE project.
0004 
0005 SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
0006 SPDX-FileCopyrightText: 2014 Hugo Pereira Da Costa <hugo.pereira@free.fr>
0007 SPDX-FileCopyrightText: 2015 Mika Allan Rauhala <mika.allan.rauhala@gmail.com>
0008 
0009 SPDX-License-Identifier: GPL-2.0-or-later
0010 *********************************************************************/
0011 
0012 #ifndef KWIN_DECORATION_PALETTE_H
0013 #define KWIN_DECORATION_PALETTE_H
0014 
0015 #include <KDecoration2/DecorationSettings>
0016 #include <QFileSystemWatcher>
0017 #include <QPalette>
0018 
0019 namespace KWin
0020 {
0021 namespace Decoration
0022 {
0023 class DecorationPalette : public QObject
0024 {
0025     Q_OBJECT
0026 public:
0027     DecorationPalette(const QString &colorScheme);
0028 
0029     bool isValid() const;
0030 
0031     QColor color(KDecoration2::ColorGroup group, KDecoration2::ColorRole role) const;
0032     QPalette palette() const;
0033 
0034 Q_SIGNALS:
0035     void changed();
0036 
0037 private:
0038     void update();
0039 
0040     QString m_colorScheme;
0041     QFileSystemWatcher m_watcher;
0042 
0043     QPalette m_palette;
0044 
0045     QColor m_activeTitleBarColor;
0046     QColor m_inactiveTitleBarColor;
0047 
0048     QColor m_activeFrameColor;
0049     QColor m_inactiveFrameColor;
0050 
0051     QColor m_activeForegroundColor;
0052     QColor m_inactiveForegroundColor;
0053     QColor m_warningForegroundColor;
0054 };
0055 
0056 }
0057 }
0058 
0059 #endif