DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
dbaseexpand.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DBASEEXPAND_H
6#define DBASEEXPAND_H
7
8#include <QLabel>
9#include <QWidget>
10#include <QVBoxLayout>
11#include <QPropertyAnimation>
12
13#include <DHorizontalLine>
14
15#include <dtkwidget_global.h>
16#include <dconstants.h>
17
18#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
19
20DWIDGET_BEGIN_NAMESPACE
21
22class D_DECL_DEPRECATED ContentLoader : public QFrame
23{
24 Q_OBJECT
25 Q_PROPERTY(int height READ height WRITE setFixedHeight)
26public:
27 explicit ContentLoader(QWidget *parent = nullptr) : QFrame(parent){}
28};
29
30class DBoxWidget;
31
32class DBaseExpandPrivate;
33class LIBDTKWIDGETSHARED_EXPORT D_DECL_DEPRECATED_X("Use DDrawer") DBaseExpand : public QWidget
34{
35 Q_OBJECT
36public:
37 explicit DBaseExpand(QWidget *parent = nullptr);
38 ~DBaseExpand() override;
39
40 void setHeader(QWidget *header);
41 void setContent(QWidget *content, Qt::Alignment alignment = Qt::AlignHCenter);
42 QWidget *getContent() const;
43 void setHeaderHeight(int height);
44 virtual void setExpand(bool value);
45 bool expand() const;
46 void setAnimationDuration(int duration);
47 void setAnimationEasingCurve(QEasingCurve curve);
48 void setSeparatorVisible(bool arg);
49 void setExpandedSeparatorVisible(bool arg);
50
51Q_SIGNALS:
52 void expandChange(bool e);
53 void sizeChanged(QSize s);
54
55protected:
56 void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
57
58private:
59 QScopedPointer<DBaseExpandPrivate> d_private;
60
61 Q_DECLARE_PRIVATE_D(d_private, DBaseExpand)
62};
63
64DWIDGET_END_NAMESPACE
65
66#endif // DBASEEXPAND_H
67
68#endif
一个美观的可展开的控件.