File indexing completed on 2024-05-12 05:29:30

0001 /*
0002  * SPDX-FileCopyrightText: 2014 Martin Gräßlin <mgraesslin@kde.org>
0003  *
0004  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005  */
0006 #pragma once
0007 
0008 #include "../decorationdefines.h"
0009 #include <QFont>
0010 #include <QFontMetricsF>
0011 #include <QList>
0012 #include <kdecoration2/private/kdecoration2_private_export.h>
0013 #include <memory>
0014 
0015 //
0016 //  W A R N I N G
0017 //  -------------
0018 //
0019 // This file is not part of the KDecoration2 API.  It exists purely as an
0020 // implementation detail.  This header file may change from version to
0021 // version without notice, or even be removed.
0022 //
0023 // We mean it.
0024 //
0025 
0026 namespace KDecoration2
0027 {
0028 class DecorationSettings;
0029 
0030 class KDECORATIONS_PRIVATE_EXPORT DecorationSettingsPrivate
0031 {
0032 public:
0033     virtual ~DecorationSettingsPrivate();
0034     virtual bool isOnAllDesktopsAvailable() const = 0;
0035     virtual bool isAlphaChannelSupported() const = 0;
0036     virtual bool isCloseOnDoubleClickOnMenu() const = 0;
0037     virtual QList<DecorationButtonType> decorationButtonsLeft() const = 0;
0038     virtual QList<DecorationButtonType> decorationButtonsRight() const = 0;
0039     virtual BorderSize borderSize() const = 0;
0040     virtual QFont font() const;
0041     virtual QFontMetricsF fontMetrics() const;
0042 
0043     DecorationSettings *decorationSettings();
0044     const DecorationSettings *decorationSettings() const;
0045 
0046     int gridUnit() const;
0047     int smallSpacing() const;
0048     int largeSpacing() const;
0049     void setGridUnit(int unit);
0050     void setLargeSpacing(int spacing);
0051     void setSmallSpacing(int spacing);
0052 
0053 protected:
0054     explicit DecorationSettingsPrivate(DecorationSettings *parent);
0055 
0056 private:
0057     class Private;
0058     const std::unique_ptr<Private> d;
0059 };
0060 }