DtkWidget 5.6.0.2
DTK Widget module
Public 成员函数 | 所有成员列表
Dtk::Widget::DArrowLineExpand类 参考

一个美观的可展开的控件. 更多...

类 Dtk::Widget::DArrowLineExpand 继承关系图:
Inheritance graph
[图例]
Dtk::Widget::DArrowLineExpand 的协作图:
Collaboration graph
[图例]

Public 成员函数

 DArrowLineExpand (QWidget *parent=nullptr)
 构造一个 DArrowLineExpand 实例 更多...
 
void setTitle (const QString &title)
 设置标题要显示的文字 更多...
 
void setExpand (bool value)
 设置是否展开以显示内容控件 更多...
 
DBaseLineheaderLine ()
 获取标题控件 更多...
 
- Public 成员函数 继承自 Dtk::Widget::DBaseExpand
 DBaseExpand (QWidget *parent=nullptr)
 获取 DBaseExpand::DBaseExpand 实例 parent 作为实例的父控件
 
void setHeader (QWidget *header)
 设置标题控件 标题控件会始终显示在布局里 header 标题控件
 
void setContent (QWidget *content, Qt::Alignment alignment=Qt::AlignHCenter)
 设置内容控件 内容控件默认是隐藏的,调用 DBaseExpand::setExpand 设置其可见性 content 内容控件 alignment 内容控件在布局中的对齐方式
 
QWidget * getContent () const
 获取内容控件对象 更多...
 
void setHeaderHeight (int height)
 设置标题控件的高度 更多...
 
virtual void setExpand (bool value)
 设置内容控件的可见性 更多...
 
bool expand () const
 获取当前内容控件的可见性 更多...
 
void setAnimationDuration (int duration)
 设置内容控件的可见性改变时动画的时间 更多...
 
void setAnimationEasingCurve (QEasingCurve curve)
 设置内容控件的可见性改变时动画的样式 更多...
 
void setSeparatorVisible (bool arg)
 设置是否允许标题控件与内容控件之间的分割线 更多...
 
void setExpandedSeparatorVisible (bool arg)
 设置是否允许内容控件下的分割线 更多...
 

额外继承的成员函数

- 信号 继承自 Dtk::Widget::DBaseExpand
void expandChange (bool e)
 内容控件可见性发生改变的信号 e 为 true 表示内容控件变为了可见,反之则反
 
void sizeChanged (QSize s)
 
- Protected 成员函数 继承自 Dtk::Widget::DBaseExpand
void resizeEvent (QResizeEvent *e) Q_DECL_OVERRIDE
 

详细描述

一个美观的可展开的控件.

\inmodule dtkwidget

DArrowLineExpand 继承自 DBaseExpand 并提供了了 ArrowHeaderLine (一个带有箭头标示的按钮)作为其固定的标题控件,也就是说跟 DBaseExpand 相比省去了提供标题控件的步骤,只需要提供内容控件即可,如果需要自定义标题控件应该使用 DBaseExpand 类。

参见
DBaseExpand

构造及析构函数说明

◆ DArrowLineExpand()

Dtk::Widget::DArrowLineExpand::DArrowLineExpand ( QWidget *  parent = nullptr)
explicit

构造一个 DArrowLineExpand 实例

parent 为实例的父控件

成员函数说明

◆ headerLine()

DBaseLine * Dtk::Widget::DArrowLineExpand::headerLine ( )

获取标题控件

返回
标题控件
参见
DHeaderLine DBaseLine

◆ setExpand()

void Dtk::Widget::DArrowLineExpand::setExpand ( bool  value)
virtual

设置是否展开以显示内容控件

value 为 true 即为显示,反之则反

重载 Dtk::Widget::DBaseExpand .

◆ setTitle()

void Dtk::Widget::DArrowLineExpand::setTitle ( const QString title)

设置标题要显示的文字

title 标题内容


该类的文档由以下文件生成: