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

DSwitchLineExpand 类提供了一种通过开关按钮来展开/合上显示内容的控件. 更多...

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

Public 成员函数

 DSwitchLineExpand (QWidget *parent=0)
 DSwitchLineExpand 类的构造函数. 更多...
 
void setTitle (const QString &title)
 DSwitchLineExpand::setTitle 用于设置控件的标题。 title 为所要设置的标题。
 
void setExpand (bool value)
 DSwitchLineExpand::setExpand 用于控制控件是否展开。 value 为所要设置的展开状态,true 为展开,false 为合上。 更多...
 
DBaseLineheader ()
 DSwitchLineExpand::header 用来获取标题栏控件。 更多...
 
- 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
 

详细描述

DSwitchLineExpand 类提供了一种通过开关按钮来展开/合上显示内容的控件.

\inmodule dtkwidget

控件由标题栏和内容两部分组成,标题栏左侧显示控件标题,右侧显示一个开关控件, 用户通过点击右侧的开关控件,来控制标题栏下面的内容部分展开还是合上。

构造及析构函数说明

◆ DSwitchLineExpand()

Dtk::Widget::DSwitchLineExpand::DSwitchLineExpand ( QWidget *  parent = 0)
explicit

DSwitchLineExpand 类的构造函数.

parent 指定了控件的父控件。

成员函数说明

◆ header()

DBaseLine * Dtk::Widget::DSwitchLineExpand::header ( )

DSwitchLineExpand::header 用来获取标题栏控件。

返回
标题栏控件。

◆ setExpand()

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

DSwitchLineExpand::setExpand 用于控制控件是否展开。 value 为所要设置的展开状态,true 为展开,false 为合上。

注解
这个函数同时会影响标题栏中开关按钮的状态。

重载 Dtk::Widget::DBaseExpand .


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