|
Qt Utilities 6.22.1
Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models
|
A simple QAbstractButton implementation displaying a QPixmap. More...
#include <iconbutton.h>
Public Member Functions | |
| IconButton (QWidget *parent=nullptr) | |
| Constructs an icon button. | |
| ~IconButton () override | |
| Destroys the icon button. | |
| const QPixmap & | pixmap () const |
| Returns the pixmap. | |
| void | setPixmap (const QPixmap &pixmap) |
| Sets the pixmap. | |
| QSize | sizeHint () const override |
Static Public Member Functions | |
| static IconButton * | fromAction (QAction *action, std::uintptr_t id=0) |
| Creates an IconButton for the specified action. | |
Static Public Attributes | |
| static constexpr auto | defaultPixmapSize = QSize(16, 16) |
Protected Member Functions | |
| void | paintEvent (QPaintEvent *event) override |
| void | keyPressEvent (QKeyEvent *event) override |
| void | keyReleaseEvent (QKeyEvent *event) override |
Properties | |
| QPixmap | pixmap |
A simple QAbstractButton implementation displaying a QPixmap.
Definition at line 15 of file iconbutton.h.
|
explicit |
Constructs an icon button.
Definition at line 22 of file iconbutton.cpp.
|
override |
Destroys the icon button.
Definition at line 32 of file iconbutton.cpp.
|
static |
Creates an IconButton for the specified action.
Definition at line 41 of file iconbutton.cpp.
|
overrideprotected |
Definition at line 110 of file iconbutton.cpp.
|
overrideprotected |
Definition at line 119 of file iconbutton.cpp.
|
overrideprotected |
Definition at line 86 of file iconbutton.cpp.
|
inline |
Returns the pixmap.
Definition at line 46 of file iconbutton.h.
|
inline |
Sets the pixmap.
Definition at line 54 of file iconbutton.h.
|
override |
Definition at line 76 of file iconbutton.cpp.
|
staticconstexpr |
Definition at line 28 of file iconbutton.h.
|
readwrite |
Definition at line 17 of file iconbutton.h.