File indexing completed on 2024-04-28 16:52:27

0001 /*
0002  * SPDX-FileCopyrightText: 2022 by Devin Lin <devin@kde.org>
0003  *
0004  * SPDX-License-Identifier: GPL-2.0-or-later
0005  */
0006 
0007 #pragma once
0008 
0009 #include <QObject>
0010 
0011 #include "colorcorrectinterface.h"
0012 #include "nightcolorsettings.h"
0013 
0014 class NightColorUtil : public QObject
0015 {
0016     Q_OBJECT
0017     Q_PROPERTY(bool enabled READ enabled WRITE setEnabled NOTIFY enabledChanged)
0018 
0019 public:
0020     NightColorUtil(QObject *parent = nullptr);
0021 
0022     bool enabled();
0023     void setEnabled(bool enabled);
0024 
0025 Q_SIGNALS:
0026     void enabledChanged();
0027 
0028 public Q_SLOTS:
0029     void enabledUpdated(const QString &name, const QVariantMap &map, const QStringList &list);
0030 
0031 private:
0032     bool m_enabled;
0033     OrgKdeKwinColorCorrectInterface *m_ccInterface;
0034     NightColorSettings *m_settings;
0035 };