A custom QSlider styled with a cyberpunk aesthetic, specifically themed for audio controls.
More...
#include <cyber_audio_slider.h>
|
| | CyberAudioSlider (Qt::Orientation orientation, QWidget *parent=nullptr) |
| | Constructs a CyberAudioSlider. 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), the handle, and the glow effect using cyberpunk-themed purple/blue colors. Includes decorative lines on the progress bar and 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 cyberpunk aesthetic, specifically themed for audio controls.
This slider features a dark purple track, a neon-purple progress bar, and a handle with a subtle glow effect that animates on hover. It's designed visually to represent audio volume or similar audio-related settings.
◆ CyberAudioSlider()
| CyberAudioSlider::CyberAudioSlider |
( |
Qt::Orientation | orientation, |
|
|
QWidget * | parent = nullptr ) |
|
explicit |
Constructs a CyberAudioSlider. 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 CyberAudioSlider::enterEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Overridden enter event handler. Animates the glow effect intensity increase on mouse hover.
- Parameters
-
◆ GetGlowIntensity()
| double CyberAudioSlider::GetGlowIntensity |
( |
| ) |
const |
|
inline |
Gets the current intensity of the glow effect.
- Returns
- The glow intensity value (typically 0.0 to 1.0).
◆ leaveEvent()
| void CyberAudioSlider::leaveEvent |
( |
QEvent * | event | ) |
|
|
overrideprotected |
Overridden leave event handler. Animates the glow effect intensity decrease when the mouse leaves.
- Parameters
-
◆ paintEvent()
| void CyberAudioSlider::paintEvent |
( |
QPaintEvent * | event | ) |
|
|
overrideprotected |
Overridden paint event handler. Draws the custom slider appearance. Renders the track, the progress bar (filled portion), the handle, and the glow effect using cyberpunk-themed purple/blue colors. Includes decorative lines on the progress bar and handle.
- Parameters
-
◆ SetGlowIntensity()
| void CyberAudioSlider::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 CyberAudioSlider::glow_intensity_ |
|
private |
Current intensity of the glow effect. Modified by animations on hover.
◆ glowIntensity
| double CyberAudioSlider::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: