KDecoration2

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 <kdecoration2/kdecoration2_export.h>
13
14class KPluginMetaData;
15class DecorationThemeMetaDataPrivate;
16
17namespace KDecoration2
18{
19/**
20 * Class providing type-safe access to data of themes
21 *
22 * @since 5.23
23 * @author Alexander Lohnau
24 */
25class KDECORATIONS2_EXPORT DecorationThemeMetaData
26{
27public:
28 explicit DecorationThemeMetaData();
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
42 QString configurationName() const;
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
47 KDecoration2::BorderSize borderSize() const;
48 void setBorderSize(KDecoration2::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 KDECORATIONS2_EXPORT DecorationThemeProvider : public QObject
65{
66 Q_OBJECT
67
68public:
69 explicit DecorationThemeProvider(QObject *parent);
70
71 /**
72 * List containing information of supported themes
73 */
75};
76}
Class providing type-safe access to data of themes.
Class to give the KWin decorationmodel access to the plugin's themes.
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.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:14:18 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.