diff --git a/.gitignore b/.gitignore
index 930b0d839..9c005296b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -40,3 +40,7 @@ qt_lib_dtkwidget.pri
dtkwidget.pc
*.qdoc
CMakeLists.txt.user
+
+# Ignore Doxygen theme files
+docs/doxygen-theme/
+
diff --git a/docs/images/dpasswordedit_example1.png b/docs/images/dpasswordedit_example1.png
new file mode 100644
index 000000000..fd9206773
Binary files /dev/null and b/docs/images/dpasswordedit_example1.png differ
diff --git a/docs/images/dpasswordedit_example2.png b/docs/images/dpasswordedit_example2.png
new file mode 100644
index 000000000..7b7d6a946
Binary files /dev/null and b/docs/images/dpasswordedit_example2.png differ
diff --git a/docs/widgets/dpasswordedit.zh_CN.dox b/docs/widgets/dpasswordedit.zh_CN.dox
index d35ab0f42..9266497e6 100644
--- a/docs/widgets/dpasswordedit.zh_CN.dox
+++ b/docs/widgets/dpasswordedit.zh_CN.dox
@@ -2,11 +2,34 @@
@~chinese
@file dpasswordedit.h
@ingroup edit
-@class
-@brief
+
+@class Dtk::Widget::DPasswordEdit
+@brief DPasswordEdit提供了一个让用户输入的密码框.
@details
-TODO: 添加类简介、示例代码、示例截图和函数使用说明等
+## demo示例
+
+
+
+@fn DPasswordEdit::DPasswordEdit(QWidget *parent)
+@brief DPasswordEdit的构造函数.
+@brief DPasswordEdit::DPasswordEdit 实例化了一个DPasswordEdit.
+@param[in] parent 父部件被传递给DLineEdit构造函数.
+
+@property DPasswordEdit::isEchoMode
+@brief 该属性会控制用户输入是否可见。若可见,用户输入将直接显示在输入框内;若不可见,用户输入将以点的形式显示.
+@sa QLineEdit::EchoMode
+
+@fn void DPasswordEdit::setEchoMode(QLineEdit::EchoMode mode)
+@brief 设置回显模式
+@sa QLineEdit::EchoMode
+@param[in] mode 如果传入的mode与当前回显模式相同,则不执行任何操作;如果传入的mode与当前回显模式不同,函数调用基类DLineEdit的setEchoMode(mode)函数来设置密码编辑框的回显模式.
+@fn void DPasswordEdit::setEchoButtonIsVisible(bool visible)
+@brief 设置回显模式按钮是否可见
+@param[in] visible true则设置回显模式的按钮可见,false则设置回显模式的按钮不可见
+@fn bool DPasswordEdit::echoButtonIsVisible() const
+@brief 回显模式的按钮是否可见
+@return 若返回值为true则回显模式的按钮可见,若返回值为false则回显模式的按钮不可见
*/
diff --git a/src/widgets/dpasswordedit.cpp b/src/widgets/dpasswordedit.cpp
index 1b65bccba..ba1b05d2a 100644
--- a/src/widgets/dpasswordedit.cpp
+++ b/src/widgets/dpasswordedit.cpp
@@ -19,19 +19,22 @@
DWIDGET_BEGIN_NAMESPACE
/*!
- \class Dtk::Widget::DPasswordEdit
+@~english
+ @class Dtk::Widget::DPasswordEdit
\inmodule dtkwidget
- \brief DPasswordEdit提供了一个让用户输入的密码框.
- \brief The DPasswordEdit class provides a widget to let user input password.
+ @brief DPasswordEdit provides a password input box for user input.
+ @brief The DPasswordEdit class provides a widget to let user input password.
*/
/*!
- \brief DPasswordEdit的构造函数.
- \brief DPasswordEdit::DPasswordEdit constructs an instance of DPasswordEdit.
-
- \a parent is passed to DLineEdit constructor.
+@~english
+ @brief DPasswordEdit constructor.
+ @brief DPasswordEdit::DPasswordEdit constructs an instance of DPasswordEdit.
+
+ @param[in] parent The parent widget passed to DLineEdit constructor.
*/
+
DPasswordEdit::DPasswordEdit(QWidget *parent)
: DLineEdit(*new DPasswordEditPrivate(this), parent)
{
@@ -41,13 +44,14 @@ DPasswordEdit::DPasswordEdit(QWidget *parent)
}
/*!
- \property DPasswordEdit::isEchoMode
+@~english
+ @property DPasswordEdit::isEchoMode
- \brief 该属性会控制用户输入是否可见.
- \brief This property holds whether the user input should be displayed directly
+ @brief This attribute controls the visibility of user input.
+ @brief This property holds whether the user input should be displayed directly
or show as dots.
- \sa QLineEdit::EchoMode
+ @sa QLineEdit::EchoMode
*/
bool DPasswordEdit::isEchoMode() const
{
@@ -55,9 +59,10 @@ bool DPasswordEdit::isEchoMode() const
}
/*!
- \brief 设置显示模式
- \sa QLineEdit::EchoMode
- \a mode
+@~english
+ @brief Setting the model of display.
+ @sa QLineEdit::EchoMode
+ @param[in] mode
*/
void DPasswordEdit::setEchoMode(QLineEdit::EchoMode mode)
{
@@ -79,8 +84,9 @@ void DPasswordEdit::setEchoMode(QLineEdit::EchoMode mode)
}
/*!
- \brief DPasswordEdit::setEchoButtonIsVisible 设置输入密码是否可见
- \a visible true输入密码可见 false不可见
+@~english
+ @brief DPasswordEdit::setEchoButtonIsVisible Set the visibility of the button of echo mode.
+ @param[in] visible "true" means the button of echo mode is visible, while "false" means the button of echo mode is not visible.
*/
void DPasswordEdit::setEchoButtonIsVisible(bool visible)
{
@@ -91,8 +97,9 @@ void DPasswordEdit::setEchoButtonIsVisible(bool visible)
}
/*!
- \brief DPasswordEdit::echoButtonIsVisible
- \return true输入密码可见 false不可见
+@~english
+ @brief DPasswordEdit::echoButtonIsVisible
+ @return If "true", the button of echo mode is visible. If "false", the button of echo mode is not visible.
*/
bool DPasswordEdit::echoButtonIsVisible() const
{