DtkWidget
DTK Widget module
载入中...
搜索中...
未找到
Dtk::Widget::DDrawer类 参考

A beautifully developed control. 更多...

类 Dtk::Widget::DDrawer 继承关系图:
Dtk::Widget::DFrame Dtk::Widget::DArrowLineDrawer Dtk::Widget::DSwitchLineExpand

信号

void expandChange (bool e)
 Content control visibility signal e For TRUE, the content control becomes visible, but vice versa
 
void sizeChanged (QSize s)
 

Public 成员函数

 DDrawer (QWidget *parent=nullptr)
 Get DDRAWER :: DDRAWER example parent As the parent control part of the example
 
void setHeader (QWidget *header)
 Set the title control The title control will always be displayed in the layout header Title control
 
void setContent (QWidget *content, Qt::Alignment alignment=Qt::AlignHCenter)
 Set the content control Content control is hidden by default, call ddrawer :: setexpand settings for its visibility content Content controlent control alignment The alignment method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout
 
QWidget * getContent () const
 Get the content control object
 
void setHeaderHeight (int height)
 Set the height of the title control.
 
virtual void setExpand (bool value)
 Set the visibility of the content control.
 
bool expand () const
 Visible to obtain the current content control.
 
void setAnimationDuration (int duration)
 Set the time for the visibility of the content control when the animation time is changed.
 
void setAnimationEasingCurve (QEasingCurve curve)
 setTheVisibilityOfTheContentControlWhenTheAnimationStyleIsChangedOfTheContentControlWhenTheAnimationStyleIsChanged curve Specify animation style
 
void setSeparatorVisible (bool arg)
 Set the segmentation line between the title control and the content control.
 
void setExpandedSeparatorVisible (bool arg)
 Set the segmentation line under the content control.
 
- Public 成员函数 继承自 Dtk::Widget::DFrame
 DFrame (QWidget *parent=nullptr)
 用于其他需要边框的控件基类
 
void setFrameRounded (bool on)
 设置边框圆角是否开启
 
void setBackgroundRole (DGUI_NAMESPACE::DPalette::ColorType type)
 设置边框背景画刷的种类
 

Protected 成员函数

 DDrawer (DDrawerPrivate &dd, QWidget *parent=nullptr)
 
void resizeEvent (QResizeEvent *e) Q_DECL_OVERRIDE
 
- Protected 成员函数 继承自 Dtk::Widget::DFrame
 DFrame (DFramePrivate &dd, QWidget *parent=nullptr)
 
void paintEvent (QPaintEvent *event) override
 

详细描述

A beautifully developed control.

一个美观的可展开的控件。使用 DDrawer 类可以创建一个可展开的带有展开动画效果的控件,这个控件包含上下两部分, 上面的控件为标题控件,这个控件会始终显示,下面的控件为内容控件,默认为不会显示,调用 DDrawer::setExpand设置内容 控件的可见性。使用 DDrawer::setHeaderDDrawer::setContent 设置分别设置标题控件和内容控件。

\inmodule dtkwidget

using DDrawer Class can create a controllable control with an animation effect. This control contains the upper and lower parts. The above control is the title control. This control will always show.:: SETEXPAND to set the visibility of the content control.Use DDRAWER :: SetHeader and DDRAWER :: SetContent to set the title control and content control respectively.

参见
DHeaderLine
DHeaderLine

构造及析构函数说明

◆ DDrawer()

DDrawer::DDrawer ( QWidget *  parent = nullptr)
explicit

Get DDRAWER :: DDRAWER example parent As the parent control part of the example

获取 DDrawer::DDrawer实例 @aparam[in] parent 作为实例的父控件

成员函数说明

◆ expand()

bool DDrawer::expand ( ) const

Visible to obtain the current content control.

获取当前内容控件的可见性

返回
Visible of the current content control
当前内容控件的可见性

◆ expandChange

void DDrawer::expandChange ( bool  e)
signal

Content control visibility signal e For TRUE, the content control becomes visible, but vice versa

内容控件可见性发生改变的信号

参数
[in]e为 true 表示内容控件变为了可见,反之则反

◆ getContent()

QWidget * DDrawer::getContent ( ) const

Get the content control object

获取内容控件对象

返回
Content control object
内容控件对象

◆ setAnimationDuration()

void DDrawer::setAnimationDuration ( int  duration)

Set the time for the visibility of the content control when the animation time is changed.

设置内容控件的可见性改变时动画的时间

duration Specify the animation time

参数
[in]duration指定动画时间

◆ setAnimationEasingCurve()

void DDrawer::setAnimationEasingCurve ( QEasingCurve  curve)

setTheVisibilityOfTheContentControlWhenTheAnimationStyleIsChangedOfTheContentControlWhenTheAnimationStyleIsChanged curve Specify animation style

设置内容控件的可见性改变时动画的样式

参数
[in]curve指定动画样式

◆ setContent()

void DDrawer::setContent ( QWidget *  content,
Qt::Alignment  alignment = Qt::AlignHCenter 
)

Set the content control Content control is hidden by default, call ddrawer :: setexpand settings for its visibility content Content controlent control alignment The alignment method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout method of content control in the layout

设置内容控件,内容控件默认是隐藏的,调用 DDrawer::setExpand 设置其可见性

参数
[in]content内容控件
[in]alignment内容控件在布局中的对齐方式

◆ setExpand()

void DDrawer::setExpand ( bool  value)
virtual

Set the visibility of the content control.

设置内容控件的可见性

value For TRUE, the content control can be seen, but vice versant control can be seen, but vice versa

参数
[in]value为 true 则内容控件可见,反之则不显示

Dtk::Widget::DArrowLineDrawer , 以及 Dtk::Widget::DSwitchLineExpand 重载.

◆ setExpandedSeparatorVisible()

void DDrawer::setExpandedSeparatorVisible ( bool  arg)

Set the segmentation line under the content control.

设置是否允许内容控件下的分割线

arg For ture, the segmentation line is displayed, but the instead does not display

参数
[in]arg为 ture 则显示分割线,反之则不显示

◆ setHeader()

void DDrawer::setHeader ( QWidget *  header)

Set the title control The title control will always be displayed in the layout header Title control

设置标题控件,标题控件会始终显示在布局里

参数
[in]header标题控件

◆ setHeaderHeight()

void DDrawer::setHeaderHeight ( int  height)

Set the height of the title control.

设置标题控件的高度

height Specified height

参数
[in]height指定的高度

◆ setSeparatorVisible()

void DDrawer::setSeparatorVisible ( bool  arg)

Set the segmentation line between the title control and the content control.

设置是否允许标题控件与内容控件之间的分割线

arg For ture, the segmentation line is displayed, but the instead does not display

参数
[in]arg为 ture 则显示分割线,反之则不显示

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