|
DtkWidget
DTK Widget module
|
此类是提供了应用程序的警告对话框, 符合Deepin风格 更多...
信号 | |
| void | alertChanged (bool alert) const |
| 警告信息发生改变 | |
Public 成员函数 | |
| DAlertControl (QWidget *target, QObject *parent=nullptr) | |
| 构造函数, 禁止拷贝构造 | |
| ~DAlertControl () override | |
| 析构函数 | |
| void | setAlert (bool isAlert) |
| 设置是否开启警告模式, 若开启警告模式, target将显示警告色 | |
| bool | isAlert () const |
| 返回是否开启警告模式, 若开启警告模式, target将显示警告色 | |
| void | setAlertColor (QColor c) |
| 设置警告颜色 | |
| QColor | alertColor () const |
| QColor | defaultAlertColor () const |
| 返回默认警告颜色 | |
| void | setMessageAlignment (Qt::Alignment alignment) |
| 指定对齐方式, 现只支持左, 右, 居中, 默认左对齐. | |
| Qt::Alignment | messageAlignment () const |
| 返回当前告警tooltips对齐方式 | |
| void | showAlertMessage (const QString &text, int duration=3000) |
| 显示警告消息 | |
| void | showAlertMessage (const QString &text, QWidget *follower, int duration=3000) |
| 显示警告消息 | |
| void | hideAlertMessage () |
| 隐藏警告消息框 | |
Protected 成员函数 | |
| DAlertControl (DAlertControlPrivate &d, QObject *parent) | |
| bool | eventFilter (QObject *watched, QEvent *event) override |
属性 | |
| bool | alert |
| 警告模式属性 | |
| QColor | alertColor |
| 返回警告颜色 | |
此类是提供了应用程序的警告对话框, 符合Deepin风格
| QColor Dtk::Widget::DAlertControl::defaultAlertColor | ( | ) | const |
返回默认警告颜色
| void Dtk::Widget::DAlertControl::setAlert | ( | bool | isAlert | ) |
设置是否开启警告模式, 若开启警告模式, target将显示警告色
| void Dtk::Widget::DAlertControl::setAlertColor | ( | QColor | c | ) |
设置警告颜色
| void Dtk::Widget::DAlertControl::setMessageAlignment | ( | Qt::Alignment | alignment | ) |
指定对齐方式, 现只支持左, 右, 居中, 默认左对齐.
| void Dtk::Widget::DAlertControl::showAlertMessage | ( | const QString & | text, |
| int | duration = 3000 |
||
| ) |
显示警告消息
显示指定的文本消息, 超过指定时间后警告消息消失
| [in] | text | 警告的文本 |
| [in] | duration | 显示的时间长度, 单位毫秒 |
| void Dtk::Widget::DAlertControl::showAlertMessage | ( | const QString & | text, |
| QWidget * | follower, | ||
| int | duration = 3000 |
||
| ) |
显示警告消息
| [in] | text | 警告的文本 |
| [in] | follower | 指定文本消息跟随的对象 |
| [in] | duration | 显示的时间长度, 单位毫秒 |
|
readwrite |