Debian Codegraph @

kysdk-qtwidgets/src/kshadowhelper.h

raw
1 /*
2 * libkysdk-qtwidgets's Library
3 *
4 * Copyright (C) 2023, KylinSoft Co., Ltd.
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 3 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this library. If not, see <https://www.gnu.org/licenses/>.
18 *
19 * Authors: Zhen Sun <[email protected]>
20 *
21 */
22
23 #ifndef KSHADOWHELPER_H
24 #define KSHADOWHELPER_H
25
26 #include "gui_g.h"
27 #include <QObject>
28 #include <QWidget>
29 namespace kdk
30 {
31 namespace effects
32 {
33
34 /**
35 * @since 2.0.2.1
36 */
37
38 class KShadowHelperPrivate;
39
40 class KShadowHelper : public QObject
41 {
42 Q_OBJECT
43 public:
44 static KShadowHelper *self();
45 void setWidget(QWidget *widget, int borderRadius = 12, int shadowWidth = 20, qreal darkness = 0.5);
46
47 private:
48 KShadowHelper(QObject *parent = nullptr);
49 Q_DECLARE_PRIVATE(KShadowHelper)
50 KShadowHelperPrivate *const d_ptr;
51 };
52 }
53 }
54 #endif // KSHADOWHELPER_H