A clickable icon widget that can be checked or unchecked.
More...
#include <clickable_icon.h>
|
|
void | clicked () |
| | Emitted when the icon is clicked.
|
| void | toggled (bool check) |
| | Emitted when the checked state of the icon changes.
|
|
| | ClickableIcon (const QIcon &icon, QWidget *parent=nullptr) |
| | Constructs a new ClickableIcon with the given icon and parent widget.
|
| | ClickableIcon (const QIcon &icon, const QSize &size, QWidget *parent=nullptr) |
| | Constructs a new ClickableIcon with the given icon, size, and parent widget.
|
| void | setCheckable (bool checkable) |
| | Sets whether the icon is checkable.
|
| void | setChecked (bool check) |
| | Sets the checked state of the icon.
|
| bool | isChecked () |
| | Returns whether the icon is currently checked.
|
|
| void | mousePressEvent (QMouseEvent *event) override |
| | Handles mouse press events.
|
|
|
bool | mCheckable |
| | True if the icon is currently checked, false otherwise.
|
|
bool | mHovered |
| | True if the icon can be checked or unchecked, false otherwise.
|
A clickable icon widget that can be checked or unchecked.
◆ ClickableIcon() [1/2]
| ClickableIcon::ClickableIcon |
( |
const QIcon & | icon, |
|
|
QWidget * | parent = nullptr ) |
Constructs a new ClickableIcon with the given icon and parent widget.
- Parameters
-
| icon | The QIcon to display on the button. |
| parent | The parent QWidget of this ClickableIcon. |
◆ ClickableIcon() [2/2]
| ClickableIcon::ClickableIcon |
( |
const QIcon & | icon, |
|
|
const QSize & | size, |
|
|
QWidget * | parent = nullptr ) |
Constructs a new ClickableIcon with the given icon, size, and parent widget.
- Parameters
-
| icon | The QIcon to display on the button. |
| size | The QSize of the button. |
| parent | The parent QWidget of this ClickableIcon. |
◆ isChecked()
| bool ClickableIcon::isChecked |
( |
| ) |
|
Returns whether the icon is currently checked.
- Returns
- True if the icon is checked, false otherwise.
◆ mousePressEvent()
| void ClickableIcon::mousePressEvent |
( |
QMouseEvent * | event | ) |
|
|
overrideprotected |
Handles mouse press events.
- Parameters
-
| event | The QMouseEvent to handle. |
◆ setCheckable()
| void ClickableIcon::setCheckable |
( |
bool | checkable | ) |
|
Sets whether the icon is checkable.
- Parameters
-
| checkable | True if the icon should be checkable, false otherwise. |
◆ setChecked()
| void ClickableIcon::setChecked |
( |
bool | check | ) |
|
Sets the checked state of the icon.
- Parameters
-
| check | True to check the icon, false to uncheck it. |
◆ toggled
| void ClickableIcon::toggled |
( |
bool | check | ) |
|
|
signal |
Emitted when the checked state of the icon changes.
- Parameters
-
| check | The new checked state of the icon. |
The documentation for this class was generated from the following files:
- /__w/maki/maki/app/widgets/clickable_icon.h
- /__w/maki/maki/app/widgets/clickable_icon.cpp