]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/selectionmode/backgroundcolorhelper.h
Rewrite search integration
[dolphin.git] / src / selectionmode / backgroundcolorhelper.h
index 251c5eddf53e2eca396477263ace318de21893a3..f274593b8b75d3a007730370056e43c01c5288da 100644 (file)
@@ -1,6 +1,6 @@
 /*
     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
 */
@@ -9,6 +9,7 @@
 #define BACKGROUNDCOLORHELPER_H
 
 #include <QColor>
+#include <QObject>
 #include <QPointer>
 
 #include <memory>
@@ -21,8 +22,9 @@ namespace SelectionMode
 /**
  * @brief A Singleton class for managing the colors of selection mode widgets.
  */
-class BackgroundColorHelper
+class BackgroundColorHelper : public QObject
 {
+    Q_OBJECT
 public:
     static BackgroundColorHelper *instance();
 
@@ -32,6 +34,9 @@ public:
      */
     void controlBackgroundColor(QWidget *widget);
 
+protected:
+    bool eventFilter(QObject *obj, QEvent *event) override;
+
 private:
     BackgroundColorHelper();
 
@@ -42,7 +47,7 @@ private:
      */
     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: