bdfb946267
Night Color adjusts the color temperature based on the current time in your location. It's not a generic color correction module per se. We need a central component that can be used by both night color and colord integration to tweak gamma ramps and which will be able to resolve conflicts between the two. The Night Color manager cannot be such a thing because of its very specific usecase. This change converts Night Color into a plugin to prepare some space for such a component. The tricky part is that the dbus api of Night Color has "ColorCorrect" in its name. I'm afraid we cannot do that much about it without breaking API compatibility.
62 lines
1.5 KiB
C++
62 lines
1.5 KiB
C++
/*
|
|
SPDX-FileCopyrightText: 2019 Vlad Zahorodnii <vlad.zahorodnii@kde.org>
|
|
|
|
SPDX-License-Identifier: GPL-2.0-or-later
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
|
|
namespace KWin
|
|
{
|
|
|
|
/**
|
|
* The ClockSkewNotifier class provides a way for monitoring system clock changes.
|
|
*
|
|
* The ClockSkewNotifier class makes it possible to detect discontinuous changes to
|
|
* the system clock. Such changes are usually initiated by the user adjusting values
|
|
* in the Date and Time KCM or calls made to functions like settimeofday().
|
|
*/
|
|
class ClockSkewNotifier : public QObject
|
|
{
|
|
Q_OBJECT
|
|
Q_PROPERTY(bool active READ isActive WRITE setActive NOTIFY activeChanged)
|
|
|
|
public:
|
|
explicit ClockSkewNotifier(QObject *parent = nullptr);
|
|
~ClockSkewNotifier() override;
|
|
|
|
/**
|
|
* Returns @c true if the notifier is active; otherwise returns @c false.
|
|
*/
|
|
bool isActive() const;
|
|
|
|
/**
|
|
* Sets the active status of the clock skew notifier to @p active.
|
|
*
|
|
* clockSkewed() signal won't be emitted while the notifier is inactive.
|
|
*
|
|
* The notifier is inactive by default.
|
|
*
|
|
* @see activeChanged
|
|
*/
|
|
void setActive(bool active);
|
|
|
|
signals:
|
|
/**
|
|
* This signal is emitted whenever the active property is changed.
|
|
*/
|
|
void activeChanged();
|
|
|
|
/**
|
|
* This signal is emitted whenever the system clock is changed.
|
|
*/
|
|
void clockSkewed();
|
|
|
|
private:
|
|
class Private;
|
|
QScopedPointer<Private> d;
|
|
};
|
|
|
|
} // namespace KWin
|