Skip to content

Commit

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

Log: update docs

Issue: linuxdeepin/dtk#94
  • Loading branch information
LEpoii committed Jul 5, 2023
1 parent 0ffd624 commit a4ca52b
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
Binary file added docs/images/DWarningButton.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 14 additions & 4 deletions docs/widgets/dwarningbutton.zh_CN.dox
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,21 @@
@~chinese
@file dwarningbutton.h
@ingroup button
@class
@brief
@details
@class Dtk::Widget::DWarningButton
@brief 警告按钮控件, 继承于 DPushButton 控件, 主要替换了文字和背景的颜色.
@details

TODO: 添加类简介、示例代码、示例截图和函数使用说明等
@note 通常在执行一些比较危险的动作时候, 给出的一个提醒标识, 但是并不强制阻止; 如: 某些小程序需要较高的权限才能够运行; 删除文件不可恢复等
@image html ../docs/images/DWarningButton.png
@sa QPushButton

@fn DWarningButton::DWarningButton(QWidget *parent): DPushButton(parent)
@brief 构造函数
@param[in] parent 本控件的父对象

@fn void DWarningButton::initStyleOption(QStyleOptionButton *option) const
@brief 初始化风格属性
@param[in] option 用来初始化本控件的基础的风格属性

*/

19 changes: 11 additions & 8 deletions src/widgets/dwarningbutton.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,28 @@
DWIDGET_BEGIN_NAMESPACE

/*!
\class Dtk::Widget::DWarningButton
@~english
@class Dtk::Widget::DWarningButton
\inmodule dtkwidget
\brief 警告按钮控件, 继承于 DPushButton 控件, 主要替换了文字和背景的颜色.
@brief warning button widget, inherits from DPushButton widget, mainly replacing the color of text and background.
\note 通常在执行一些比较危险的动作时候, 给出的一个提醒标识, 但是并不强制阻止; 如: 某些小程序需要较高的权限才能够运行; 删除文件不可恢复等
\sa QPushButton
@note Usually gives a warning sign when executing some dangerous commands but not forbid it; For example: some programs require higher permission to run; files connot be restored after delete
@sa QPushButton
*/

/*!
\brief 构造函数
\a parent 本控件的父对象
@~english
@brief constructor
@param[in] parent is the parent object of this widget
*/
DWarningButton::DWarningButton(QWidget *parent): DPushButton(parent)
{
}

/*!
\brief 初始化风格属性
\a option 用来初始化本控件的基础的风格属性
@~english
@brief initialize the style option
@param[in] option is the style option used to initialize this widget
*/
void DWarningButton::initStyleOption(QStyleOptionButton *option) const
{
Expand Down

0 comments on commit a4ca52b

Please sign in to comment.