]>
cloud.milkyroute.net Git - dolphin.git/blob - src/selectionmode/backgroundcolorhelper.h
2 This file is part of the KDE project
3 SPDX-FileCopyrightText: 2022 Felix Ernst <felixernst@zohomail.eu>
5 SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
8 #ifndef BACKGROUNDCOLORHELPER_H
9 #define BACKGROUNDCOLORHELPER_H
18 namespace SelectionMode
22 * @brief A Singleton class for managing the colors of selection mode widgets.
24 class BackgroundColorHelper
27 static BackgroundColorHelper
* instance ();
30 * Changes the background color of @p widget to a distinct color scheme matching color which makes it clear that the widget belongs to the selection mode.
32 void controlBackgroundColor ( QWidget
* widget
);
35 BackgroundColorHelper ();
37 void slotPaletteChanged ();
39 void updateBackgroundColor ();
42 std :: vector
< QPointer
< QWidget
>> m_colorControlledWidgets
;
43 QColor m_backgroundColor
;
45 static BackgroundColorHelper
* s_instance
;
50 #endif // BACKGROUNDCOLORHELPER_H