File indexing completed on 2025-02-09 06:41:28

0001 /*
0002     SPDX-FileCopyrightText: 2011 Aaron Seigo <aseigo@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #ifndef PLASMA_DIALOGSHADOWS_H
0008 #define PLASMA_DIALOGSHADOWS_H
0009 
0010 #include <QSet>
0011 
0012 #include <KSvg/FrameSvg>
0013 #include <KSvg/Svg>
0014 
0015 class DialogShadows : public KSvg::Svg
0016 {
0017     Q_OBJECT
0018 
0019 public:
0020     static DialogShadows *instance(const QString &prefix = QLatin1String("dialogs/background"));
0021 
0022     explicit DialogShadows(QObject *parent, const QString &prefix);
0023     ~DialogShadows() override;
0024 
0025     void addWindow(QWindow *window, KSvg::FrameSvg::EnabledBorders enabledBorders = KSvg::FrameSvg::AllBorders);
0026     void removeWindow(QWindow *window);
0027 
0028     void setEnabledBorders(QWindow *window, KSvg::FrameSvg::EnabledBorders enabledBorders = KSvg::FrameSvg::AllBorders);
0029 
0030     bool enabled() const;
0031 
0032 private:
0033     class Private;
0034     Private *const d;
0035 
0036     Q_PRIVATE_SLOT(d, void updateShadows())
0037     Q_PRIVATE_SLOT(d, void windowDestroyed(QObject *deletedObject))
0038 };
0039 
0040 #endif