23class DIconButton :
public QAbstractButton,
public DCORE_NAMESPACE::DObject
28 Q_PROPERTY(
bool flat READ isFlat WRITE setFlat)
32 explicit DIconButton(QStyle::StandardPixmap iconType, QWidget *parent =
nullptr);
34 explicit DIconButton(
const DDciIcon &dciIcon, QWidget *parent =
nullptr);
37 void setIcon(
const QIcon &icon);
38 void setIcon(QStyle::StandardPixmap iconType);
40 void setIcon(
const DDciIcon &icon);
42 DDciIcon dciIcon()
const;
44 QSize sizeHint()
const override;
45 QSize minimumSizeHint()
const override;
46 QSize iconSize()
const;
50 void setEnabledCircle(
bool status);
51 bool enabledCircle()
const;
52 void setNewNotification(
const bool set_new);
55 void setFlat(
bool flat);
58 using QAbstractButton::setText;
59 using QAbstractButton::text;
64 void keyPressEvent(QKeyEvent *event)
override;
67 void paintEvent(QPaintEvent *event)
override;
68 bool event(QEvent *e)
override;