/*
This file is part of the KDE project
- SPDX-FileCopyrightText: 2022 Felix Ernst <felixernst@zohomail.eu>
+ SPDX-FileCopyrightText: 2022 Felix Ernst <felixernst@kde.org>
SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
*/
#define BACKGROUNDCOLORHELPER_H
#include <QColor>
+#include <QObject>
#include <QPointer>
#include <memory>
/**
* @brief A Singleton class for managing the colors of selection mode widgets.
*/
-class BackgroundColorHelper
+class BackgroundColorHelper : public QObject
{
+ Q_OBJECT
public:
static BackgroundColorHelper *instance();
*/
void controlBackgroundColor(QWidget *widget);
+protected:
+ bool eventFilter(QObject *obj, QEvent *event) override;
+
private:
BackgroundColorHelper();
*/
void slotPaletteChanged();
- /** Calculates a new m_colorControlledWidgets based on the current colour scheme of the application. */
+ /** Calculates a new m_colorControlledWidgets based on the current color scheme of the application. */
void updateBackgroundColor();
private: