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

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

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

Public 成员函数

 DArrowLineDrawer (QWidget *parent=nullptr)
 构造一个 DArrowLineDrawer 实例
 
void setTitle (const QString &title)
 设置标题要显示的文字
 
void setExpand (bool value)
 设置是否展开以显示内容控件
 
- Public 成员函数 继承自 Dtk::Widget::DDrawer
 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.
 
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)
 设置边框背景画刷的种类
 

额外继承的成员函数

- 信号 继承自 Dtk::Widget::DDrawer
void expandChange (bool e)
 Content control visibility signal e For TRUE, the content control becomes visible, but vice versa
 
void sizeChanged (QSize s)
 
- Protected 成员函数 继承自 Dtk::Widget::DDrawer
 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
 

详细描述

一个美观的可展开的控件

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

参见
DDrawer

构造及析构函数说明

◆ DArrowLineDrawer()

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

构造一个 DArrowLineDrawer 实例

参数
[in]parent为实例的父控件

成员函数说明

◆ setExpand()

void DArrowLineDrawer::setExpand ( bool  value)
virtual

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

参数
[in]value为 true 即为显示,反之则反

重载 Dtk::Widget::DDrawer .

◆ setTitle()

void DArrowLineDrawer::setTitle ( const QString &  title)

设置标题要显示的文字

参数
[in]title标题内容

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