/* SPDX-FileCopyrightText: 2017 Roman Gilg SPDX-License-Identifier: GPL-2.0-or-later */ #include "kcm.h" #include #include #include #include #include "nightcolordata.h" namespace ColorCorrect { K_PLUGIN_FACTORY_WITH_JSON(KCMNightColorFactory, "kcm_nightcolor.json", registerPlugin(); registerPlugin();) KCMNightColor::KCMNightColor(QObject *parent, const KPluginMetaData &data, const QVariantList &args) : KQuickAddons::ManagedConfigModule(parent, data, args) , m_data(new NightColorData(this)) { qmlRegisterAnonymousType("org.kde.private.kcms.nightcolor", 1); qmlRegisterUncreatableMetaObject(ColorCorrect::staticMetaObject, "org.kde.private.kcms.nightcolor", 1, 0, "NightColorMode", "Error: only enums"); worldMapFile = QStandardPaths::locate(QStandardPaths::GenericDataLocation, QStringLiteral("plasma/nightcolor/worldmap.png"), QStandardPaths::LocateFile); setButtons(Apply | Default); } NightColorSettings *KCMNightColor::nightColorSettings() const { return m_data->settings(); } // FIXME: This was added to work around the nonstandardness of the Breeze zoom icons // remove once https://bugs.kde.org/show_bug.cgi?id=435671 is fixed bool KCMNightColor::isIconThemeBreeze() { return QIcon::themeName().contains(QStringLiteral("breeze")); } } #include "kcm.moc"