8#include <dtkwidget_global.h>
13#include <QAbstractButton>
15DWIDGET_BEGIN_NAMESPACE
17class DStyleOptionButtonBoxButton;
18class DButtonBoxButtonPrivate;
27 DButtonBoxButton(QStyle::StandardPixmap iconType =
static_cast<QStyle::StandardPixmap
>(-1),
29 DButtonBoxButton(DStyle::StandardPixmap iconType =
static_cast<DStyle::StandardPixmap
>(-1),
33 void setIcon(
const QIcon &icon);
34 void setIcon(QStyle::StandardPixmap iconType);
35 void setIcon(DStyle::StandardPixmap iconType);
37 void setIcon(
const DDciIcon &icon);
38 DDciIcon dciIcon()
const;
40 QSize iconSize()
const;
41 QSize sizeHint()
const;
42 QSize minimumSizeHint()
const override;
47 void paintEvent(QPaintEvent *e)
override;
48 void keyPressEvent(QKeyEvent *event)
override;
49 bool event(
QEvent *e)
override;
53class DButtonBox :
public QWidget,
public DCORE_NAMESPACE::DObject
59 explicit DButtonBox(QWidget *parent =
nullptr);
67 QAbstractButton * checkedButton()
const;
70 QAbstractButton *button(
int id)
const;
71 void setId(QAbstractButton *button,
int id);
72 int id(QAbstractButton *button)
const;
73 int checkedId()
const;
76 void buttonClicked(QAbstractButton *);
77 void buttonPressed(QAbstractButton *);
78 void buttonReleased(QAbstractButton *);
79 void buttonToggled(QAbstractButton *,
bool);
82 void paintEvent(QPaintEvent *e)
override;