A widget for.
More...
#include <KoColorPopupButton.h>
A widget for.
Definition at line 18 of file KoColorPopupButton.h.
◆ KoColorPopupButton()
| KoColorPopupButton::KoColorPopupButton |
( |
QWidget * | parent = 0 | ) |
|
|
explicit |
Constructor for the widget, where value is set to 0
- Parameters
-
Definition at line 15 of file KoColorPopupButton.cpp.
16 : QToolButton(parent)
17{
18 setToolButtonStyle(Qt::ToolButtonIconOnly);
19}
◆ ~KoColorPopupButton()
| KoColorPopupButton::~KoColorPopupButton |
( |
| ) |
|
|
override |
◆ iconSizeChanged
| void KoColorPopupButton::iconSizeChanged |
( |
| ) |
|
|
signal |
Emitted when a resource was selected.
◆ resizeEvent()
| void KoColorPopupButton::resizeEvent |
( |
QResizeEvent * | e | ) |
|
|
overrideprotected |
reimplemented from QToolButton
Definition at line 33 of file KoColorPopupButton.cpp.
34{
35 QStyleOptionToolButton opt;
36 initStyleOption(&opt);
38
39 QSize
rect = style()->sizeFromContents(QStyle::CT_ToolButton, &opt, size,
this);
40 int iconWidth =
size.width() -
rect.width() + e->size().width();
41
42 if (iconWidth !=
size.width()) {
43 size.setWidth(iconWidth);
44 setIconSize(size);
45 }
46 QToolButton::resizeEvent(e);
47
49}
int iconSize(qreal width, qreal height)
int size(const Forest< T > &forest)
References iconSize(), and iconSizeChanged().
◆ sizeHint()
| QSize KoColorPopupButton::sizeHint |
( |
| ) |
const |
|
override |
Definition at line 25 of file KoColorPopupButton.cpp.
26{
27 QStyleOptionToolButton opt;
28 initStyleOption(&opt);
29
30 return style()->sizeFromContents(QStyle::CT_ToolButton, &opt, QSize(16,16), this);
31}
The documentation for this class was generated from the following files: