File indexing completed on 2024-04-28 04:37:14

0001 /*
0002     SPDX-FileCopyrightText: 2016 Zhigalin Alexander <alexander@zhigalin.tk>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 
0007 #ifndef COLORSCHEMECHOOSER_H
0008 #define COLORSCHEMECHOOSER_H
0009 
0010 #include <QAction>
0011 #include <QtGlobal>
0012 
0013 #include "mainwindow.h"
0014 
0015 namespace KDevelop
0016 {
0017 /**
0018  * Provides a menu that will offer to change the color scheme
0019  *
0020  * Furthermore, it will save the selection in the user configuration.
0021  */
0022 class ColorSchemeChooser : public QAction
0023 {
0024     Q_OBJECT
0025 
0026 public:
0027     explicit ColorSchemeChooser(QObject* parent);
0028 
0029     QString currentSchemeName() const;
0030 private Q_SLOTS:
0031     void slotSchemeChanged(QAction* triggeredAction);
0032 
0033 private:
0034     QString loadCurrentScheme() const;
0035     void    saveCurrentScheme(const QString &name);
0036 };
0037 
0038 }  // namespace KDevelop
0039 
0040 #endif // COLORSCHEMECHOOSER_H