KDecoration3

decorationthemeprovider.h
1/*
2 * SPDX-FileCopyrightText: 2021 Alexander Lohnau <alexander.lohnau@gmx.de>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6
7#pragma once
8
9#include "decorationdefines.h"
10#include <QObject>
11#include <QSharedDataPointer>
12#include <kdecoration3/kdecoration3_export.h>
13
14class KPluginMetaData;
15class DecorationThemeMetaDataPrivate;
16
17namespace KDecoration3
18{
19/**
20 * Class providing type-safe access to data of themes
21 *
22 * @since 5.23
23 * @author Alexander Lohnau
24 */
25class KDECORATIONS3_EXPORT DecorationThemeMetaData
26{
27public:
28 explicit DecorationThemeMetaData();
29 virtual ~DecorationThemeMetaData();
30 DecorationThemeMetaData(const DecorationThemeMetaData &other);
31 DecorationThemeMetaData &operator=(const DecorationThemeMetaData &other);
32
33 /// User-visible name of the theme
34 QString visibleName() const;
35 void setVisibleName(const QString &name);
36
37 /// Internal name of the theme
38 QString themeName() const;
39 void setThemeName(const QString &name);
40
41 /// Name of the kcm to configure the decoration theme
43 void setConfigurationName(const QString &name);
44
45 /// Border size of the decoration, this gets set based on the "recommendedBorderSize" key in the json metadata
46 /// @internal
48 void setBorderSize(KDecoration3::BorderSize size);
49
50 /// plugin id of theme provider
51 /// @see KPluginMetaData::pluginId
52 QString pluginId() const;
53 void setPluginId(const QString &id);
54
55private:
57};
58/**
59 * Class to give the KWin decorationmodel access to the plugin's themes.
60 *
61 * @since 5.23
62 * @author Alexander Lohnau
63 */
64class KDECORATIONS3_EXPORT DecorationThemeProvider : public QObject
65{
67
68public:
69 explicit DecorationThemeProvider(QObject *parent);
70
71 /**
72 * List containing information of supported themes
73 */
75};
76}
QString themeName() const
Internal name of the theme.
KDecoration3::BorderSize borderSize() const
Border size of the decoration, this gets set based on the "recommendedBorderSize" key in the json met...
QString pluginId() const
plugin id of theme provider
QString visibleName() const
User-visible name of the theme.
QString configurationName() const
Name of the kcm to configure the decoration theme.
virtual QList< DecorationThemeMetaData > themes() const =0
List containing information of supported themes.
Framework for creating window decorations.
BorderSize
Border sizes are a combination of visual and accessibility features.
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:48 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.