KDecoration2

decorationsettingsprivate.cpp
1 /*
2  * SPDX-FileCopyrightText: 2014 Martin Gräßlin <[email protected]>
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 
9 namespace KDecoration2
10 {
11 class Q_DECL_HIDDEN DecorationSettingsPrivate::Private
12 {
13 public:
14  explicit Private(DecorationSettings *settings);
15  DecorationSettings *settings;
16  int gridUnit = -1;
17  int smallSpacing = -1;
18  int largeSpacing = -1;
19 };
20 
21 DecorationSettingsPrivate::Private::Private(DecorationSettings *settings)
22  : settings(settings)
23 {
24 }
25 
26 DecorationSettingsPrivate::DecorationSettingsPrivate(DecorationSettings *parent)
27  : d(new Private(parent))
28 {
29 }
30 
31 DecorationSettingsPrivate::~DecorationSettingsPrivate()
32 {
33 }
34 
35 DecorationSettings *DecorationSettingsPrivate::decorationSettings()
36 {
37  return d->settings;
38 }
39 
40 const DecorationSettings *DecorationSettingsPrivate::decorationSettings() const
41 {
42  return d->settings;
43 }
44 
45 QFont DecorationSettingsPrivate::font() const
46 {
48 }
49 
50 QFontMetricsF DecorationSettingsPrivate::fontMetrics() const
51 {
52  return QFontMetricsF(font());
53 }
54 
55 int DecorationSettingsPrivate::gridUnit() const
56 {
57  return d->gridUnit;
58 }
59 
60 int DecorationSettingsPrivate::smallSpacing() const
61 {
62  return d->smallSpacing;
63 }
64 
65 int DecorationSettingsPrivate::largeSpacing() const
66 {
67  return d->largeSpacing;
68 }
69 
70 void DecorationSettingsPrivate::setGridUnit(int unit)
71 {
72  d->gridUnit = unit;
73 }
74 
75 void DecorationSettingsPrivate::setLargeSpacing(int spacing)
76 {
77  d->largeSpacing = spacing;
78 }
79 
80 void DecorationSettingsPrivate::setSmallSpacing(int spacing)
81 {
82  d->smallSpacing = spacing;
83 }
84 
85 }
Framework for creating window decorations.
QFont systemFont(QFontDatabase::SystemFont type)
QFont font
The recommended font for the Decoration&#39;s caption.
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sun Jun 20 2021 23:07:39 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.