diff --git a/applets/nightcolor/package/contents/ui/main.qml b/applets/nightcolor/package/contents/ui/main.qml index 521f70df2..54edc0fc0 100644 --- a/applets/nightcolor/package/contents/ui/main.qml +++ b/applets/nightcolor/package/contents/ui/main.qml @@ -1,108 +1,108 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ import QtQuick 2.5 import org.kde.kquickcontrolsaddons 2.0 import org.kde.plasma.core 2.0 as PlasmaCore import org.kde.plasma.plasmoid 2.0 import org.kde.plasma.private.nightcolorcontrol 1.0 Item { id: root Plasmoid.icon: monitor.running ? 'redshift-status-on' : 'redshift-status-off' Plasmoid.status: { // Display the applet in the system tray when Night Color is active. if (monitor.enabled && monitor.targetTemperature != 6500) { return PlasmaCore.Types.ActiveStatus; } if (inhibitor.state != Inhibitor.Uninhibited) { return PlasmaCore.Types.ActiveStatus; } return PlasmaCore.Types.PassiveStatus; } Plasmoid.toolTipMainText: i18n("Night Color Control") Plasmoid.toolTipSubText: { if (inhibitor.state == Inhibitor.Inhibited) { return i18n("Night Color is inhibited"); } if (!monitor.available) { return i18n("Night Color is unavailable"); } if (!monitor.enabled) { return i18n("Night Color is disabled"); } if (!monitor.running) { return i18n("Night Color is not running"); } return i18n("Night Color is active (%1K)", monitor.currentTemperature); } Plasmoid.preferredRepresentation: Plasmoid.compactRepresentation Plasmoid.compactRepresentation: PlasmaCore.IconItem { active: compactMouseArea.containsMouse source: plasmoid.icon MouseArea { id: compactMouseArea anchors.fill: parent hoverEnabled: true onClicked: toggleInhibition() } } Plasmoid.onActivated: toggleInhibition() function toggleInhibition() { if (!monitor.available) { return; } switch (inhibitor.state) { case Inhibitor.Inhibiting: case Inhibitor.Inhibited: inhibitor.uninhibit(); break; case Inhibitor.Uninhibiting: case Inhibitor.Uninhibited: inhibitor.inhibit(); break; } } function action_KCMNightColor() { KCMShell.open("kcm_nightcolor"); } Inhibitor { id: inhibitor } Monitor { id: monitor } Component.onCompleted: { if (KCMShell.authorize("kcm_nightcolor.desktop").length > 0) { plasmoid.setAction("KCMNightColor", i18n("Configure Night Color..."), "configure"); } plasmoid.removeAction("configure"); } } diff --git a/applets/nightcolor/package/metadata.desktop b/applets/nightcolor/package/metadata.desktop index 9bb1b237e..65e540d14 100644 --- a/applets/nightcolor/package/metadata.desktop +++ b/applets/nightcolor/package/metadata.desktop @@ -1,49 +1,49 @@ [Desktop Entry] Name=Night Color Control Name[ca]=Control del color de nit Name[es]=Control del color nocturno Name[et]=Öise värvi juhtimine Name[it]=Controllo del colore notturno Name[lt]=Naktinės spalvos valdymas Name[nl]=Besturing van nachtkleur Name[pt]=Controlo da Cor Nocturna Name[pt_BR]=Controle da cor noturna Name[ru]=Управление ночной цветовой схемой Name[sk]=Ovládanie nočnej farby Name[sv]=Nattfärgkontroll Name[uk]=Керування нічними кольорами Name[x-test]=xxNight Color Controlxx Name[zh_TW]=夜色模式控制 Comment=Plasmoid for controlling Night Color Comment[ca]=Plasmoide per controlar el Color de nit Comment[es]=Plasmoide para controlar el color nocturno Comment[et]=Öise värvi juhtimise plasmoid Comment[it]=Plasmoide per il controllo del colore notturno Comment[lt]=Plasma įskiepis, skirtas valdyti naktinę spalvą Comment[nl]=Plasmoid voor besturing van nachtkleur Comment[pt]=Plasmóide para controlar a Cor Nocturna Comment[pt_BR]=Plasmoide para controlar a cor noturna Comment[ru]=Виджет для управления ночной цветовой схемой Comment[sk]=Plasmoid na ovládanie Nočnej farby Comment[sv]=Plasmoid för att kontrollera nattfärg Comment[uk]=Плазмоїд для керування нічними кольорами Comment[x-test]=xxPlasmoid for controlling Night Colorxx Comment[zh_TW]=控制夜色的 Plasmoid Icon=preferences-desktop-display-nightcolor Type=Service X-KDE-ServiceTypes=Plasma/Applet X-KDE-PluginInfo-Author=Vlad Zahorodnii X-KDE-PluginInfo-Category=Graphics X-KDE-PluginInfo-Depends= -X-KDE-PluginInfo-Email=vladzzag@gmail.com +X-KDE-PluginInfo-Email=vlad.zahorodnii@kde.org X-KDE-PluginInfo-EnabledByDefault=true X-KDE-PluginInfo-License=GPL-2.0+ X-KDE-PluginInfo-Name=org.kde.plasma.nightcolorcontrol X-KDE-PluginInfo-Version=1.0 X-KDE-PluginInfo-Website=plasma.kde.org X-Plasma-API=declarativeappletscript X-Plasma-MainScript=ui/main.qml X-Plasma-NotificationArea=true X-Plasma-NotificationAreaCategory=SystemServices diff --git a/applets/nightcolor/plugin/inhibitor.cpp b/applets/nightcolor/plugin/inhibitor.cpp index 1e5376fc6..59ed8bc5a 100644 --- a/applets/nightcolor/plugin/inhibitor.cpp +++ b/applets/nightcolor/plugin/inhibitor.cpp @@ -1,141 +1,141 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "inhibitor.h" #include #include #include #include #include Q_LOGGING_CATEGORY(NIGHTCOLOR_CONTROL, "org.kde.plasma.nightcolorcontrol") static const QString s_serviceName = QStringLiteral("org.kde.KWin"); static const QString s_path = QStringLiteral("/ColorCorrect"); static const QString s_interface = QStringLiteral("org.kde.kwin.ColorCorrect"); class Inhibitor::Private { public: uint cookie = 0; State state = Uninhibited; bool pendingUninhibit = false; }; Inhibitor::Inhibitor(QObject *parent) : QObject(parent) , d(new Private) { } Inhibitor::~Inhibitor() { uninhibit(); } Inhibitor::State Inhibitor::state() const { return d->state; } void Inhibitor::inhibit() { if (d->state == Inhibited) { return; } d->pendingUninhibit = false; if (d->state == Inhibiting) { return; } QDBusMessage message = QDBusMessage::createMethodCall(s_serviceName, s_path, s_interface, QStringLiteral("inhibit")); QDBusPendingReply cookie = QDBusConnection::sessionBus().asyncCall(message); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(cookie, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *self) { const bool wasPendingUninhibit = d->pendingUninhibit; d->pendingUninhibit = false; const QDBusPendingReply reply = *self; self->deleteLater(); if (reply.isError()) { qCWarning(NIGHTCOLOR_CONTROL()) << "Could not inhibit Night Color:" << reply.error().message(); d->state = Uninhibited; emit stateChanged(); return; } d->cookie = reply.value(); d->state = Inhibited; emit stateChanged(); if (wasPendingUninhibit) { uninhibit(); } }); d->state = Inhibiting; emit stateChanged(); } void Inhibitor::uninhibit() { if (d->state == Uninhibiting || d->state == Uninhibited) { return; } if (d->state == Inhibiting) { d->pendingUninhibit = true; return; } QDBusMessage message = QDBusMessage::createMethodCall(s_serviceName, s_path, s_interface, QStringLiteral("uninhibit")); message.setArguments({ d->cookie }); QDBusPendingReply reply = QDBusConnection::sessionBus().asyncCall(message); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(reply, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *self) { self->deleteLater(); if (d->state != Uninhibiting) { return; } const QDBusPendingReply reply = *self; if (reply.isError()) { qCWarning(NIGHTCOLOR_CONTROL) << "Could not uninhibit Night Color:" << reply.error().message(); } d->state = Uninhibited; emit stateChanged(); }); d->state = Uninhibiting; emit stateChanged(); } diff --git a/applets/nightcolor/plugin/inhibitor.h b/applets/nightcolor/plugin/inhibitor.h index dd477a413..1f06e3b79 100644 --- a/applets/nightcolor/plugin/inhibitor.h +++ b/applets/nightcolor/plugin/inhibitor.h @@ -1,85 +1,85 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include /** * The Inhibitor class provides a convenient way to temporarily disable Night Color. */ class Inhibitor : public QObject { Q_OBJECT /** * This property holds a value to indicate the current state of the inhibitor. */ Q_PROPERTY(State state READ state NOTIFY stateChanged) public: explicit Inhibitor(QObject *parent = nullptr); ~Inhibitor() override; /** * This enum type is used to specify the state of the inhibitor. */ enum State { Inhibiting, ///< Night Color is being inhibited. Inhibited, ///< Night Color is inhibited. Uninhibiting, ///< Night Color is being uninhibited. Uninhibited, ///< Night Color is uninhibited. }; Q_ENUM(State) /** * Returns the current state of the inhibitor. */ State state() const; public Q_SLOTS: /** * Attempts to temporarily disable Night Color. * * After calling this method, the inhibitor will enter the Inhibiting state. * Eventually, the inhibitor will enter the Inhibited state when the inhibition * request has been processed successfully by the Night Color manager. * * This method does nothing if the inhibitor is in the Inhibited state. */ void inhibit(); /** * Attempts to undo the previous call to inhibit() method. * * After calling this method, the inhibitor will enter the Uninhibiting state. * Eventually, the inhibitor will enter the Uninhibited state when the uninhibition * request has been processed by the Night Color manager. * * This method does nothing if the inhibitor is in the Uninhibited state. */ void uninhibit(); Q_SIGNALS: /** * Emitted whenever the state of the inhibitor has changed. */ void stateChanged(); private: class Private; QScopedPointer d; }; diff --git a/applets/nightcolor/plugin/monitor.cpp b/applets/nightcolor/plugin/monitor.cpp index 2eb601379..cac7b5375 100644 --- a/applets/nightcolor/plugin/monitor.cpp +++ b/applets/nightcolor/plugin/monitor.cpp @@ -1,238 +1,238 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "monitor.h" #include "monitor_p.h" #include #include #include #include #include static const QString s_serviceName = QStringLiteral("org.kde.KWin"); static const QString s_nightColorPath = QStringLiteral("/ColorCorrect"); static const QString s_nightColorInterface = QStringLiteral("org.kde.kwin.ColorCorrect"); static const QString s_propertiesInterface = QStringLiteral("org.freedesktop.DBus.Properties"); MonitorPrivate::MonitorPrivate(QObject *parent) : QObject(parent) { QDBusServiceWatcher *watcher = new QDBusServiceWatcher(s_serviceName, QDBusConnection::sessionBus(), QDBusServiceWatcher::WatchForOwnerChange, this); connect(watcher, &QDBusServiceWatcher::serviceRegistered, this, &MonitorPrivate::handleServiceRegistered); connect(watcher, &QDBusServiceWatcher::serviceUnregistered, this, &MonitorPrivate::handleServiceUnregistered); handleServiceRegistered(); } MonitorPrivate::~MonitorPrivate() { } void MonitorPrivate::handleServiceRegistered() { QDBusConnection bus = QDBusConnection::sessionBus(); const bool connected = bus.connect(s_serviceName, s_nightColorPath, s_propertiesInterface, QStringLiteral("PropertiesChanged"), this, SLOT(handlePropertiesChanged(QString,QVariantMap,QStringList))); if (!connected) { return; } QDBusMessage message = QDBusMessage::createMethodCall(s_serviceName, s_nightColorPath, s_propertiesInterface, QStringLiteral("GetAll")); message.setArguments({ s_nightColorInterface }); QDBusPendingReply properties = bus.asyncCall(message); QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(properties, this); connect(watcher, &QDBusPendingCallWatcher::finished, this, [this](QDBusPendingCallWatcher *self) { self->deleteLater(); const QDBusPendingReply properties = *self; if (properties.isError()) { return; } updateProperties(properties.value()); }); } void MonitorPrivate::handleServiceUnregistered() { QDBusConnection bus = QDBusConnection::sessionBus(); bus.disconnect(s_serviceName, s_nightColorPath, s_propertiesInterface, QStringLiteral("PropertiesChanged"), this, SLOT(handlePropertiesChanged(QString,QVariantMap,QStringList))); setAvailable(false); } void MonitorPrivate::handlePropertiesChanged(const QString &interfaceName, const QVariantMap &changedProperties, const QStringList &invalidatedProperties) { Q_UNUSED(interfaceName) Q_UNUSED(invalidatedProperties) updateProperties(changedProperties); } int MonitorPrivate::currentTemperature() const { return m_currentTemperature; } int MonitorPrivate::targetTemperature() const { return m_targetTemperature; } void MonitorPrivate::updateProperties(const QVariantMap &properties) { const QVariant available = properties.value(QStringLiteral("available")); if (available.isValid()) { setAvailable(available.toBool()); } const QVariant enabled = properties.value(QStringLiteral("enabled")); if (enabled.isValid()) { setEnabled(enabled.toBool()); } const QVariant running = properties.value(QStringLiteral("running")); if (running.isValid()) { setRunning(running.toBool()); } const QVariant currentTemperature = properties.value(QStringLiteral("currentTemperature")); if (currentTemperature.isValid()) { setCurrentTemperature(currentTemperature.toInt()); } const QVariant targetTemperature = properties.value(QStringLiteral("targetTemperature")); if (targetTemperature.isValid()) { setTargetTemperature(targetTemperature.toInt()); } } void MonitorPrivate::setCurrentTemperature(int temperature) { if (m_currentTemperature == temperature) { return; } m_currentTemperature = temperature; emit currentTemperatureChanged(); } void MonitorPrivate::setTargetTemperature(int temperature) { if (m_targetTemperature == temperature) { return; } m_targetTemperature = temperature; emit targetTemperatureChanged(); } bool MonitorPrivate::isAvailable() const { return m_isAvailable; } void MonitorPrivate::setAvailable(bool available) { if (m_isAvailable == available) { return; } m_isAvailable = available; emit availableChanged(); } bool MonitorPrivate::isEnabled() const { return m_isEnabled; } void MonitorPrivate::setEnabled(bool enabled) { if (m_isEnabled == enabled) { return; } m_isEnabled = enabled; emit enabledChanged(); } bool MonitorPrivate::isRunning() const { return m_isRunning; } void MonitorPrivate::setRunning(bool running) { if (m_isRunning == running) { return; } m_isRunning = running; emit runningChanged(); } Monitor::Monitor(QObject *parent) : QObject(parent) , d(new MonitorPrivate(this)) { connect(d, &MonitorPrivate::availableChanged, this, &Monitor::availableChanged); connect(d, &MonitorPrivate::enabledChanged, this, &Monitor::enabledChanged); connect(d, &MonitorPrivate::runningChanged, this, &Monitor::runningChanged); connect(d, &MonitorPrivate::currentTemperatureChanged, this, &Monitor::currentTemperatureChanged); connect(d, &MonitorPrivate::targetTemperatureChanged, this, &Monitor::targetTemperatureChanged); } Monitor::~Monitor() { } bool Monitor::isAvailable() const { return d->isAvailable(); } bool Monitor::isEnabled() const { return d->isEnabled(); } bool Monitor::isRunning() const { return d->isRunning(); } int Monitor::currentTemperature() const { return d->currentTemperature(); } int Monitor::targetTemperature() const { return d->targetTemperature(); } diff --git a/applets/nightcolor/plugin/monitor.h b/applets/nightcolor/plugin/monitor.h index 0fc8f3024..02d1da04a 100644 --- a/applets/nightcolor/plugin/monitor.h +++ b/applets/nightcolor/plugin/monitor.h @@ -1,113 +1,113 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include class MonitorPrivate; /** * The Monitor provides a way for monitoring the state of Night Color. */ class Monitor : public QObject { Q_OBJECT /** * This property holds a value to indicate if Night Color is available. */ Q_PROPERTY(bool available READ isAvailable NOTIFY availableChanged) /** * This property holds a value to indicate if Night Color is enabled. */ Q_PROPERTY(bool enabled READ isEnabled NOTIFY enabledChanged) /** * This property holds a value to indicate if Night Color is running. */ Q_PROPERTY(bool running READ isRunning NOTIFY runningChanged) /** * This property holds a value to indicate currently applied color temperature. */ Q_PROPERTY(int currentTemperature READ currentTemperature NOTIFY currentTemperatureChanged) /** * This property holds a value to indicate currently applied color temperature. */ Q_PROPERTY(int targetTemperature READ targetTemperature NOTIFY targetTemperatureChanged) public: explicit Monitor(QObject *parent = nullptr); ~Monitor() override; /** * Returns @c true if Night Color is available; otherwise @c false. */ bool isAvailable() const; /** * Returns @c true if Night Color is enabled; otherwise @c false. */ bool isEnabled() const; /** * Returns @c true if Night Color is running; otherwise @c false. */ bool isRunning() const; /** * Returns currently applied screen color temperature. */ int currentTemperature() const; /** * Returns currently applied screen color temperature. */ int targetTemperature() const; Q_SIGNALS: /** * This signal is emitted when Night Color becomes (un)available. */ void availableChanged(); /** * Emitted whenever Night Color is enabled or disabled. */ void enabledChanged(); /** * Emitted whenever Night Color starts or stops running. */ void runningChanged(); /** * Emitted whenever the current screen color temperature has changed. */ void currentTemperatureChanged(); /** * Emitted whenever the current screen color temperature has changed. */ void targetTemperatureChanged(); private: MonitorPrivate *d; }; diff --git a/applets/nightcolor/plugin/monitor_p.h b/applets/nightcolor/plugin/monitor_p.h index 452969880..5a7139210 100644 --- a/applets/nightcolor/plugin/monitor_p.h +++ b/applets/nightcolor/plugin/monitor_p.h @@ -1,63 +1,63 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include class MonitorPrivate : public QObject { Q_OBJECT public: explicit MonitorPrivate(QObject *parent = nullptr); ~MonitorPrivate() override; int currentTemperature() const; int targetTemperature() const; bool isAvailable() const; bool isEnabled() const; bool isRunning() const; Q_SIGNALS: void currentTemperatureChanged(); void targetTemperatureChanged(); void availableChanged(); void enabledChanged(); void runningChanged(); private Q_SLOTS: void handleServiceRegistered(); void handleServiceUnregistered(); void handlePropertiesChanged(const QString &interfaceName, const QVariantMap &changedProperties, const QStringList &invalidatedProperties); private: void updateProperties(const QVariantMap &properties); void setCurrentTemperature(int temperature); void setTargetTemperature(int temperature); void setAvailable(bool available); void setEnabled(bool enabled); void setRunning(bool running); int m_currentTemperature = 0; int m_targetTemperature = 0; bool m_isAvailable = false; bool m_isEnabled = false; bool m_isRunning = false; }; diff --git a/applets/nightcolor/plugin/plugin.cpp b/applets/nightcolor/plugin/plugin.cpp index 0fceae7ae..225ec47ec 100644 --- a/applets/nightcolor/plugin/plugin.cpp +++ b/applets/nightcolor/plugin/plugin.cpp @@ -1,29 +1,29 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #include "plugin.h" #include "inhibitor.h" #include "monitor.h" #include void NightColorControlPlugin::registerTypes(const char *uri) { Q_ASSERT(QLatin1String(uri) == QLatin1String("org.kde.plasma.private.nightcolorcontrol")); qmlRegisterType(uri, 1, 0, "Inhibitor"); qmlRegisterType(uri, 1, 0, "Monitor"); } diff --git a/applets/nightcolor/plugin/plugin.h b/applets/nightcolor/plugin/plugin.h index a4d03e043..112796249 100644 --- a/applets/nightcolor/plugin/plugin.h +++ b/applets/nightcolor/plugin/plugin.h @@ -1,29 +1,29 @@ /* - * Copyright 2019 Vlad Zahorodnii + * Copyright 2019 Vlad Zahorodnii * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #pragma once #include class NightColorControlPlugin : public QQmlExtensionPlugin { Q_OBJECT Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QQmlExtensionInterface") public: void registerTypes(const char *uri) override; };