|
DtkWidget
DTK Widget module
|
按钮的图标 更多...
Public 槽 | |
| void | setFlat (bool flat) |
| 设置是否保留边框 | |
Public 成员函数 | |
| DIconButton (QWidget *parent=nullptr) | |
| 实现一个方便定义图标的button | |
| DIconButton (QStyle::StandardPixmap iconType, QWidget *parent=nullptr) | |
| DIconButton (DStyle::StandardPixmap iconType, QWidget *parent=nullptr) | |
| DIconButton (const DDciIcon &dciIcon, QWidget *parent=nullptr) | |
| void | setIcon (const QIcon &icon) |
| 设置button的图标 | |
| void | setIcon (QStyle::StandardPixmap iconType) |
| 设置button图标的类型,传入QT预定义枚举值 | |
| void | setIcon (DStyle::StandardPixmap iconType) |
| 设置button图标的类型,传入DTK预定义枚举值 | |
| void | setIcon (const DDciIcon &icon) |
| DDciIcon | dciIcon () const |
| QSize | sizeHint () const override |
| QSize | minimumSizeHint () const override |
| QSize | iconSize () const |
| icon的尺寸 | |
| bool | isFlat () const |
| button图标有无边框 | |
| void | setEnabledCircle (bool status) |
| bool | enabledCircle () const |
| void | setNewNotification (const bool set_new) |
| 设置是否显示小红点 | |
Protected 成员函数 | |
| DIconButton (DIconButtonPrivate &dd, QWidget *parent=nullptr) | |
| virtual DStyleOptionButton | baseStyleOption () const |
| virtual void | initStyleOption (DStyleOptionButton *option) const |
| void | keyPressEvent (QKeyEvent *event) override |
属性 | |
| bool | flat |
按钮的图标
定制化的按钮图标,可以根据传入的图标参数具体调整
|
explicit |
实现一个方便定义图标的button
| [in] | parent |
|
protectedvirtual |
| QSize DIconButton::iconSize | ( | ) | const |
icon的尺寸
| bool DIconButton::isFlat | ( | ) | const |
button图标有无边框
|
slot |
设置是否保留边框
| [in] | flat | true无边框 false有边框 |
| void DIconButton::setIcon | ( | const QIcon & | icon | ) |
设置button的图标
| [in] | icon | button的图标 |
| void DIconButton::setIcon | ( | DStyle::StandardPixmap | iconType | ) |
设置button图标的类型,传入DTK预定义枚举值
| [in] | iconType | icon类型 |
| void DIconButton::setIcon | ( | QStyle::StandardPixmap | iconType | ) |
设置button图标的类型,传入QT预定义枚举值
| [in] | iconType | icon类型 |
| void DIconButton::setNewNotification | ( | const bool | set_new | ) |
设置是否显示小红点
| [in] | set_new | true有红点 false无红点 |