GrantleeTheme

colorscheme.cpp
1/*
2 * SPDX-FileCopyrightText: 2019 Volker Krause <vkrause@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-or-later
5 */
6
7#include "colorscheme.h"
8#include <KTextTemplate/MetaType>
9#include <QObject>
10
11#include <KColorScheme>
12
13#define PROP_IMPL(PROP, METHOD) \
14 if (QString::compare(property, QLatin1StringView(#PROP), Qt::CaseInsensitive) == 0) { \
15 return object.METHOD(KColorScheme::PROP).color(); \
16 }
17#define BACKGROUND_PROP(PROP) PROP_IMPL(PROP, background)
18#define FOREGROUND_PROP(PROP) PROP_IMPL(PROP, foreground)
19#define DECORATION_PROP(PROP) PROP_IMPL(PROP, decoration)
21BACKGROUND_PROP(NormalBackground)
22BACKGROUND_PROP(AlternateBackground)
23BACKGROUND_PROP(ActiveBackground)
24BACKGROUND_PROP(LinkBackground)
25BACKGROUND_PROP(VisitedBackground)
26BACKGROUND_PROP(NegativeBackground)
27BACKGROUND_PROP(NeutralBackground)
28BACKGROUND_PROP(PositiveBackground)
29
30FOREGROUND_PROP(NormalText)
31FOREGROUND_PROP(InactiveText)
32FOREGROUND_PROP(ActiveText)
33FOREGROUND_PROP(LinkText)
34FOREGROUND_PROP(VisitedText)
35FOREGROUND_PROP(NegativeText)
36FOREGROUND_PROP(NeutralText)
37FOREGROUND_PROP(PositiveText)
38
39DECORATION_PROP(FocusColor)
40DECORATION_PROP(HoverColor)
41
42return {};
44
45void ColorScheme::registerMetaType()
46{
48}
#define KTEXTTEMPLATE_END_LOOKUP
#define KTEXTTEMPLATE_BEGIN_LOOKUP(Type)
int registerMetaType()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:07:43 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.