A custom QSlider styled with a general cyberpunk aesthetic (blue theme).
More...
#include <cyber_slider.h>
|
| | CyberSlider (Qt::Orientation orientation, QWidget *parent=nullptr) |
| | Constructs a CyberSlider. Initializes the slider with the specified orientation and applies basic styling (transparent background, no border) via stylesheet. Sets the initial glow intensity.
|
| |
| 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 slider.
|
| |
|
| void | enterEvent (QEvent *event) override |
| | Overridden enter event handler. Animates the glow effect intensity increase on mouse hover.
|
| |
| void | leaveEvent (QEvent *event) override |
| | Overridden leave event handler. Animates the glow effect intensity decrease when the mouse leaves.
|
| |
| void | paintEvent (QPaintEvent *event) override |
| | Overridden paint event handler. Draws the custom slider appearance. Renders the track, the progress bar (filled portion) with scanlines, the handle, and the glow effect using cyberpunk-themed blue colors. Includes decorative lines on the handle.
|
| |
|
| double | glowIntensity |
| | Property controlling the intensity of the handle's glow effect (0.0 to 1.0). Animatable.
|
| |
|
| double | glow_intensity_ |
| | Current intensity of the glow effect. Modified by animations on hover.
|
| |
A custom QSlider styled with a general cyberpunk aesthetic (blue theme).
This slider features a dark blue track, a neon blue progress bar, and a handle with a subtle glow effect that animates on hover. It provides a generic cyberpunk look suitable for various settings.
◆ CyberSlider()
| CyberSlider::CyberSlider |
( |
Qt::Orientation | orientation, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Constructs a CyberSlider. Initializes the slider with the specified orientation and applies basic styling (transparent background, no border) via stylesheet. Sets the initial glow intensity.
- Parameters
-
| orientation | The orientation of the slider (Horizontal or Vertical). |
| parent | Optional parent widget. |
◆ enterEvent()
| void CyberSlider::enterEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Overridden enter event handler. Animates the glow effect intensity increase on mouse hover.
- Parameters
-
◆ GetGlowIntensity()
| double CyberSlider::GetGlowIntensity |
( |
| ) |
const |
|
inline |
Gets the current intensity of the glow effect.
- Returns
- The glow intensity value (typically 0.0 to 1.0).
◆ leaveEvent()
| void CyberSlider::leaveEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Overridden leave event handler. Animates the glow effect intensity decrease when the mouse leaves.
- Parameters
-
◆ paintEvent()
| void CyberSlider::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
Overridden paint event handler. Draws the custom slider appearance. Renders the track, the progress bar (filled portion) with scanlines, the handle, and the glow effect using cyberpunk-themed blue colors. Includes decorative lines on the handle.
- Parameters
-
◆ SetGlowIntensity()
| void CyberSlider::SetGlowIntensity |
( |
double | intensity | ) |
|
Sets the intensity of the glow effect. Triggers a repaint of the slider.
- Parameters
-
| intensity | The desired glow intensity. |
◆ glow_intensity_
| double CyberSlider::glow_intensity_ |
|
private |
Current intensity of the glow effect. Modified by animations on hover.
◆ glowIntensity
| double CyberSlider::glowIntensity |
|
readwrite |
Property controlling the intensity of the handle's glow effect (0.0 to 1.0). Animatable.
The documentation for this class was generated from the following files: