DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
ddrawer.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2019 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DDRAWER_H
6#define DDRAWER_H
7
8#include <DFrame>
9
10DWIDGET_BEGIN_NAMESPACE
11class DDrawerPrivate;
12class LIBDTKWIDGETSHARED_EXPORT DDrawer : public DFrame
13{
14 Q_OBJECT
15 D_DECLARE_PRIVATE(DDrawer)
16
17public:
18 explicit DDrawer(QWidget *parent = nullptr);
19 ~DDrawer() override;
20
21 void setHeader(QWidget *header);
22 void setContent(QWidget *content, Qt::Alignment alignment = Qt::AlignHCenter);
23 QWidget *getContent() const;
24 void setHeaderHeight(int height);
25 virtual void setExpand(bool value);
26 bool expand() const;
27 void setAnimationDuration(int duration);
28 void setAnimationEasingCurve(QEasingCurve curve);
29 void setSeparatorVisible(bool arg);
30 void setExpandedSeparatorVisible(bool arg);
31
32Q_SIGNALS:
33 void expandChange(bool e);
34 void sizeChanged(QSize s);
35
36protected:
37 DDrawer(DDrawerPrivate &dd, QWidget *parent = nullptr);
38 void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
39};
40
41DWIDGET_END_NAMESPACE
42
43#endif // DDRAWER_H
Definition ddrawer_p.h:22
A beautifully developed control.
Definition ddrawer.h:13
void expandChange(bool e)
Content control visibility signal e For TRUE, the content control becomes visible,...
继承自QFrame类, 支持设置边框圆角,背景画刷功能
Definition dframe.h:18