KDecoration3

decorationsettingsprivate.cpp
1/*
2 * SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
3 *
4 * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
5 */
6#include "decorationsettingsprivate.h"
7#include <QFontDatabase>
8
9namespace KDecoration3
10{
11class Q_DECL_HIDDEN DecorationSettingsPrivate::Private
12{
13public:
14 explicit Private(DecorationSettings *settings);
15 DecorationSettings *settings;
16 int gridUnit = -1;
17 int smallSpacing = -1;
18 int largeSpacing = -1;
19};
20
21DecorationSettingsPrivate::Private::Private(DecorationSettings *settings)
22 : settings(settings)
23{
24}
25
26DecorationSettingsPrivate::DecorationSettingsPrivate(DecorationSettings *parent)
27 : d(new Private(parent))
28{
29}
30
31DecorationSettingsPrivate::~DecorationSettingsPrivate()
32{
33}
34
35DecorationSettings *DecorationSettingsPrivate::decorationSettings()
36{
37 return d->settings;
38}
39
40const DecorationSettings *DecorationSettingsPrivate::decorationSettings() const
41{
42 return d->settings;
43}
44
45QFont DecorationSettingsPrivate::font() const
46{
48}
49
50QFontMetricsF DecorationSettingsPrivate::fontMetrics() const
51{
52 return QFontMetricsF(font());
53}
54
55int DecorationSettingsPrivate::gridUnit() const
56{
57 return d->gridUnit;
58}
59
60int DecorationSettingsPrivate::smallSpacing() const
61{
62 return d->smallSpacing;
63}
64
65int DecorationSettingsPrivate::largeSpacing() const
66{
67 return d->largeSpacing;
68}
69
70void DecorationSettingsPrivate::setGridUnit(int unit)
71{
72 d->gridUnit = unit;
73}
74
75void DecorationSettingsPrivate::setLargeSpacing(int spacing)
76{
77 d->largeSpacing = spacing;
78}
79
80void DecorationSettingsPrivate::setSmallSpacing(int spacing)
81{
82 d->smallSpacing = spacing;
83}
84
85}
Framework for creating window decorations.
QFont systemFont(SystemFont type)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:45 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.