Wavelength
Privacy-focused, cross-platform, and open-source communication application
Loading...
Searching...
No Matches
CyberSlider Class Referencefinal

A custom QSlider styled with a general cyberpunk aesthetic (blue theme). More...

#include <cyber_slider.h>

Inheritance diagram for CyberSlider:
Collaboration diagram for CyberSlider:

Public Member Functions

 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.
 

Protected Member Functions

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.
 

Properties

double glowIntensity
 Property controlling the intensity of the handle's glow effect (0.0 to 1.0). Animatable.
 

Private Attributes

double glow_intensity_
 Current intensity of the glow effect. Modified by animations on hover.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ 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
orientationThe orientation of the slider (Horizontal or Vertical).
parentOptional parent widget.

Member Function Documentation

◆ enterEvent()

void CyberSlider::enterEvent ( QEvent * event)
overrideprotected

Overridden enter event handler. Animates the glow effect intensity increase on mouse hover.

Parameters
eventThe enter event.

◆ 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
eventThe leave event.

◆ 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
eventThe paint event.

◆ SetGlowIntensity()

void CyberSlider::SetGlowIntensity ( double intensity)

Sets the intensity of the glow effect. Triggers a repaint of the slider.

Parameters
intensityThe desired glow intensity.

Member Data Documentation

◆ glow_intensity_

double CyberSlider::glow_intensity_
private

Current intensity of the glow effect. Modified by animations on hover.

Property Documentation

◆ 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: