Skip to content

Commit

Permalink
doc: update docs for dframe
Browse files Browse the repository at this point in the history
更新dframe的文档

Log: update docs

Issue: linuxdeepin/dtk#94
  • Loading branch information
LEpoii committed Jul 5, 2023
1 parent 14483ed commit 8c27054
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
Binary file added docs/images/DFrame.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
30 changes: 28 additions & 2 deletions docs/widgets/dframe.zh_CN.dox
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,37 @@
@~chinese
@file dframe.h
@ingroup layout
@class
@class Dtk::Widget::DFrame
@brief
@details

TODO: 添加类简介、示例代码、示例截图和函数使用说明等
@image html ../images/DFrame.png

@fn DFrame::DFrame(QWidget *parent)
@brief 用于其他需要边框的widget的基类
@param[in] parent

@fn void DFrame::setFrameRounded(bool on)
@brief 设置边框圆角是否开启
@param[in] on true开启,false关闭

@fn void DFrame::setBackgroundRole(DGUI_NAMESPACE::DPalette::ColorType type)
@brief 设置边框背景画刷的角色类型
@param[in] type 背景画刷的角色类型

@fn void DFrame::paintEvent(QPaintEvent *event)

*/

/*!
@~chinese
@file dframe.h
@ingroup layout
@class DFramePrivate
@brief
@details

@fn DFramePrivate::DFramePrivate(DFrame *qq)

*/

15 changes: 9 additions & 6 deletions src/widgets/dframe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,9 @@ DFramePrivate::DFramePrivate(DFrame *qq)
}

/*!
\brief DFrame::DFrame 用于其他需要边框的widget的基类
\a parent
@~english
@brief DFrame::DFrame is used for other widget base class that require frame
@param[in] parent
*/
DFrame::DFrame(QWidget *parent)
: DFrame(*new DFramePrivate(this), parent)
Expand All @@ -33,8 +34,9 @@ DFrame::DFrame(QWidget *parent)
}

/*!
\brief DFrame::setFrameRounded设置边框圆角是否开启
\a on true开启 false关闭
@~english
@brief DFrame::setFrameRounded sets whether the frame corners are rounded
@param[in] on true means rounded, while false means not
*/
void DFrame::setFrameRounded(bool on)
{
Expand All @@ -48,8 +50,9 @@ void DFrame::setFrameRounded(bool on)
}

/*!
\brief DFrame::setBackgroundRole 设置边框背景画刷的角色类型
\a type 背景画刷的角色类型
@~english
@brief DFrame::setBackgroundRole sets role type of the frame background brush
@param[in] type role type of the frame background brush
*/
void DFrame::setBackgroundRole(DGUI_NAMESPACE::DPalette::ColorType type)
{
Expand Down

0 comments on commit 8c27054

Please sign in to comment.