A custom QCheckBox styled with a cyberpunk aesthetic.
More...
#include <cyber_checkbox.h>
|
| | CyberCheckBox (const QString &text, QWidget *parent=nullptr) |
| | Constructs a CyberCheckBox. Initializes the checkbox with text, applies basic styling (spacing, background, color, font) via stylesheet, and sets a minimum height.
|
| |
| double | GetGlowIntensity () const |
| | Gets the current intensity of the glow effect.
|
| |
| void | SetGlowIntensity (double intensity) |
| | Sets the intensity of the glow effect. Triggers a repaint of the checkbox.
|
| |
| QSize | sizeHint () const override |
| | Returns the recommended size for the checkbox. Ensures a minimum height is respected.
|
| |
|
| void | enterEvent (QEvent *event) override |
| | Overridden enter event handler. Animates the glow intensity to a higher value.
|
| |
| void | leaveEvent (QEvent *event) override |
| | Overridden leave event handler. Animates the glow intensity back to its default value.
|
| |
| void | paintEvent (QPaintEvent *event) override |
| | Overridden paint event handler. Draws the custom checkbox appearance. Renders the clipped square indicator (background, border, glow), the 'X' checkmark if checked, and the label text using the specified cyberpunk style.
|
| |
|
| double | glowIntensity |
| | Property controlling the intensity of the checkbox border glow (0.0 to 1.0+). Animatable.
|
| |
|
| double | glow_intensity_ |
| | Current intensity of the glow effect. Modified by animations on hover.
|
| |
A custom QCheckBox styled with a cyberpunk aesthetic.
This checkbox features a custom-drawn square indicator with clipped corners, a neon blue border, and a subtle glow effect that animates on hover. The checkmark is rendered as a stylized 'X'. The text uses a specific cyberpunk-themed font and color.
◆ CyberCheckBox()
| CyberCheckBox::CyberCheckBox |
( |
const QString & | text, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Constructs a CyberCheckBox. Initializes the checkbox with text, applies basic styling (spacing, background, color, font) via stylesheet, and sets a minimum height.
- Parameters
-
| text | The label text for the checkbox. |
| parent | Optional parent widget. |
◆ enterEvent()
| void CyberCheckBox::enterEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Overridden enter event handler. Animates the glow intensity to a higher value.
- Parameters
-
◆ GetGlowIntensity()
| double CyberCheckBox::GetGlowIntensity |
( |
| ) |
const |
|
inline |
Gets the current intensity of the glow effect.
- Returns
- The glow intensity value (typically 0.5 to 0.9).
◆ leaveEvent()
| void CyberCheckBox::leaveEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Overridden leave event handler. Animates the glow intensity back to its default value.
- Parameters
-
◆ paintEvent()
| void CyberCheckBox::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
Overridden paint event handler. Draws the custom checkbox appearance. Renders the clipped square indicator (background, border, glow), the 'X' checkmark if checked, and the label text using the specified cyberpunk style.
- Parameters
-
◆ SetGlowIntensity()
| void CyberCheckBox::SetGlowIntensity |
( |
double | intensity | ) |
|
Sets the intensity of the glow effect. Triggers a repaint of the checkbox.
- Parameters
-
| intensity | The desired glow intensity. |
◆ sizeHint()
| QSize CyberCheckBox::sizeHint |
( |
| ) |
const |
|
override |
Returns the recommended size for the checkbox. Ensures a minimum height is respected.
- Returns
- The calculated QSize hint.
◆ glow_intensity_
| double CyberCheckBox::glow_intensity_ |
|
private |
Current intensity of the glow effect. Modified by animations on hover.
◆ glowIntensity
| double CyberCheckBox::glowIntensity |
|
readwrite |
Property controlling the intensity of the checkbox border glow (0.0 to 1.0+). Animatable.
The documentation for this class was generated from the following files: