KGuiAddons

kcolorschemewatcher.h
1/*
2 * SPDX-FileCopyrightText: 2021 Nicolas Fella <nicolas.fella@gmx.de>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6
7#ifndef KCOLORSCHEMEWATCHER_H
8#define KCOLORSCHEMEWATCHER_H
9
10#include "kguiaddons_export.h"
11
12#include <QObject>
13
14#include <memory>
15
16class KColorSchemeWatcherPrivate;
17
18/**
19 * Information about system-wide color preferences.
20 * @since 5.100
21 */
22class KGUIADDONS_EXPORT KColorSchemeWatcher : public QObject
23{
24 Q_OBJECT
25public:
27 NoPreference = 0, /** No preference available */
28 PreferDark, /** The user prefers a dark color scheme */
29 PreferLight, /** The user prefers a light color scheme */
30 };
31 Q_ENUM(ColorPreference)
32
33 KColorSchemeWatcher(QObject *parent = nullptr);
34 ~KColorSchemeWatcher() override;
35
36 /**
37 * The system-wide color preference.
38 */
39 ColorPreference systemPreference() const;
40
42 /**
43 * Emitted when systemPreference changes.
44 */
46
47private:
48 std::unique_ptr<KColorSchemeWatcherPrivate> const d;
49};
50
51#endif
Information about system-wide color preferences.
@ PreferLight
The user prefers a dark color scheme.
@ PreferDark
No preference available.
void systemPreferenceChanged()
Emitted when systemPreference changes.
Q_ENUM(...)
Q_SIGNALSQ_SIGNALS
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:48 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.