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

Provides a static interface for accessing cyberpunk-themed colors and applying a global stylesheet. More...

#include <cyberpunk_style.h>

Collaboration diagram for CyberpunkStyle:

Public Member Functions

 CyberpunkStyle ()=delete
 Private constructor to prevent instantiation. This class only provides static members.
 

Static Public Member Functions

static void ApplyStyle ()
 Applies the cyberpunk style globally to the QApplication. Sets the application style to "Fusion", configures a custom QPalette using the defined colors, and applies a detailed stylesheet to style common widgets.
 
static QColor GetAccentColor ()
 Gets the accent color (Purple).
 
static QColor GetBackgroundDarkColor ()
 Gets the dark background color.
 
static QColor GetBackgroundLightColor ()
 Gets the light background color.
 
static QColor GetBackgroundMediumColor ()
 Gets the medium background color.
 
static QString GetCyberpunkFrameStyle ()
 Generates a CSS-like style string for a basic cyberpunk-themed frame. Includes background color, border, and border-radius.
 
static QColor GetDangerColor ()
 Gets the danger color (Danger Red).
 
static QColor GetMutedTextColor ()
 Gets the muted text color (for disabled elements, etc.).
 
static QColor GetPrimaryColor ()
 Gets the primary color (Neon Blue).
 
static QColor GetSecondaryColor ()
 Gets the secondary color (Lighter Blue).
 
static QColor GetSuccessColor ()
 Gets the success color (Neon Green).
 
static QString GetTechBorderStyle (bool is_active=true)
 Generates a CSS-like border style string with a "tech" look. The border color depends on the is_active flag.
 
static QColor GetTextColor ()
 Gets the main text color.
 
static QColor GetWarningColor ()
 Gets the warning color (Warning Yellow).
 

Detailed Description

Provides a static interface for accessing cyberpunk-themed colors and applying a global stylesheet.

This class defines a set of predefined QColor values representing a cyberpunk color palette.

It also includes a method to apply a comprehensive stylesheet to the entire QApplication, using these colors to style various standard Qt widgets (buttons, line edits, scrollbars, etc.). Additionally, it offers helper methods to generate specific CSS-like style strings for custom widgets.

Constructor & Destructor Documentation

◆ CyberpunkStyle()

CyberpunkStyle::CyberpunkStyle ( )
delete

Private constructor to prevent instantiation. This class only provides static members.

Member Function Documentation

◆ ApplyStyle()

void CyberpunkStyle::ApplyStyle ( )
static

Applies the cyberpunk style globally to the QApplication. Sets the application style to "Fusion", configures a custom QPalette using the defined colors, and applies a detailed stylesheet to style common widgets.

Here is the call graph for this function:

◆ GetAccentColor()

static QColor CyberpunkStyle::GetAccentColor ( )
inlinestatic

Gets the accent color (Purple).

Returns
QColor(150, 70, 240).
Here is the caller graph for this function:

◆ GetBackgroundDarkColor()

static QColor CyberpunkStyle::GetBackgroundDarkColor ( )
inlinestatic

Gets the dark background color.

Returns
QColor(10, 20, 30).
Here is the caller graph for this function:

◆ GetBackgroundLightColor()

static QColor CyberpunkStyle::GetBackgroundLightColor ( )
inlinestatic

Gets the light background color.

Returns
QColor(30, 50, 70).
Here is the caller graph for this function:

◆ GetBackgroundMediumColor()

static QColor CyberpunkStyle::GetBackgroundMediumColor ( )
inlinestatic

Gets the medium background color.

Returns
QColor(20, 35, 50).
Here is the caller graph for this function:

◆ GetCyberpunkFrameStyle()

QString CyberpunkStyle::GetCyberpunkFrameStyle ( )
static

Generates a CSS-like style string for a basic cyberpunk-themed frame. Includes background color, border, and border-radius.

Returns
A QString containing the frame style definition.
Here is the call graph for this function:

◆ GetDangerColor()

static QColor CyberpunkStyle::GetDangerColor ( )
inlinestatic

Gets the danger color (Danger Red).

Returns
QColor(255, 60, 60).

◆ GetMutedTextColor()

static QColor CyberpunkStyle::GetMutedTextColor ( )
inlinestatic

Gets the muted text color (for disabled elements, etc.).

Returns
QColor(150, 160, 170).
Here is the caller graph for this function:

◆ GetPrimaryColor()

static QColor CyberpunkStyle::GetPrimaryColor ( )
inlinestatic

Gets the primary color (Neon Blue).

Returns
QColor(0, 170, 255).
Here is the caller graph for this function:

◆ GetSecondaryColor()

static QColor CyberpunkStyle::GetSecondaryColor ( )
inlinestatic

Gets the secondary color (Lighter Blue).

Returns
QColor(0, 220, 255).
Here is the caller graph for this function:

◆ GetSuccessColor()

static QColor CyberpunkStyle::GetSuccessColor ( )
inlinestatic

Gets the success color (Neon Green).

Returns
QColor(0, 240, 130).

◆ GetTechBorderStyle()

QString CyberpunkStyle::GetTechBorderStyle ( bool is_active = true)
static

Generates a CSS-like border style string with a "tech" look. The border color depends on the is_active flag.

Parameters
is_activeIf true, uses the primary color; otherwise, uses a darker version. Defaults to true.
Returns
A QString containing the border style definition (e.g., "border: 1px solid #00aaff; border-radius: 0px;").
Here is the call graph for this function:

◆ GetTextColor()

static QColor CyberpunkStyle::GetTextColor ( )
inlinestatic

Gets the main text color.

Returns
QColor(220, 230, 240).
Here is the caller graph for this function:

◆ GetWarningColor()

static QColor CyberpunkStyle::GetWarningColor ( )
inlinestatic

Gets the warning color (Warning Yellow).

Returns
QColor(255, 180, 0).
Here is the caller graph for this function:

The documentation for this class was generated from the following files: