File indexing completed on 2024-12-08 07:28:27

0001 /*
0002     SPDX-FileCopyrightText: 2016 Zhigalin Alexander <alexander@zhigalin.tk>
0003 
0004     SPDX-License-Identifier: LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #pragma once
0008 
0009 // Qt includes
0010 
0011 #include <QAction>
0012 #include <QtGlobal>
0013 
0014 #include <kconfigwidgets_version.h>
0015 
0016 
0017 // KDE includes
0018 #include <KColorSchemeManager>
0019 
0020 class ThemeManager : public KColorSchemeManager
0021 {
0022     Q_OBJECT
0023 public:
0024     ThemeManager(QObject *parent);
0025     KActionMenu *menu() { return m_menu; };
0026 
0027 private Q_SLOTS:
0028     void slotSchemeChanged(const QString &path);
0029 
0030 private:
0031     KActionMenu *m_menu;
0032 
0033     QString loadCurrentScheme() const;
0034     QString loadCurrentPath() const;
0035     void saveCurrentScheme(const QString & path);
0036     QString currentSchemeName() const;
0037 
0038 Q_SIGNALS:
0039     void themeChanged(const QString &name);
0040 };