DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
darrowlineexpand.h
浏览该文件的文档.
1// SPDX-FileCopyrightText: 2015 - 2022 UnionTech Software Technology Co., Ltd.
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
5#ifndef DARROWLINEEXPAND_H
6#define DARROWLINEEXPAND_H
7
8#include <QWidget>
9
10#include <dtkwidget_global.h>
11#include <dbaseexpand.h>
12#include <DIconButton>
13#include <dbaseline.h>
14#include <dheaderline.h>
15
16#if DTK_VERSION < DTK_VERSION_CHECK(6, 0, 0, 0)
17
18DWIDGET_BEGIN_NAMESPACE
19
20class D_DECL_DEPRECATED ArrowHeaderLine : public DHeaderLine
21{
22 Q_OBJECT
23public:
24 ArrowHeaderLine(QWidget *parent = nullptr);
25 void setExpand(bool value);
26
27Q_SIGNALS:
28 void mousePress();
29
30protected:
31 void mousePressEvent(QMouseEvent *);
32 void mouseMoveEvent(QMouseEvent *);
33
34private:
35 void reverseArrowDirection();
36 bool m_isExpanded = false;
37 DIconButton *m_arrowButton = nullptr;
38};
39
40class LIBDTKWIDGETSHARED_EXPORT D_DECL_DEPRECATED_X("Use DArrowLineDrawer") DArrowLineExpand : public DBaseExpand
41{
42 Q_OBJECT
43public:
44 explicit DArrowLineExpand(QWidget *parent = nullptr);
45 void setTitle(const QString &title);
46 void setExpand(bool value);
47 DBaseLine *headerLine();
48
49private:
50 void setHeader(QWidget *header);
51 void resizeEvent(QResizeEvent *e);
52
53private:
54 ArrowHeaderLine *m_headerLine = nullptr;
55};
56
57DWIDGET_END_NAMESPACE
58
59#endif // DARROWLINEEXPAND_H
60
61#endif
一个美观的可展开的控件
一个美观的可展开的控件.