DtkWidget
DTK Widget module
|
A beautifully developed control. 更多...
信号 | |
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::setHeader
和 DDrawer::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.
|
explicit |
Get DDRAWER :: DDRAWER example parent As the parent control part of the example
获取 DDrawer::DDrawer
实例 @aparam[in] parent 作为实例的父控件
bool DDrawer::expand | ( | ) | const |
Visible to obtain the current content control.
获取当前内容控件的可见性
|
signal |
Content control visibility signal e For TRUE, the content control becomes visible, but vice versa
内容控件可见性发生改变的信号
[in] | e | 为 true 表示内容控件变为了可见,反之则反 |
QWidget * DDrawer::getContent | ( | ) | const |
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 | 指定动画时间 |
void DDrawer::setAnimationEasingCurve | ( | QEasingCurve | curve | ) |
setTheVisibilityOfTheContentControlWhenTheAnimationStyleIsChangedOfTheContentControlWhenTheAnimationStyleIsChanged curve Specify animation style
设置内容控件的可见性改变时动画的样式
[in] | curve | 指定动画样式 |
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 | 内容控件在布局中的对齐方式 |
|
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 重载.
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 则显示分割线,反之则不显示 |
void DDrawer::setHeader | ( | QWidget * | header | ) |
Set the title control The title control will always be displayed in the layout header Title control
设置标题控件,标题控件会始终显示在布局里
[in] | header | 标题控件 |
void DDrawer::setHeaderHeight | ( | int | height | ) |
Set the height of the title control.
设置标题控件的高度
height Specified height
[in] | height | 指定的高度 |
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 则显示分割线,反之则不显示 |