DtkWidget 5.6.0.2
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
18DWIDGET_BEGIN_NAMESPACE
19
20class D_DECL_DEPRECATED ContentLoader : public QFrame
21{
22 Q_OBJECT
23 Q_PROPERTY(int height READ height WRITE setFixedHeight)
24public:
25 explicit ContentLoader(QWidget *parent = nullptr) : QFrame(parent){}
26};
27
28class DBoxWidget;
29
31class LIBDTKWIDGETSHARED_EXPORT D_DECL_DEPRECATED_X("Use DDrawer") DBaseExpand : public QWidget
32{
33 Q_OBJECT
34public:
35 explicit DBaseExpand(QWidget *parent = nullptr);
36 ~DBaseExpand() override;
37
38 void setHeader(QWidget *header);
39 void setContent(QWidget *content, Qt::Alignment alignment = Qt::AlignHCenter);
40 QWidget *getContent() const;
41 void setHeaderHeight(int height);
42 virtual void setExpand(bool value);
43 bool expand() const;
44 void setAnimationDuration(int duration);
45 void setAnimationEasingCurve(QEasingCurve curve);
46 void setSeparatorVisible(bool arg);
47 void setExpandedSeparatorVisible(bool arg);
48
49Q_SIGNALS:
50 void expandChange(bool e);
51 void sizeChanged(QSize s);
52
53protected:
54 void resizeEvent(QResizeEvent *e) Q_DECL_OVERRIDE;
55
56private:
58
59 Q_DECLARE_PRIVATE_D(d_private, DBaseExpand)
60};
61
62DWIDGET_END_NAMESPACE
63
64#endif // DBASEEXPAND_H
Definition: dbaseexpand.h:21
Definition: dbaseexpand.cpp:14
一个美观的可展开的控件.
Definition: dbaseexpand.h:32
void expandChange(bool e)
内容控件可见性发生改变的信号 e 为 true 表示内容控件变为了可见,反之则反
The DBoxWidget class provides widget born with QBoxLayout set.
Definition: dboxwidget.h:19
一个美观的可展开的控件.
Definition: ddrawer.h:13
typedef Alignment