File indexing completed on 2024-04-21 15:41:00

0001 /*
0002    SPDX-FileCopyrightText: 2022 Nicolas Fella <nicolas.fella@gmx.de>
0003 
0004    SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #pragma once
0008 
0009 #include <QObject>
0010 
0011 #include <KColorScheme>
0012 
0013 #include "libruqolacore_export.h"
0014 
0015 class LIBRUQOLACORE_EXPORT ColorsAndMessageViewStyle : public QObject
0016 {
0017     Q_OBJECT
0018 public:
0019     static ColorsAndMessageViewStyle &self();
0020 
0021     ColorsAndMessageViewStyle();
0022 
0023     [[nodiscard]] KColorScheme schemeView() const;
0024 
0025     [[nodiscard]] KColorScheme schemeWindow() const;
0026 
0027 Q_SIGNALS:
0028     void needToUpdateColors();
0029     void needUpdateMessageStyle();
0030 
0031 protected:
0032     bool event(QEvent *e) override;
0033 
0034 private:
0035     LIBRUQOLACORE_NO_EXPORT void regenerateColorScheme();
0036     KColorScheme mSchemeView;
0037     KColorScheme mSchemeWindow;
0038 };