File indexing completed on 2024-11-17 05:02:17

0001 /*
0002     SPDX-FileCopyrightText: 2019 David Redondo <kde@david-redondo.de>
0003 
0004     SPDX-License-Identifier: GPL-2.0-or-later
0005 */
0006 
0007 #include "colorschemes.h"
0008 
0009 #include <KColorSchemeManager>
0010 #include <KConfigGroup>
0011 #include <KLocalizedString>
0012 #include <KSharedConfig>
0013 
0014 using namespace CuttleFish;
0015 
0016 ColorSchemes::ColorSchemes(QObject *parent)
0017     : QObject(parent)
0018     , m_colorManager(new KColorSchemeManager(this))
0019 {
0020 }
0021 
0022 QAbstractItemModel *CuttleFish::ColorSchemes::colorSchemes()
0023 {
0024     return m_colorManager->model();
0025 }
0026 
0027 void ColorSchemes::activateColorScheme(const QString &name)
0028 {
0029     m_colorManager->activateScheme(m_colorManager->indexForScheme(name));
0030 }
0031 
0032 #include "moc_colorschemes.cpp"